]> granicus.if.org Git - clang/commitdiff
CodeGen: address post-commit review comments
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 30 May 2016 18:26:06 +0000 (18:26 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 30 May 2016 18:26:06 +0000 (18:26 +0000)
David Majnemer pointed out that isOSBinFormatMachO is more compact.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271221 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index cd278e65c15d66b85d90f5d5fb6bdd00b28afede..eb3adcb6e7d410514aedcf7659a492134ada2abb 100644 (file)
@@ -3147,7 +3147,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
   // FIXME: We set the section explicitly to avoid a bug in ld64 224.1.
   // Without it LLVM can merge the string with a non unnamed_addr one during
   // LTO.  Doing that changes the section it ends in, which surprises ld64.
-  if (getTarget().getTriple().getObjectFormat() == llvm::Triple::MachO)
+  if (getTarget().getTriple().isOSBinFormatMachO())
     GV->setSection(isUTF16 ? "__TEXT,__ustring"
                            : "__TEXT,__cstring,cstring_literals");