diff --git a/lib/Support/Mangler.cpp b/lib/Support/Mangler.cpp index 0705c9b608c..4b346871166 100644 --- a/lib/Support/Mangler.cpp +++ b/lib/Support/Mangler.cpp @@ -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++) + "_" diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 0705c9b608c..4b346871166 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -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++) + "_"