Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,8 @@ void CIRGenModule::emitAliasForGlobal(StringRef mangledName,

// Switch any previous uses to the alias.
if (op) {
llvm_unreachable("NYI");
op->replaceAllUsesWith(alias);
op->erase();
} else {
// Name already set by createCIRFunction
}
Expand Down
5 changes: 4 additions & 1 deletion mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,16 +1177,19 @@ LogicalResult CallOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
return emitOpError()
<< "'" << calleeName.getValue()
<< "' does not reference a symbol in the current scope";

if (auto fn = dyn_cast<LLVMFuncOp>(callee)) {
if (failed(verifyCallOpDebugInfo(*this, fn)))
return failure();
fnType = fn.getFunctionType();
} else if (auto ifunc = dyn_cast<IFuncOp>(callee)) {
fnType = ifunc.getIFuncType();
} else if (auto aliasFn = dyn_cast<AliasOp>(callee)){
fnType = aliasFn.getType();
} else {
return emitOpError()
<< "'" << calleeName.getValue()
<< "' does not reference a valid LLVM function or IFunc";
<< "' does not reference a valid LLVM function or IFunc or Alias";
}
}

Expand Down
Loading