[Mlir-commits] [mlir] [mlir][LLVM] Preserve !associated and !absolute_symbol on llvm.mlir.global (PR #218839)
Tanishq Khurana
llvmlistbot at llvm.org
Sun Aug 30 01:09:32 PDT 2026
================
@@ -1701,10 +1701,17 @@ LogicalResult ModuleImport::convertGlobal(llvm::GlobalVariable *globalVar) {
if (llvm::MDNode *associatedMD =
globalVar->getMetadata(llvm::LLVMContext::MD_associated)) {
- if (associatedMD->getNumOperands() == 1) {
- if (FlatSymbolRefAttr symbolRef =
- getMetadataOperandSymbolRef(associatedMD->getOperand(0).get()))
- globalOp.setAssociatedAttr(symbolRef);
+ FlatSymbolRefAttr symbolRef;
+ if (associatedMD->getNumOperands() == 1)
+ symbolRef =
+ getMetadataOperandSymbolRef(associatedMD->getOperand(0).get());
+ if (symbolRef) {
----------------
ktanishqk wrote:
good shout! i've fixed this
https://github.com/llvm/llvm-project/pull/218839
More information about the Mlir-commits
mailing list