[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-03 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433976. junaire added a comment. Update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.h clang/lib/CodeGen/

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433965. junaire added a comment. remove `EmittedDeferredDecls` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.h clang/lib/

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, I understand. So, first off, I wouldn't really call that a "weak" symbol rather than, say, a lazily-emitted symbol; "weak" already has plenty of different senses, and we should try to avoid coining more. Also, your patch description makes it sound like there's

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-02 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Thanks for the prompt reply. We have seen that when there is an inline/weak symbol with no use CodeGen decides not to emit that symbol and moves it into a map. Upon a use it would lazily emit it. However, in cling/clang-repl the use might come on the next line, wh

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You haven't really described the issue you're having. The code looks like it's maintaining a map from symbol names to the `GlobalDecl` from which it'll be emitted; can you explain what Cling wants this for? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433694. junaire added a comment. also swap TBAA Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeG

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433659. junaire added a comment. Fix the unittest failure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Cod

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433624. junaire added a comment. Forget to use helpers again... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/l

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433623. junaire added a comment. Fix the build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGe

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433610. junaire added a comment. Only use heplers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/Cod

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 433607. junaire added a comment. Fix the broken build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126781/new/ https://reviews.llvm.org/D126781 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen

[PATCH] D126781: [CodeGen] Correctly handle weak symbols in the codegen

2022-06-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: v.g.vassilev, rjmccall. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This used to be several downstream patches of Cling, it aims to fix errors