[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D112868#3105942 , @aaron.ballman wrote: > One thing that surprises me is that the test changes are in Sema but the code > changes are in CodeGen. I see that this test actually emits LLVM IR. Should > it be moved (as an NFC c

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-08 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein updated this revision to Diff 385541. ibookstein added a comment. clang-format + fastforward rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112868/new/ https://reviews.llvm.org/D112868 Files: clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-05 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein updated this revision to Diff 385212. ibookstein added a comment. Nicer param order for checkAliasedGlobal.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112868/new/ https://reviews.llvm.org/D112868 Files: clang/lib/CodeGen/CodeGenMo

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-05 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein updated this revision to Diff 385211. ibookstein added a comment. Changed to using D->hasAttr() and passing that bool into the checkAliasedGlobal function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112868/new/ https://reviews.llvm.or

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Explanations make sense to me, I'm generally in favor with the 1 concern. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:397 +bool IsIFunc = isa(Alias); llvm::Constant *Aliasee = ibookstein wrote: > erichkeane wrote: > >

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-05 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:320 // linear structure. static const llvm::GlobalValue *getAliasedGlobal(const llvm::GlobalValue *GV) { + const llvm::Constant *C; erichkeane wrote: > Can you explain a bit bett

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:320 // linear structure. static const llvm::GlobalValue *getAliasedGlobal(const llvm::GlobalValue *GV) { + const llvm::Constant *C; Can you explain a bit better how this change h

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. One thing that surprises me is that the test changes are in Sema but the code changes are in CodeGen. I see that this test actually emits LLVM IR. Should it be moved (as an NFC change)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-10-31 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein updated this revision to Diff 383661. ibookstein added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112868/new/ https://reviews.llvm.org/D112868 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/Sema/att

[PATCH] D112868: [Sema] Diagnose and reject non-function ifunc resolvers

2021-10-30 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein created this revision. ibookstein added reviewers: MaskRay, aaron.ballman. ibookstein requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Itay Bookstein Repository: rG LLVM Github Monorepo https://reviews.llvm.or