Skip to content

Commit 9abbf31

Browse files
committed
address first part of gysit comments
1 parent f797c34 commit 9abbf31

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,9 @@ convertOperationImpl(Operation &opInst, llvm::IRBuilderBase &builder,
545545
else
546546
llvmValue = moduleTranslation.lookupFunction(function.getName());
547547

548-
auto gv = dyn_cast_or_null<llvm::GlobalValue>(llvmValue);
549-
assert(gv && "expected LLVM IR global value");
550-
moduleTranslation.mapValue(dsoLocalEquivalentOp.getResult(),
551-
llvm::DSOLocalEquivalent::get(gv));
548+
moduleTranslation.mapValue(
549+
dsoLocalEquivalentOp.getResult(),
550+
llvm::DSOLocalEquivalent::get(cast<llvm::GlobalValue>(llvmValue)));
552551
return success();
553552
}
554553

0 commit comments

Comments
 (0)