| Index: src/IceTargetLoweringX8632.cpp
|
| diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
|
| index 2836865e1e3cb39891a8b6383fb10d303b9236df..588725039f61b73b9df60cd52b39c674c751ad30 100644
|
| --- a/src/IceTargetLoweringX8632.cpp
|
| +++ b/src/IceTargetLoweringX8632.cpp
|
| @@ -4564,21 +4564,15 @@ TargetGlobalX8632::TargetGlobalX8632(GlobalContext *Ctx)
|
| : TargetGlobalLowering(Ctx) {}
|
|
|
| void TargetGlobalX8632::lowerInit(const VariableDeclaration &Var) const {
|
| - // TODO(jvoung): handle this without text.
|
| - if (Ctx->getFlags().UseELFWriter)
|
| - return;
|
| -
|
| - Ostream &Str = Ctx->getStrEmit();
|
| -
|
| - const VariableDeclaration::InitializerListType &Initializers =
|
| - Var.getInitializers();
|
| -
|
| // If external and not initialized, this must be a cross test.
|
| // Don't generate a declaration for such cases.
|
| bool IsExternal = Var.isExternal() || Ctx->getFlags().DisableInternal;
|
| if (IsExternal && !Var.hasInitializer())
|
| return;
|
|
|
| + Ostream &Str = Ctx->getStrEmit();
|
| + const VariableDeclaration::InitializerListType &Initializers =
|
| + Var.getInitializers();
|
| bool HasNonzeroInitializer = Var.hasNonzeroInitializer();
|
| bool IsConstant = Var.getIsConstant();
|
| uint32_t Align = Var.getAlignment();
|
| @@ -4645,6 +4639,12 @@ void TargetGlobalX8632::lowerInit(const VariableDeclaration &Var) const {
|
| Str << "\t.size\t" << MangledName << ", " << Size << "\n";
|
| }
|
|
|
| +void
|
| +TargetGlobalX8632::lowerInitELF(const VariableDeclarationList &Vars) const {
|
| + ELFObjectWriter *Writer = Ctx->getObjectWriter();
|
| + Writer->writeDataSection(Vars, llvm::ELF::R_386_32);
|
| +}
|
| +
|
| template <typename T> struct PoolTypeConverter {};
|
|
|
| template <> struct PoolTypeConverter<float> {
|
|
|