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 931b3544e34f0455e0ec9fb7bfcf20b9d4deece3..4211b179dce489a9bd1321f7e949ccda6f2fc54a 100644 (file)
@@ -736,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 {