diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-17 23:17:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-17 23:17:17 +0000 |
commit | c6faffde6cc16d7f37665c95a6c66272fa20fbc2 (patch) | |
tree | 0cc8b3269b7f90d096d9adf2d0bc27781bc9482e /llvm/lib | |
parent | de3a06933de5b1544f26573029a4efdaf8c982d8 (diff) | |
download | bcm5719-llvm-c6faffde6cc16d7f37665c95a6c66272fa20fbc2.tar.gz bcm5719-llvm-c6faffde6cc16d7f37665c95a6c66272fa20fbc2.zip |
Add prefix only if it is needed.
llvm-svn: 79289
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/Mangler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Mangler.cpp b/llvm/lib/VMCore/Mangler.cpp index 44cf7782662..8c918434e3f 100644 --- a/llvm/lib/VMCore/Mangler.cpp +++ b/llvm/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) { |