Skip to content

Commit ee6c54a

Browse files
committed
- fixed compile issue
1 parent a9946b1 commit ee6c54a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/Dialect/Triton/Transforms/FunctionTypeConversion.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ FuncArgRenamer::apply(Type type, FunctionOpInterface funcOp, int index,
2323
}
2424
int newIndex = mapping->inputNo;
2525
auto loc = funcOp.getArgument(newIndex).getLoc();
26-
auto baseName = isa<NameLoc>(loc)
27-
? cast<NameLoc>(loc).getName().getValue()
28-
: "arg_" + std::to_string(index);
26+
std::string baseName;
27+
if (isa<NameLoc>(loc)) {
28+
baseName = cast<NameLoc>(loc).getName().getValue();
29+
} else {
30+
baseName = "arg_" + std::to_string(index);
31+
}
2932
assert(out_suffix.size() == mapping->size);
3033
for (auto [i, suffix] : llvm::enumerate(out_suffix)) {
3134
if (!suffix.empty()) {

0 commit comments

Comments
 (0)