Index: src/IceTargetLoweringARM32.cpp |
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp |
index e3f46eafd72cde5c683b64d37ca2bdf668ac3b0c..9b76976586f6406d8eb494dfbcec724078b92baa 100644 |
--- a/src/IceTargetLoweringARM32.cpp |
+++ b/src/IceTargetLoweringARM32.cpp |
@@ -908,15 +908,19 @@ IceString TargetARM32::createGotoffRelocation(const ConstantRelocatable *CR) { |
"GOTOFF$" + Func->getFunctionName() + "$" + CRName; |
if (KnownGotoffs.count(CRGotoffName) == 0) { |
constexpr bool SuppressMangling = true; |
- auto *Global = VariableDeclaration::create(Ctx, SuppressMangling); |
+ auto *Global = |
+ VariableDeclaration::create(Func->getGlobalPool(), SuppressMangling); |
Global->setIsConstant(true); |
Global->setName(CRName); |
+ Func->getGlobalPool()->willNotBeEmitted(Global); |
- auto *Gotoff = VariableDeclaration::create(Ctx, SuppressMangling); |
+ auto *Gotoff = |
+ VariableDeclaration::create(Func->getGlobalPool(), SuppressMangling); |
constexpr auto GotFixup = R_ARM_GOTOFF32; |
Gotoff->setIsConstant(true); |
Gotoff->addInitializer(VariableDeclaration::RelocInitializer::create( |
- Global, {RelocOffset::create(Ctx, 0)}, GotFixup)); |
+ Func->getGlobalPool(), Global, {RelocOffset::create(Ctx, 0)}, |
+ GotFixup)); |
Gotoff->setName(CRGotoffName); |
Func->addGlobal(Gotoff); |
KnownGotoffs.emplace(CRGotoffName); |