<p dir="ltr">Lgtm </p>
<div class="gmail_quote">On Jul 6, 2015 11:06 AM, "Daniel Sanders" <<a href="mailto:daniel.sanders@imgtec.com">daniel.sanders@imgtec.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
dsanders added subscribers: rengolin, llvm-commits.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10960&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=0xkx8Z5TGu_uvm6i5w-Wvb9yUUsUtHOK5YXCc8Q4LnM&s=_ShphKtuxVzEKBXXtj7FJ2Q-LSzsoj_qUiD_flv1qas&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10960</a><br>
<br>
Files:<br>
  lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp<br>
  lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
  lib/Target/ARM/ARMTargetMachine.cpp<br>
  lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp<br>
  lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
<br>
Index: lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
===================================================================<br>
--- lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
+++ lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp<br>
@@ -231,7 +231,7 @@<br>
 static MCTargetStreamer *<br>
 createObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) {<br>
   const Triple &TT = STI.getTargetTriple();<br>
-  if (TT.getObjectFormat() == Triple::ELF)<br>
+  if (TT.isOSBinFormatELF())<br>
     return new PPCTargetELFStreamer(S);<br>
   return new PPCTargetMachOStreamer(S);<br>
 }<br>
Index: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp<br>
===================================================================<br>
--- lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp<br>
+++ lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp<br>
@@ -1362,7 +1362,7 @@<br>
 MCTargetStreamer *createARMObjectTargetStreamer(MCStreamer &S,<br>
                                                 const MCSubtargetInfo &STI) {<br>
   const Triple &TT = STI.getTargetTriple();<br>
-  if (TT.getObjectFormat() == Triple::ELF)<br>
+  if (TT.isOSBinFormatELF())<br>
     return new ARMTargetELFStreamer(S);<br>
   return new ARMTargetStreamer(S);<br>
 }<br>
Index: lib/Target/ARM/ARMTargetMachine.cpp<br>
===================================================================<br>
--- lib/Target/ARM/ARMTargetMachine.cpp<br>
+++ lib/Target/ARM/ARMTargetMachine.cpp<br>
@@ -80,8 +80,7 @@<br>
   // FIXME: This is duplicated code from the front end and should be unified.<br>
   if (TT.isOSBinFormatMachO()) {<br>
     if (TT.getEnvironment() == llvm::Triple::EABI ||<br>
-        (TT.getOS() == llvm::Triple::UnknownOS &&<br>
-         TT.getObjectFormat() == llvm::Triple::MachO) ||<br>
+        (TT.getOS() == llvm::Triple::UnknownOS && TT.isOSBinFormatMachO()) ||<br>
         CPU.startswith("cortex-m")) {<br>
       TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS;<br>
     } else {<br>
@@ -104,8 +103,8 @@<br>
       TargetABI = ARMBaseTargetMachine::ARM_ABI_APCS;<br>
       break;<br>
     default:<br>
-      if (TT.getOS() == llvm::Triple::NetBSD)<br>
-       TargetABI = ARMBaseTargetMachine::ARM_ABI_APCS;<br>
+      if (TT.isOSNetBSD())<br>
+        TargetABI = ARMBaseTargetMachine::ARM_ABI_APCS;<br>
       else<br>
        TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS;<br>
       break;<br>
Index: lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
===================================================================<br>
--- lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
+++ lib/Target/ARM/ARMBaseInstrInfo.cpp<br>
@@ -1230,8 +1230,7 @@<br>
   Reloc::Model RM = MF.getTarget().getRelocationModel();<br>
<br>
   if (MI->getOpcode() == TargetOpcode::LOAD_STACK_GUARD) {<br>
-    assert(getSubtarget().getTargetTriple().getObjectFormat() ==<br>
-           Triple::MachO &&<br>
+    assert(getSubtarget().getTargetTriple().isOSBinFormatMachO() &&<br>
            "LOAD_STACK_GUARD currently supported only for MachO.");<br>
     expandLoadStackGuard(MI, RM);<br>
     MI->getParent()->erase(MI);<br>
Index: lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp<br>
===================================================================<br>
--- lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp<br>
+++ lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp<br>
@@ -199,7 +199,7 @@<br>
 MCTargetStreamer *<br>
 createAArch64ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) {<br>
   const Triple &TT = STI.getTargetTriple();<br>
-  if (TT.getObjectFormat() == Triple::ELF)<br>
+  if (TT.isOSBinFormatELF())<br>
     return new AArch64TargetELFStreamer(S);<br>
   return nullptr;<br>
 }<br>
<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div>