Skip to content

Commit 4e30dcc

Browse files
committed
[MLIR] Apply clang-tidy fixes for llvm-else-after-return in SelectObjectAttr.cpp (NFC)
1 parent 346f48e commit 4e30dcc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mlir/lib/Target/LLVMIR/Dialect/GPU/SelectObjectAttr.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,12 @@ static LogicalResult embedBinaryImpl(StringRef moduleName,
147147
"mgpuModuleLoadJIT", FunctionType::get(ptrTy, {ptrTy, i32Ty}, false));
148148
Constant *optValue = ConstantInt::get(i32Ty, optLevel);
149149
return builder.CreateCall(moduleLoadFn, {serializedObj, optValue});
150-
} else {
151-
FunctionCallee moduleLoadFn = module.getOrInsertFunction(
152-
"mgpuModuleLoad", FunctionType::get(ptrTy, {ptrTy, i64Ty}, false));
153-
Constant *binarySize =
154-
ConstantInt::get(i64Ty, serializedStr.size() + (addNull ? 1 : 0));
155-
return builder.CreateCall(moduleLoadFn, {serializedObj, binarySize});
156150
}
151+
FunctionCallee moduleLoadFn = module.getOrInsertFunction(
152+
"mgpuModuleLoad", FunctionType::get(ptrTy, {ptrTy, i64Ty}, false));
153+
Constant *binarySize =
154+
ConstantInt::get(i64Ty, serializedStr.size() + (addNull ? 1 : 0));
155+
return builder.CreateCall(moduleLoadFn, {serializedObj, binarySize});
157156
}();
158157
builder.CreateStore(moduleObj, modulePtr);
159158
builder.CreateRetVoid();

0 commit comments

Comments
 (0)