summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-12 23:27:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-12 23:27:08 +0000
commit328066513d18acd4e44ad57172c73f1a2a026022 (patch)
tree23393c1f05d2158e1afdea643eebda5fcdfc35cd /lib
parent7107aded170612748f46380f21ec6b71dfaf4910 (diff)
downloadllvm-328066513d18acd4e44ad57172c73f1a2a026022.tar.gz
llvm-328066513d18acd4e44ad57172c73f1a2a026022.tar.bz2
llvm-328066513d18acd4e44ad57172c73f1a2a026022.tar.xz
Remove always true flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCAsmInfo.cpp1
-rw-r--r--lib/Target/Mangler.cpp10
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp
index 73724dbc78..fd822b589a 100644
--- a/lib/MC/MCAsmInfo.cpp
+++ b/lib/MC/MCAsmInfo.cpp
@@ -54,7 +54,6 @@ MCAsmInfo::MCAsmInfo() {
AllowNameToStartWithDigit = false;
AllowPeriodsInName = true;
AllowAtInName = false;
- AllowUTF8 = true;
UseDataRegionDirectives = false;
ZeroDirective = "\t.zero\t";
AsciiDirective = "\t.ascii\t";
diff --git a/lib/Target/Mangler.cpp b/lib/Target/Mangler.cpp
index 1deaf2b115..20f70a375e 100644
--- a/lib/Target/Mangler.cpp
+++ b/lib/Target/Mangler.cpp
@@ -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]);