aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Mangler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index 44cf778..8c91843 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -105,8 +105,9 @@ std::string Mangler::makeNameProper(const std::string &X,
return Result;
}
-
- Result = X.substr(0, I-X.begin());
+
+ if (NeedPrefix)
+ Result = X.substr(0, I-X.begin());
// Otherwise, construct the string the expensive way.
for (std::string::const_iterator E = X.end(); I != E; ++I) {