From 68b1bbe66ab2ffb2dceb10af943ab1fe001fb537 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 17 May 2010 02:13:02 +0000 Subject: Assume that we'll handle mangling the symbols earlier and just put the symbol to the file as we have it. Simplifies out tbss handling. llvm-svn: 103928 --- llvm/lib/MC/MCAsmStreamer.cpp | 9 ++++----- llvm/lib/MC/MCParser/AsmParser.cpp | 8 ++------ 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index 62735ad3f3a..4f7699ca99d 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -363,14 +363,13 @@ void MCAsmStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol, EmitEOL(); } -// .tbss sym$tlv$init, size, align +// .tbss sym, size, align +// This depends that the symbol has already been mangled from the original, +// e.g. _a. void MCAsmStreamer::EmitTBSSSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) { assert(Symbol != NULL && "Symbol shouldn't be NULL!"); - OS << ".tbss "; - - // This is a mach-o specific directive and the name requires some mangling. - OS << *Symbol << "$tlv$init, " << Size; + OS << ".tbss " << *Symbol << ", " << Size; // Output align if we have it. if (ByteAlignment != 0) OS << ", " << Log2_32(ByteAlignment); diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 18977de8adb..e5af357de34 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1436,13 +1436,9 @@ bool AsmParser::ParseDirectiveDarwinTBSS() { StringRef Name; if (ParseIdentifier(Name)) return TokError("expected identifier in directive"); - - // Demangle the name output. The trailing characters are guaranteed to be - // $tlv$init so just strip that off. - StringRef DemName = Name.substr(0, Name.size() - strlen("$tlv$init")); - + // Handle the identifier as the key symbol. - MCSymbol *Sym = CreateSymbol(DemName); + MCSymbol *Sym = CreateSymbol(Name); if (Lexer.isNot(AsmToken::Comma)) return TokError("unexpected token in directive"); -- cgit v1.2.3