[llvm-commits] [gcc-plugin] r75339 - /gcc-plugin/trunk/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Fri Jul 10 20:49:07 PDT 2009


Author: baldrick
Date: Fri Jul 10 22:49:07 2009
New Revision: 75339

URL: http://llvm.org/viewvc/llvm-project?rev=75339&view=rev
Log:
Forgot these writable-string hunks.

Modified:
    gcc-plugin/trunk/llvm-convert.cpp

Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=75339&r1=75338&r2=75339&view=diff

==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Fri Jul 10 22:49:07 2009
@@ -7797,8 +7797,7 @@
 
   // Create a new string global.
   const TargetAsmInfo *TAI = TheTarget->getTargetAsmInfo();
-  GlobalVariable *GV = new GlobalVariable(*TheModule, Init->getType(), 
-                                          StringIsConstant,
+  GlobalVariable *GV = new GlobalVariable(*TheModule, Init->getType(), true,
                                           GlobalVariable::InternalLinkage, Init,
                                            TAI ? 
                                             TAI->getStringConstantPrefix() : 
@@ -7810,14 +7809,8 @@
 #ifdef LLVM_CSTRING_SECTION
   // For Darwin, try to put it into the .cstring section.
   if (TAI && TAI->SectionKindForGlobal(GV) == SectionKind::RODataMergeStr)
-    // RODataMergeStr implies that StringIsConstant will be true here.
     // The Darwin linker will coalesce strings in this section.
     GV->setSection(LLVM_CSTRING_SECTION);
-#ifdef LLVM_CONST_DATA_SECTION
-  else if (!StringIsConstant)
-    // .const_data ("__DATA, __const" on Darwin).
-    GV->setSection(LLVM_CONST_DATA_SECTION);
-#endif	// LLVM_CONST_DATA_SECTION
 #endif	// LLVM_CSTRING_SECTION
   return GV;
 }





More information about the llvm-commits mailing list