diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
commit | d2e985fd323c167e20f77b045a1d99ad166e65db (patch) | |
tree | 6a111e552c75afc66228e3d8f19b6731e4013f10 /lib/MC | |
parent | ded64d5d348ce8d8c5aa42cf63f6de9dd84b7e89 (diff) | |
download | FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.zip FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.tar.gz |
Update LLVM to r89205.
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 4 | ||||
-rw-r--r-- | lib/MC/MCAssembler.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCContext.cpp | 8 | ||||
-rw-r--r-- | lib/MC/MCExpr.cpp | 3 | ||||
-rw-r--r-- | lib/MC/MCMachOStreamer.cpp | 4 | ||||
-rw-r--r-- | lib/MC/MCNullStreamer.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCSection.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCSectionMachO.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCSymbol.cpp | 2 |
10 files changed, 15 insertions, 16 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index e939f37..b6ebb1a 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -58,7 +58,7 @@ public: virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0, unsigned Size = 0, unsigned ByteAlignment = 0); - virtual void EmitBytes(const StringRef &Data); + virtual void EmitBytes(StringRef Data); virtual void EmitValue(const MCExpr *Value, unsigned Size); @@ -186,7 +186,7 @@ void MCAsmStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol, OS << '\n'; } -void MCAsmStreamer::EmitBytes(const StringRef &Data) { +void MCAsmStreamer::EmitBytes(StringRef Data) { assert(CurSection && "Cannot emit contents before setting section!"); for (unsigned i = 0, e = Data.size(); i != e; ++i) OS << ".byte " << (unsigned) (unsigned char) Data[i] << '\n'; diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 4f39f1e..1f5b6f1 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -180,7 +180,7 @@ public: OS << StringRef(Zeros, N % 16); } - void WriteString(const StringRef &Str, unsigned ZeroFillSize = 0) { + void WriteString(StringRef Str, unsigned ZeroFillSize = 0) { OS << Str; if (ZeroFillSize) WriteZeros(ZeroFillSize - Str.size()); diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp index 09479c5..45d2c02 100644 --- a/lib/MC/MCContext.cpp +++ b/lib/MC/MCContext.cpp @@ -23,7 +23,7 @@ MCContext::~MCContext() { // we don't need to free them here. } -MCSymbol *MCContext::CreateSymbol(const StringRef &Name) { +MCSymbol *MCContext::CreateSymbol(StringRef Name) { assert(Name[0] != '\0' && "Normal symbols cannot be unnamed!"); // Create and bind the symbol, and ensure that names are unique. @@ -32,7 +32,7 @@ MCSymbol *MCContext::CreateSymbol(const StringRef &Name) { return Entry = new (*this) MCSymbol(Name, false); } -MCSymbol *MCContext::GetOrCreateSymbol(const StringRef &Name) { +MCSymbol *MCContext::GetOrCreateSymbol(StringRef Name) { MCSymbol *&Entry = Symbols[Name]; if (Entry) return Entry; @@ -46,7 +46,7 @@ MCSymbol *MCContext::GetOrCreateSymbol(const Twine &Name) { } -MCSymbol *MCContext::CreateTemporarySymbol(const StringRef &Name) { +MCSymbol *MCContext::CreateTemporarySymbol(StringRef Name) { // If unnamed, just create a symbol. if (Name.empty()) new (*this) MCSymbol("", true); @@ -57,6 +57,6 @@ MCSymbol *MCContext::CreateTemporarySymbol(const StringRef &Name) { return Entry = new (*this) MCSymbol(Name, true); } -MCSymbol *MCContext::LookupSymbol(const StringRef &Name) const { +MCSymbol *MCContext::LookupSymbol(StringRef Name) const { return Symbols.lookup(Name); } diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index c950ff2..a5a2256 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -133,8 +133,7 @@ const MCSymbolRefExpr *MCSymbolRefExpr::Create(const MCSymbol *Sym, return new (Ctx) MCSymbolRefExpr(Sym); } -const MCSymbolRefExpr *MCSymbolRefExpr::Create(const StringRef &Name, - MCContext &Ctx) { +const MCSymbolRefExpr *MCSymbolRefExpr::Create(StringRef Name, MCContext &Ctx) { return Create(Ctx.GetOrCreateSymbol(Name), Ctx); } diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index 189f072..828b92a 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -134,7 +134,7 @@ public: virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0, unsigned Size = 0, unsigned ByteAlignment = 0); - virtual void EmitBytes(const StringRef &Data); + virtual void EmitBytes(StringRef Data); virtual void EmitValue(const MCExpr *Value, unsigned Size); @@ -315,7 +315,7 @@ void MCMachOStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol, SectData.setAlignment(ByteAlignment); } -void MCMachOStreamer::EmitBytes(const StringRef &Data) { +void MCMachOStreamer::EmitBytes(StringRef Data) { MCDataFragment *DF = dyn_cast_or_null<MCDataFragment>(getCurrentFragment()); if (!DF) DF = new MCDataFragment(CurSectionData); diff --git a/lib/MC/MCNullStreamer.cpp b/lib/MC/MCNullStreamer.cpp index 3cd22ca..ddc4e69 100644 --- a/lib/MC/MCNullStreamer.cpp +++ b/lib/MC/MCNullStreamer.cpp @@ -45,7 +45,7 @@ namespace { virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0, unsigned Size = 0, unsigned ByteAlignment = 0) {} - virtual void EmitBytes(const StringRef &Data) {} + virtual void EmitBytes(StringRef Data) {} virtual void EmitValue(const MCExpr *Value, unsigned Size) {} diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp index 333a471..24c89ef 100644 --- a/lib/MC/MCSection.cpp +++ b/lib/MC/MCSection.cpp @@ -25,7 +25,7 @@ MCSection::~MCSection() { //===----------------------------------------------------------------------===// MCSectionCOFF *MCSectionCOFF:: -Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx) { +Create(StringRef Name, bool IsDirective, SectionKind K, MCContext &Ctx) { return new (Ctx) MCSectionCOFF(Name, IsDirective, K); } diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index 660a8c9..c6812ed 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -15,7 +15,7 @@ using namespace llvm; MCSectionELF *MCSectionELF:: -Create(const StringRef &Section, unsigned Type, unsigned Flags, +Create(StringRef Section, unsigned Type, unsigned Flags, SectionKind K, bool isExplicit, MCContext &Ctx) { return new (Ctx) MCSectionELF(Section, Type, Flags, K, isExplicit); } diff --git a/lib/MC/MCSectionMachO.cpp b/lib/MC/MCSectionMachO.cpp index b3aeb9c..6cc67a2 100644 --- a/lib/MC/MCSectionMachO.cpp +++ b/lib/MC/MCSectionMachO.cpp @@ -66,7 +66,7 @@ ENTRY(0 /*FIXME*/, S_ATTR_LOC_RELOC) MCSectionMachO *MCSectionMachO:: -Create(const StringRef &Segment, const StringRef &Section, +Create(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, MCContext &Ctx) { // S_SYMBOL_STUBS must be set for Reserved2 to be non-zero. diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index 86ff3f3..b145d07 100644 --- a/lib/MC/MCSymbol.cpp +++ b/lib/MC/MCSymbol.cpp @@ -35,7 +35,7 @@ static void MangleLetter(raw_ostream &OS, unsigned char C) { /// NameNeedsEscaping - Return true if the identifier \arg Str needs quotes /// for this assembler. -static bool NameNeedsEscaping(const StringRef &Str, const MCAsmInfo &MAI) { +static bool NameNeedsEscaping(StringRef Str, const MCAsmInfo &MAI) { assert(!Str.empty() && "Cannot create an empty MCSymbol"); // If the first character is a number and the target does not allow this, we |