diff options
Diffstat (limited to 'lib/Target/Mangler.cpp')
-rw-r--r-- | lib/Target/Mangler.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Target/Mangler.cpp b/lib/Target/Mangler.cpp index 5430d50945..c41a0f3591 100644 --- a/lib/Target/Mangler.cpp +++ b/lib/Target/Mangler.cpp @@ -47,14 +47,9 @@ void Mangler::getNameWithPrefix(SmallVectorImpl<char> &OutName, } - const char *Prefix = MAI->getGlobalPrefix(); - if (Prefix[0] == 0) - ; // Common noop, no prefix. - else if (Prefix[1] == 0) - OutName.push_back(Prefix[0]); // Common, one character prefix. - else - // Arbitrary length prefix. - OutName.append(Prefix, Prefix+strlen(Prefix)); + char Prefix = MAI->getGlobalPrefix(); + if (Prefix != '\0') + OutName.push_back(Prefix); } // If this is a simple string that doesn't need escaping, just append it. |