[llvm-commits] CVS: llvm/lib/Support/Mangler.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 5 15:18:01 PDT 2004
Changes in directory llvm/lib/Support:
Mangler.cpp updated: 1.10 -> 1.11
---
Log message:
Do not mangle intrinsics in any way!
---
Diffs of the changes: (+4 -1)
Index: llvm/lib/Support/Mangler.cpp
diff -u llvm/lib/Support/Mangler.cpp:1.10 llvm/lib/Support/Mangler.cpp:1.11
--- llvm/lib/Support/Mangler.cpp:1.10 Fri Feb 13 18:30:23 2004
+++ llvm/lib/Support/Mangler.cpp Mon Apr 5 15:17:53 2004
@@ -56,13 +56,16 @@
std::string name;
if (V->hasName()) { // Print out the label if it exists...
// Name mangling occurs as follows:
+ // - If V is an intrinsic function, do not change name at all
// - If V is not a global, mangling always occurs.
// - Otherwise, mangling occurs when any of the following are true:
// 1) V has internal linkage
// 2) V's name would collide if it is not mangled.
//
const GlobalValue* gv = dyn_cast<GlobalValue>(V);
- if (gv && !gv->hasInternalLinkage() && !MangledGlobals.count(gv)) {
+ if (gv && isa<Function>(gv) && cast<Function>(gv)->getIntrinsicID()) {
+ name = gv->getName(); // Is an intrinsic function
+ } else if (gv && !gv->hasInternalLinkage() && !MangledGlobals.count(gv)) {
name = makeNameProper(gv->getName());
if (AddUnderscorePrefix) name = "_" + name;
} else {
More information about the llvm-commits
mailing list