Work around apparent Apple compiler bug which was making all mangled
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 6 Jul 2004 20:29:05 +0000 (20:29 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 6 Jul 2004 20:29:05 +0000 (20:29 +0000)
names start with l0_.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14651 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Mangler.cpp
lib/VMCore/Mangler.cpp

index 0705c9b608c6cad457e7570d33c4e67331c65edf..4b346871166884ad778930ac3f54172ef5e2631a 100644 (file)
@@ -71,8 +71,8 @@ std::string Mangler::getValueName(const Value *V) {
     } else {
       // Non-global, or global with internal linkage / colliding name
       // -> mangle.
-      name = "l" + utostr(V->getType()->getUniqueID()) + "_" +
-        makeNameProper(V->getName());      
+      unsigned TypeUniqueID = V->getType()->getUniqueID();
+      name = "l" + utostr(TypeUniqueID) + "_" + makeNameProper(V->getName());
     }
   } else {
     name = "ltmp_" + utostr(Count++) + "_"
index 0705c9b608c6cad457e7570d33c4e67331c65edf..4b346871166884ad778930ac3f54172ef5e2631a 100644 (file)
@@ -71,8 +71,8 @@ std::string Mangler::getValueName(const Value *V) {
     } else {
       // Non-global, or global with internal linkage / colliding name
       // -> mangle.
-      name = "l" + utostr(V->getType()->getUniqueID()) + "_" +
-        makeNameProper(V->getName());      
+      unsigned TypeUniqueID = V->getType()->getUniqueID();
+      name = "l" + utostr(TypeUniqueID) + "_" + makeNameProper(V->getName());
     }
   } else {
     name = "ltmp_" + utostr(Count++) + "_"