Skip to content

Commit 440b338

Browse files
committed
Address review feedback
1 parent dc3365a commit 440b338

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ def GetGlobalOp : CIR_Op<"get_global",
12901290
The `cir.get_global` operation retrieves the address pointing to a
12911291
named global variable. If the global variable is marked constant, writing
12921292
to the resulting address (such as through a `cir.store` operation) is
1293-
undefined. Resulting type must always be a `!cir.ptr<...>` type with the
1293+
undefined. The resulting type must always be a `!cir.ptr<...>` type with the
12941294
same address space as the global variable.
12951295

12961296
Example:

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,7 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd,
203203
}
204204

205205
mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) {
206-
mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name);
207-
if (!global)
208-
return nullptr;
209-
return global;
206+
return mlir::SymbolTable::lookupSymbolIn(theModule, name);
210207
}
211208

212209
/// If the specified mangled name is not in the module,

0 commit comments

Comments
 (0)