r271221 - CodeGen: address post-commit review comments

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 11:26:07 PDT 2016


Author: compnerd
Date: Mon May 30 13:26:06 2016
New Revision: 271221

URL: http://llvm.org/viewvc/llvm-project?rev=271221&view=rev
Log:
CodeGen: address post-commit review comments

David Majnemer pointed out that isOSBinFormatMachO is more compact.  NFC.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=271221&r1=271220&r2=271221&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon May 30 13:26:06 2016
@@ -3147,7 +3147,7 @@ CodeGenModule::GetAddrOfConstantCFString
   // 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");
 




More information about the cfe-commits mailing list