diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
commit | 3fba7d16b41dfbefe3b1be6bc0ab94c017728f79 (patch) | |
tree | be5a687969f682edded4aa6f13594ffd9aa9030e /lib/MC | |
parent | a16c51cee9225a354c999dd1076d5dba2aa79807 (diff) | |
download | FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.zip FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.tar.gz |
Update LLVM to 93512.
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCExpr.cpp | 5 | ||||
-rw-r--r-- | lib/MC/MCInst.cpp | 9 | ||||
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 7 | ||||
-rw-r--r-- | lib/MC/MCSymbol.cpp | 14 | ||||
-rw-r--r-- | lib/MC/MCValue.cpp | 3 |
5 files changed, 22 insertions, 16 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index a5a2256..a19ec19 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -11,6 +11,7 @@ #include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCValue.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -108,8 +109,8 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI) const { } void MCExpr::dump() const { - print(errs(), 0); - errs() << '\n'; + print(dbgs(), 0); + dbgs() << '\n'; } /* *** */ diff --git a/lib/MC/MCInst.cpp b/lib/MC/MCInst.cpp index d050318..7c7a644 100644 --- a/lib/MC/MCInst.cpp +++ b/lib/MC/MCInst.cpp @@ -9,6 +9,7 @@ #include "llvm/MC/MCInst.h" #include "llvm/MC/MCExpr.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -31,8 +32,8 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const { } void MCOperand::dump() const { - print(errs(), 0); - errs() << "\n"; + print(dbgs(), 0); + dbgs() << "\n"; } void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const { @@ -45,6 +46,6 @@ void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const { } void MCInst::dump() const { - print(errs(), 0); - errs() << "\n"; + print(dbgs(), 0); + dbgs() << "\n"; } diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index c6812ed..4d520ec 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -8,10 +8,10 @@ //===----------------------------------------------------------------------===// #include "llvm/MC/MCSectionELF.h" +#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCSymbol.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/MC/MCAsmInfo.h" - using namespace llvm; MCSectionELF *MCSectionELF:: @@ -23,7 +23,7 @@ Create(StringRef Section, unsigned Type, unsigned Flags, // ShouldOmitSectionDirective - Decides whether a '.section' directive // should be printed before the section name bool MCSectionELF::ShouldOmitSectionDirective(const char *Name, - const MCAsmInfo &MAI) const { + const MCAsmInfo &MAI) const { // FIXME: Does .section .bss/.data/.text work everywhere?? if (strcmp(Name, ".text") == 0 || @@ -37,7 +37,6 @@ bool MCSectionELF::ShouldOmitSectionDirective(const char *Name, // ShouldPrintSectionType - Only prints the section type if supported bool MCSectionELF::ShouldPrintSectionType(unsigned Ty) const { - if (IsExplicit && !(Ty == SHT_NOBITS || Ty == SHT_PROGBITS)) return false; diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index b145d07..265d06c 100644 --- a/lib/MC/MCSymbol.cpp +++ b/lib/MC/MCSymbol.cpp @@ -9,6 +9,7 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCAsmInfo.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -51,11 +52,14 @@ static bool NameNeedsEscaping(StringRef Str, const MCAsmInfo &MAI) { return false; } -static void PrintMangledName(raw_ostream &OS, StringRef Str, - const MCAsmInfo &MAI) { +/// printMangledName - Print the specified string in mangled form if it uses +/// any unusual characters. +void MCSymbol::printMangledName(StringRef Str, raw_ostream &OS, + const MCAsmInfo *MAI) { // The first character is not allowed to be a number unless the target // explicitly allows it. - if (!MAI.doesAllowNameToStartWithDigit() && Str[0] >= '0' && Str[0] <= '9') { + if ((MAI == 0 || !MAI->doesAllowNameToStartWithDigit()) && + Str[0] >= '0' && Str[0] <= '9') { MangleLetter(OS, Str[0]); Str = Str.substr(1); } @@ -94,7 +98,7 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const { // On systems that do not allow quoted names, print with mangling. if (!MAI->doesAllowQuotesInName()) - return PrintMangledName(OS, getName(), *MAI); + return printMangledName(getName(), OS, MAI); // If the string contains a double quote or newline, we still have to mangle // it. @@ -106,5 +110,5 @@ void MCSymbol::print(raw_ostream &OS, const MCAsmInfo *MAI) const { } void MCSymbol::dump() const { - print(errs(), 0); + print(dbgs(), 0); } diff --git a/lib/MC/MCValue.cpp b/lib/MC/MCValue.cpp index 69bd10c..c1222ec 100644 --- a/lib/MC/MCValue.cpp +++ b/lib/MC/MCValue.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "llvm/MC/MCValue.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -30,5 +31,5 @@ void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const { } void MCValue::dump() const { - print(errs(), 0); + print(dbgs(), 0); } |