summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StaticDataSplitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/StaticDataSplitter.cpp')
-rw-r--r--llvm/lib/CodeGen/StaticDataSplitter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/StaticDataSplitter.cpp b/llvm/lib/CodeGen/StaticDataSplitter.cpp
index e22dc2507d54..97aa833cf14f 100644
--- a/llvm/lib/CodeGen/StaticDataSplitter.cpp
+++ b/llvm/lib/CodeGen/StaticDataSplitter.cpp
@@ -133,8 +133,7 @@ StaticDataSplitter::getConstant(const MachineOperand &Op,
// Skip 'llvm.'-prefixed global variables conservatively because they are
// often handled specially, and skip those not in static data
// sections.
- if (!GV || GV->getName().starts_with("llvm.") ||
- !inStaticDataSection(*GV, TM))
+ if (!GV || llvm::IsReservedGlobalVariable(*GV) || !inStaticDataSection(*GV, TM))
return nullptr;
return GV;
}