[llvm] r235672 - Revert accidentally committed "MC: Allow targets to stop symbol name quoting"
Matt Arsenault
Matthew.Arsenault at amd.com
Thu Apr 23 16:34:52 PDT 2015
Author: arsenm
Date: Thu Apr 23 18:34:51 2015
New Revision: 235672
URL: http://llvm.org/viewvc/llvm-project?rev=235672&view=rev
Log:
Revert accidentally committed "MC: Allow targets to stop symbol name quoting"
Modified:
llvm/trunk/include/llvm/MC/MCAsmInfo.h
llvm/trunk/include/llvm/MC/MCSymbol.h
llvm/trunk/lib/MC/MCAsmInfo.cpp
llvm/trunk/lib/MC/MCContext.cpp
llvm/trunk/lib/MC/MCSymbol.cpp
Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=235672&r1=235671&r2=235672&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Thu Apr 23 18:34:51 2015
@@ -155,9 +155,6 @@ protected:
/// Defaults to false.
bool AllowAtInName;
- /// If this is true, symbol names will not attempt to be quoted when printed.
- bool NoSymbolNameQuoting;
-
/// This is true if data region markers should be printed as
/// ".data_region/.end_data_region" directives. If false, use "$d/$a" labels
/// instead.
@@ -455,7 +452,6 @@ public:
const char *getCode64Directive() const { return Code64Directive; }
unsigned getAssemblerDialect() const { return AssemblerDialect; }
bool doesAllowAtInName() const { return AllowAtInName; }
- bool noSymbolNameQuoting() const { return NoSymbolNameQuoting; }
bool doesSupportDataRegionDirectives() const {
return UseDataRegionDirectives;
}
Modified: llvm/trunk/include/llvm/MC/MCSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSymbol.h?rev=235672&r1=235671&r2=235672&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSymbol.h (original)
+++ llvm/trunk/include/llvm/MC/MCSymbol.h Thu Apr 23 18:34:51 2015
@@ -55,10 +55,6 @@ namespace llvm {
/// "Lfoo" or ".foo".
unsigned IsTemporary : 1;
- /// True if the name should be quoted if "unacceptable" characters are used
- /// in the name.
- unsigned NoQuoting : 1;
-
/// \brief True if this symbol can be redefined.
unsigned IsRedefinable : 1;
@@ -68,10 +64,9 @@ namespace llvm {
private: // MCContext creates and uniques these.
friend class MCExpr;
friend class MCContext;
- MCSymbol(StringRef name, bool isTemporary, bool noQuoting)
+ MCSymbol(StringRef name, bool isTemporary)
: Name(name), Section(nullptr), Value(nullptr),
- IsTemporary(isTemporary), NoQuoting(noQuoting),
- IsRedefinable(false), IsUsed(false) {}
+ IsTemporary(isTemporary), IsRedefinable(false), IsUsed(false) {}
MCSymbol(const MCSymbol&) = delete;
void operator=(const MCSymbol&) = delete;
Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=235672&r1=235671&r2=235672&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Thu Apr 23 18:34:51 2015
@@ -50,7 +50,6 @@ MCAsmInfo::MCAsmInfo() {
Code64Directive = ".code64";
AssemblerDialect = 0;
AllowAtInName = false;
- NoSymbolNameQuoting = false;
UseDataRegionDirectives = false;
ZeroDirective = "\t.zero\t";
AsciiDirective = "\t.ascii\t";
Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=235672&r1=235671&r2=235672&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Thu Apr 23 18:34:51 2015
@@ -125,8 +125,7 @@ MCSymbol *MCContext::getOrCreateSectionS
}
auto NameIter = UsedNames.insert(std::make_pair(Name, true)).first;
- Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false,
- MAI->noSymbolNameQuoting());
+ Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false);
if (!OldSym)
OldSym = Sym;
@@ -164,8 +163,7 @@ MCSymbol *MCContext::CreateSymbol(String
// Ok, we found a name. Have the MCSymbol object itself refer to the copy
// of the string that is embedded in the UsedNames entry.
MCSymbol *Result =
- new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary,
- MAI->noSymbolNameQuoting());
+ new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary);
return Result;
}
assert(IsTemporary && "Cannot rename non-temporary symbols");
Modified: llvm/trunk/lib/MC/MCSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSymbol.cpp?rev=235672&r1=235671&r2=235672&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSymbol.cpp (original)
+++ llvm/trunk/lib/MC/MCSymbol.cpp Thu Apr 23 18:34:51 2015
@@ -51,7 +51,7 @@ void MCSymbol::print(raw_ostream &OS) co
// some targets support quoting names with funny characters. If the name
// contains a funny character, then print it quoted.
StringRef Name = getName();
- if (NoQuoting || !NameNeedsQuoting(Name)) {
+ if (!NameNeedsQuoting(Name)) {
OS << Name;
return;
}
More information about the llvm-commits
mailing list