[llvm-commits] CVS: llvm/lib/Target/Sparc/EmitAssembly.cpp

Vikram Adve vadve at cs.uiuc.edu
Wed Oct 30 14:17:00 PST 2002


Changes in directory llvm/lib/Target/Sparc:

EmitAssembly.cpp updated: 1.69 -> 1.70

---
Log message:

In getID(), don't call getValidSymbolName to mangle external names!


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/EmitAssembly.cpp
diff -u llvm/lib/Target/Sparc/EmitAssembly.cpp:1.69 llvm/lib/Target/Sparc/EmitAssembly.cpp:1.70
--- llvm/lib/Target/Sparc/EmitAssembly.cpp:1.69	Tue Oct 29 11:35:41 2002
+++ llvm/lib/Target/Sparc/EmitAssembly.cpp	Wed Oct 30 14:16:38 2002
@@ -139,9 +139,9 @@
   //
   string getID(const Value *V, const char *Prefix, const char *FPrefix = 0) {
     string Result = FPrefix ? FPrefix : "";  // "Forced prefix"
-    
+
     Result +=  V->hasName() ? V->getName() : string(Prefix);
-    
+
     // Qualify all internal names with a unique id.
     if (!isExternal(V)) {
       int valId = idTable->Table.getValSlot(V);
@@ -153,9 +153,12 @@
           valId = I->second;
       }
       Result = Result + "_" + itostr(valId);
+
+      // Replace or prefix problem characters in the name
+      Result = getValidSymbolName(Result);
     }
-    
-    return getValidSymbolName(Result);
+
+    return Result;
   }
   
   // getID Wrappers - Ensure consistent usage...





More information about the llvm-commits mailing list