Skip to content

Commit 660788f

Browse files
committed
Fix formatting
1 parent bb74dff commit 660788f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite(
8888
// Initializer is a constant floating-point number: convert to MLIR
8989
// builtin constant.
9090
init = rewriter.getFloatAttr(llvmType, fltAttr.getValue());
91-
} else if (const auto intAttr = mlir::dyn_cast<cir::IntAttr>(init.value())) {
91+
} else if (const auto intAttr =
92+
mlir::dyn_cast<cir::IntAttr>(init.value())) {
9293
// Initializer is a constant array: convert it to a compatible llvm init.
9394
init = rewriter.getIntegerAttr(llvmType, intAttr.getValue());
9495
} else {
@@ -101,7 +102,7 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite(
101102
rewriter.replaceOpWithNewOp<mlir::LLVM::GlobalOp>(
102103
op, llvmType, isConst, linkage, symbol, init.value_or(mlir::Attribute()),
103104
alignment, addrSpace, isDsoLocal, isThreadLocal,
104-
/*comdat=*/ mlir::SymbolRefAttr(), attributes);
105+
/*comdat=*/mlir::SymbolRefAttr(), attributes);
105106

106107
return mlir::success();
107108
}
@@ -186,8 +187,8 @@ lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, LLVMContext &llvmCtx) {
186187
llvm::TimeTraceScope translateScope("translateModuleToLLVMIR");
187188

188189
StringRef moduleName = mlirModule.getName().value_or("CIRToLLVMModule");
189-
std::unique_ptr<llvm::Module> llvmModule = mlir::translateModuleToLLVMIR(
190-
mlirModule, llvmCtx, moduleName);
190+
std::unique_ptr<llvm::Module> llvmModule =
191+
mlir::translateModuleToLLVMIR(mlirModule, llvmCtx, moduleName);
191192

192193
if (!llvmModule) {
193194
// FIXME: Handle any errors where they occurs and return a nullptr here.

0 commit comments

Comments
 (0)