[llvm-commits] [llvm-gcc-4.2] r51912 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Dale Johannesen dalej at apple.com
Tue Jun 3 11:16:19 PDT 2008


Author: johannes
Date: Tue Jun  3 13:16:19 2008
New Revision: 51912

URL: http://llvm.org/viewvc/llvm-project?rev=51912&view=rev
Log:
Use StringConstantPrefix to control the names of
constant strings in the IR.


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

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=51912&r1=51911&r2=51912&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jun  3 13:16:19 2008
@@ -6604,9 +6604,12 @@
   }
     
   // Create a new string global.
+  const TargetAsmInfo *TAI = TheTarget->getTargetAsmInfo();
   GlobalVariable *GV = new GlobalVariable(Init->getType(), StringIsConstant,
-                                          GlobalVariable::InternalLinkage,
-                                          Init, ".str", TheModule);
+                                          GlobalVariable::InternalLinkage, Init,
+                                           TAI ? 
+                                            TAI->getStringConstantPrefix() : 
+                                            ".str", TheModule);
   if (SlotP) *SlotP = GV;
   return GV;
 }





More information about the llvm-commits mailing list