summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/EmitAssembly.cpp
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-10-30 20:16:38 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-10-30 20:16:38 +0000
commit9f205ddfdd4846f64aaa75e1d33b00b028d679fe (patch)
tree4f4ef3f55dae854e3c3ed8e9cbdf9e1f0472f4fd /llvm/lib/Target/Sparc/EmitAssembly.cpp
parent6c34c0baf503bccb32b343e016de39aa5d8bc665 (diff)
downloadbcm5719-llvm-9f205ddfdd4846f64aaa75e1d33b00b028d679fe.tar.gz
bcm5719-llvm-9f205ddfdd4846f64aaa75e1d33b00b028d679fe.zip
In getID(), don't call getValidSymbolName to mangle external names!
llvm-svn: 4451
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r--llvm/lib/Target/Sparc/EmitAssembly.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index 73f87f83d4b..0357c597039 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -139,9 +139,9 @@ public:
//
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 @@ public:
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...
OpenPOWER on IntegriCloud