[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2022-08-18 Thread Jan Köster via Phabricator via cfe-commits
Tuxist added a comment. Herald added a project: All. i have a problem i'am implement a libc in c++ i can't export now __dso_handle as weak so I can't link other shared libs against my libc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-07 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb31f41e78b27: [Clang] Support a user-defined __dso_handle (authored by asavonic). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Great, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.llvm.org/D101156 ___ cfe-commits mailing list c

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-06 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4425 + if (ReplaceInitWithGV) +Init = llvm::ConstantExpr::getBitCast(GV, GV->getValueType()); + rjmccall wrote: > Can we actually do this bitcast for arbitrary initializers? Thi

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-06 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 350134. asavonic edited the summary of this revision. asavonic added a comment. - Used `llvm::TrackingVH` to track Init changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.llvm.org/D101156 Files: clang/lib/CodeGen/

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4425 + if (ReplaceInitWithGV) +Init = llvm::ConstantExpr::getBitCast(GV, GV->getValueType()); + Can we actually do this bitcast for arbitrary initializers? This seems problemat

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-06-03 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.llvm.org/D101156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-05-24 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. I went ahead and implemented a fix for EmitGlobalVarDefinition. Please let me know what approach is preferable: Diff 339986 or Diff 347341. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.llvm.or

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-05-24 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic updated this revision to Diff 347341. asavonic edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ https://reviews.llvm.org/D101156 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGen

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-05-12 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In D101156#2724789 , @rjmccall wrote: > What's the crash exactly/ Is IRGen just unhappy about processing the user > definition when we've generated a declaration with a different type? Because > we're already supposed to be b

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-04-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What's the crash exactly/ Is IRGen just unhappy about processing the user definition when we've generated a declaration with a different type? Because we're already supposed to be being cautious about this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-04-23 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. John, can you please review this patch? I originally wanted to add a diagnostic to prevent the crash in CG (PR49198), but the case seems easy enough to support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101156/new/ ht

[PATCH] D101156: [Clang] Support a user-defined __dso_handle

2021-04-23 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. asavonic requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes PR49198: Wrong usage of __dso_handle in user code leads to a compiler crash. `__dso_handle` variable is now created with a prefix to avoid