Skip to content

Commit 87afe4d

Browse files
authored
OMPIRBuilder: Cleanup checking for GlobalValue (#134583)
GlobalValue already subsumes GlobalObject and GlobalVariable, plus make use of the std::get<0> already copied to a variable above.
1 parent 7073676 commit 87afe4d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7092,9 +7092,7 @@ static Expected<Function *> createOutlinedFunction(
70927092
// preceding mapped arguments that refer to the same global that may be
70937093
// seperate segments. To prevent this, we defer global processing until all
70947094
// other processing has been performed.
7095-
if (llvm::isa<llvm::GlobalValue>(std::get<0>(InArg)) ||
7096-
llvm::isa<llvm::GlobalObject>(std::get<0>(InArg)) ||
7097-
llvm::isa<llvm::GlobalVariable>(std::get<0>(InArg))) {
7095+
if (isa<GlobalValue>(Input)) {
70987096
DeferredReplacement.push_back(std::make_pair(Input, InputCopy));
70997097
continue;
71007098
}

0 commit comments

Comments
 (0)