diff options
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
| -rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 2a2fa9e54325..8f5d770f6651 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -27,7 +27,7 @@  #include "llvm/MC/MCStreamer.h"  #include "llvm/MC/MCSymbol.h"  #include "llvm/Target/Mangler.h" -#include "llvm/Target/TargetData.h" +#include "llvm/DataLayout.h"  #include "llvm/Target/TargetMachine.h"  #include "llvm/Target/TargetOptions.h"  #include "llvm/Support/Dwarf.h" @@ -77,9 +77,9 @@ void TargetLoweringObjectFileELF::emitPersonalityValue(MCStreamer &Streamer,                                                      Flags,                                                      SectionKind::getDataRel(),                                                      0, Label->getName()); -  unsigned Size = TM.getTargetData()->getPointerSize(); +  unsigned Size = TM.getDataLayout()->getPointerSize();    Streamer.SwitchSection(Sec); -  Streamer.EmitValueToAlignment(TM.getTargetData()->getPointerABIAlignment()); +  Streamer.EmitValueToAlignment(TM.getDataLayout()->getPointerABIAlignment());    Streamer.EmitSymbolAttribute(Label, MCSA_ELF_TypeObject);    const MCExpr *E = MCConstantExpr::Create(Size, getContext());    Streamer.EmitELFSize(Label, E); @@ -247,7 +247,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,      // FIXME: this is getting the alignment of the character, not the      // alignment of the global!      unsigned Align = -      TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)); +      TM.getDataLayout()->getPreferredAlignment(cast<GlobalVariable>(GV));      const char *SizeSpec = ".rodata.str1.";      if (Kind.isMergeable2ByteCString()) @@ -522,14 +522,14 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,    // FIXME: Alignment check should be handled by section classifier.    if (Kind.isMergeable1ByteCString() && -      TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32) +      TM.getDataLayout()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32)      return CStringSection;    // Do not put 16-bit arrays in the UString section if they have an    // externally visible label, this runs into issues with certain linker    // versions.    if (Kind.isMergeable2ByteCString() && !GV->hasExternalLinkage() && -      TM.getTargetData()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32) +      TM.getDataLayout()->getPreferredAlignment(cast<GlobalVariable>(GV)) < 32)      return UStringSection;    if (Kind.isMergeableConst()) { | 
