mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
The global prefix is always one char. Don't use a string for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user