mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Remove always true flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,13 +23,13 @@
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
||||
static bool isAcceptableChar(char C, bool AllowPeriod, bool AllowUTF8) {
|
||||
static bool isAcceptableChar(char C, bool AllowPeriod) {
|
||||
if ((C < 'a' || C > 'z') &&
|
||||
(C < 'A' || C > 'Z') &&
|
||||
(C < '0' || C > '9') &&
|
||||
C != '_' && C != '$' && C != '@' &&
|
||||
!(AllowPeriod && C == '.') &&
|
||||
!(AllowUTF8 && (C & 0x80)))
|
||||
!(C & 0x80))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -58,9 +58,8 @@ static bool NameNeedsEscaping(StringRef Str, const MCAsmInfo *MAI) {
|
||||
// If any of the characters in the string is an unacceptable character, force
|
||||
// quotes.
|
||||
bool AllowPeriod = MAI->doesAllowPeriodsInName();
|
||||
bool AllowUTF8 = MAI->doesAllowUTF8();
|
||||
for (unsigned i = 0, e = Str.size(); i != e; ++i)
|
||||
if (!isAcceptableChar(Str[i], AllowPeriod, AllowUTF8))
|
||||
if (!isAcceptableChar(Str[i], AllowPeriod))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -77,9 +76,8 @@ static void appendMangledName(SmallVectorImpl<char> &OutName, StringRef Str,
|
||||
}
|
||||
|
||||
bool AllowPeriod = MAI->doesAllowPeriodsInName();
|
||||
bool AllowUTF8 = MAI->doesAllowUTF8();
|
||||
for (unsigned i = 0, e = Str.size(); i != e; ++i) {
|
||||
if (!isAcceptableChar(Str[i], AllowPeriod, AllowUTF8))
|
||||
if (!isAcceptableChar(Str[i], AllowPeriod))
|
||||
MangleLetter(OutName, Str[i]);
|
||||
else
|
||||
OutName.push_back(Str[i]);
|
||||
|
Reference in New Issue
Block a user