DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc
[oota-llvm.git] / lib / MC / MCObjectFileInfo.cpp
index a160f298e180dfbb6f5274106f8f417a372ae4f2..4211b179dce489a9bd1321f7e949ccda6f2fc54a 100644 (file)
@@ -79,16 +79,10 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
                            MCSectionMachO::S_8BYTE_LITERALS,
                            SectionKind::getMergeableConst8());
 
-  // ld_classic doesn't support .literal16 in 32-bit mode, and ld64 falls back
-  // to using it in -static mode.
-  SixteenByteConstantSection = 0;
-  if (RelocM != Reloc::Static &&
-      T.getArch() != Triple::x86_64 && T.getArch() != Triple::ppc64 &&
-      T.getArch() != Triple::ppc64le)
-    SixteenByteConstantSection =   // .literal16
-      Ctx->getMachOSection("__TEXT", "__literal16",
-                           MCSectionMachO::S_16BYTE_LITERALS,
-                           SectionKind::getMergeableConst16());
+  SixteenByteConstantSection // .literal16
+      = Ctx->getMachOSection("__TEXT", "__literal16",
+                             MCSectionMachO::S_16BYTE_LITERALS,
+                             SectionKind::getMergeableConst16());
 
   ReadOnlySection  // .const
     = Ctx->getMachOSection("__TEXT", "__const", 0,
@@ -742,13 +736,11 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
        Arch == Triple::arm || Arch == Triple::thumb ||
        Arch == Triple::ppc || Arch == Triple::ppc64 ||
        Arch == Triple::UnknownArch) &&
-      (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) {
+      (T.isOSDarwin() || T.isOSBinFormatMachO())) {
     Env = IsMachO;
     InitMachOMCObjectFileInfo(T);
   } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) &&
-             (T.getEnvironment() != Triple::ELF) &&
-             (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin ||
-              T.getOS() == Triple::Win32)) {
+             T.getObjectFormat() != Triple::ELF && T.isOSWindows()) {
     Env = IsCOFF;
     InitCOFFMCObjectFileInfo(T);
   } else {