Remove always true flag.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Nov 2013 23:27:08 +0000 (23:27 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Nov 2013 23:27:08 +0000 (23:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194530 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAsmInfo.h
lib/MC/MCAsmInfo.cpp
lib/Target/Mangler.cpp

index 0c2bc4ca81f83ef4f7983db3eb2ad6629ca27d29..3da3a31b5fdce0c7bc6e64a3ed8bff45a3f7384c 100644 (file)
@@ -160,10 +160,6 @@ namespace llvm {
     /// names. Defaults to false.
     bool AllowAtInName;
 
     /// names. Defaults to false.
     bool AllowAtInName;
 
-    /// AllowUTF8 - This is true if the assembler accepts UTF-8 input.
-    // FIXME: Make this a more general encoding setting?
-    bool AllowUTF8;
-
     /// UseDataRegionDirectives - This is true if data region markers should
     /// be printed as ".data_region/.end_data_region" directives. If false,
     /// use "$d/$a" labels instead.
     /// UseDataRegionDirectives - This is true if data region markers should
     /// be printed as ".data_region/.end_data_region" directives. If false,
     /// use "$d/$a" labels instead.
@@ -483,9 +479,6 @@ namespace llvm {
     bool doesAllowAtInName() const {
       return AllowAtInName;
     }
     bool doesAllowAtInName() const {
       return AllowAtInName;
     }
-    bool doesAllowUTF8() const {
-      return AllowUTF8;
-    }
     bool doesSupportDataRegionDirectives() const {
       return UseDataRegionDirectives;
     }
     bool doesSupportDataRegionDirectives() const {
       return UseDataRegionDirectives;
     }
index 73724dbc780671470b8337a26fec490d7a825dfa..fd822b589a7fac67686327ea612cb87bd1a2608d 100644 (file)
@@ -54,7 +54,6 @@ MCAsmInfo::MCAsmInfo() {
   AllowNameToStartWithDigit = false;
   AllowPeriodsInName = true;
   AllowAtInName = false;
   AllowNameToStartWithDigit = false;
   AllowPeriodsInName = true;
   AllowAtInName = false;
-  AllowUTF8 = true;
   UseDataRegionDirectives = false;
   ZeroDirective = "\t.zero\t";
   AsciiDirective = "\t.ascii\t";
   UseDataRegionDirectives = false;
   ZeroDirective = "\t.zero\t";
   AsciiDirective = "\t.ascii\t";
index 1deaf2b115642e8cd9c170508a0650f268b2a698..20f70a375ee40acb29dfa498bb0eae4ae8196400 100644 (file)
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
 #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 == '.') &&
   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;
 }
     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();
   // 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)
   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;
 }
       return true;
   return false;
 }
@@ -77,9 +76,8 @@ static void appendMangledName(SmallVectorImpl<char> &OutName, StringRef Str,
   }
 
   bool AllowPeriod = MAI->doesAllowPeriodsInName();
   }
 
   bool AllowPeriod = MAI->doesAllowPeriodsInName();
-  bool AllowUTF8 = MAI->doesAllowUTF8();
   for (unsigned i = 0, e = Str.size(); i != e; ++i) {
   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]);
       MangleLetter(OutName, Str[i]);
     else
       OutName.push_back(Str[i]);