[clang] [CIR] Add addLLVMUsed and addLLVMCompilerUsed methods to CIRGenModule (PR #188189)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 03:02:01 PDT 2026
================
@@ -658,13 +658,33 @@ void CIRGenModule::setCommonAttributes(GlobalDecl gd, mlir::Operation *gv) {
if (isa_and_nonnull<NamedDecl>(d))
setGVProperties(gv, dyn_cast<NamedDecl>(d));
assert(!cir::MissingFeatures::defaultVisibility());
- assert(!cir::MissingFeatures::opGlobalUsedOrCompilerUsed());
+
+ if (auto globalOp = mlir::dyn_cast<cir::GlobalOp>(gv)) {
----------------
skc7 wrote:
Thanks for feedback @andykaylor
Updated the patch to accept CIRGlobalValueInterface for globals/funcOp.
https://github.com/llvm/llvm-project/pull/188189
More information about the cfe-commits
mailing list