[llvm-commits] [llvm] r94294 - in /llvm/trunk: include/llvm/MC/MCDirectives.h include/llvm/MC/MCParser/AsmParser.h include/llvm/MC/MCStreamer.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfException.cpp lib/MC/MCAsmStreamer.cpp lib/MC/MCMachOStreamer.cpp lib/MC/MCNullStreamer.cpp lib/MC/MCParser/AsmParser.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 22 22:39:23 PST 2010
Author: lattner
Date: Sat Jan 23 00:39:22 2010
New Revision: 94294
URL: http://llvm.org/viewvc/llvm-project?rev=94294&view=rev
Log:
move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.
Added:
llvm/trunk/include/llvm/MC/MCDirectives.h
Modified:
llvm/trunk/include/llvm/MC/MCParser/AsmParser.h
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCMachOStreamer.cpp
llvm/trunk/lib/MC/MCNullStreamer.cpp
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
Added: llvm/trunk/include/llvm/MC/MCDirectives.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCDirectives.h?rev=94294&view=auto
==============================================================================
--- llvm/trunk/include/llvm/MC/MCDirectives.h (added)
+++ llvm/trunk/include/llvm/MC/MCDirectives.h Sat Jan 23 00:39:22 2010
@@ -0,0 +1,44 @@
+//===- MCDirectives.h - Enums for directives on various targets -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines various enums that represent target-specific directives.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_MC_MCDIRECTIVES_H
+#define LLVM_MC_MCDIRECTIVES_H
+
+namespace llvm {
+
+enum MCSymbolAttr {
+ MCSA_Invalid = 0, /// Not a valid directive.
+
+ // Various directives in alphabetical order.
+ MCSA_Global, /// .globl
+ MCSA_Hidden, /// .hidden (ELF)
+ MCSA_IndirectSymbol, /// .indirect_symbol (MachO)
+ MCSA_Internal, /// .internal (ELF)
+ MCSA_LazyReference, /// .lazy_reference (MachO)
+ MCSA_Local, /// .local (ELF)
+ MCSA_NoDeadStrip, /// .no_dead_strip (MachO)
+ MCSA_PrivateExtern, /// .private_extern (MachO)
+ MCSA_Protected, /// .protected (ELF)
+ MCSA_Reference, /// .reference (MachO)
+ MCSA_Weak, /// .weak
+ MCSA_WeakDefinition, /// .weak_definition (MachO)
+ MCSA_WeakReference /// .weak_reference (MachO)
+};
+
+enum MCAssemblerFlag {
+ MCAF_SubsectionsViaSymbols /// .subsections_via_symbols (MachO)
+};
+
+} // end namespace llvm
+
+#endif
Modified: llvm/trunk/include/llvm/MC/MCParser/AsmParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/AsmParser.h?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCParser/AsmParser.h (original)
+++ llvm/trunk/include/llvm/MC/MCParser/AsmParser.h Sat Jan 23 00:39:22 2010
@@ -144,7 +144,7 @@
/// ParseDirectiveSymbolAttribute - Parse a directive like ".globl" which
/// accepts a single symbol (which should be a label or an external).
- bool ParseDirectiveSymbolAttribute(MCStreamer::SymbolAttr Attr);
+ bool ParseDirectiveSymbolAttribute(MCSymbolAttr Attr);
bool ParseDirectiveDarwinSymbolDesc(); // Darwin specific ".desc"
bool ParseDirectiveDarwinLsym(); // Darwin specific ".lsym"
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Sat Jan 23 00:39:22 2010
@@ -15,6 +15,7 @@
#define LLVM_MC_MCSTREAMER_H
#include "llvm/System/DataTypes.h"
+#include "llvm/MC/MCDirectives.h"
namespace llvm {
class MCAsmInfo;
@@ -40,31 +41,6 @@
/// a .s file, and implementations that write out .o files of various formats.
///
class MCStreamer {
- public:
- enum SymbolAttr {
- Global, /// .globl
- Hidden, /// .hidden (ELF)
- IndirectSymbol, /// .indirect_symbol (Apple)
- Internal, /// .internal (ELF)
- LazyReference, /// .lazy_reference (Apple)
- Local, /// .local (ELF)
- NoDeadStrip, /// .no_dead_strip (Apple)
- PrivateExtern, /// .private_extern (Apple)
- Protected, /// .protected (ELF)
- Reference, /// .reference (Apple)
- Weak, /// .weak
- WeakDefinition, /// .weak_definition (Apple)
- WeakReference, /// .weak_reference (Apple)
-
- SymbolAttrFirst = Global,
- SymbolAttrLast = WeakReference
- };
-
- enum AssemblerFlag {
- SubsectionsViaSymbols /// .subsections_via_symbols (Apple)
- };
-
- private:
MCContext &Context;
MCStreamer(const MCStreamer&); // DO NOT IMPLEMENT
@@ -128,7 +104,7 @@
virtual void EmitLabel(MCSymbol *Symbol) = 0;
/// EmitAssemblerFlag - Note in the output the specified @param Flag
- virtual void EmitAssemblerFlag(AssemblerFlag Flag) = 0;
+ virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) = 0;
/// EmitAssignment - Emit an assignment of @param Value to @param Symbol.
///
@@ -145,7 +121,7 @@
/// EmitSymbolAttribute - Add the given @param Attribute to @param Symbol.
virtual void EmitSymbolAttribute(MCSymbol *Symbol,
- SymbolAttr Attribute) = 0;
+ MCSymbolAttr Attribute) = 0;
/// EmitSymbolDesc - Set the @param DescValue for the @param Symbol.
///
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat Jan 23 00:39:22 2010
@@ -203,7 +203,7 @@
}
// .local _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Local);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Local);
// .comm _foo, 42, 4
OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog);
return;
@@ -216,7 +216,7 @@
// emission.
if (GVKind.isBSSExtern() && MAI->hasMachoZeroFillDirective()) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .zerofill __DATA, __common, _foo, 400, 5
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
return;
@@ -235,17 +235,17 @@
case GlobalValue::LinkerPrivateLinkage:
if (MAI->getWeakDefDirective() != 0) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .weak_definition _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::WeakDefinition);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefinition);
} else if (const char *LinkOnce = MAI->getLinkOnceDirective()) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .linkonce same_size
O << LinkOnce;
} else {
// .weak _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Weak);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Weak);
}
break;
case GlobalValue::DLLExportLinkage:
@@ -255,7 +255,7 @@
case GlobalValue::ExternalLinkage:
// If external or appending, declare as a global symbol.
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
break;
case GlobalValue::PrivateLinkage:
case GlobalValue::InternalLinkage:
@@ -303,13 +303,13 @@
I != E; ++I) {
if (!I->hasExternalWeakLinkage()) continue;
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(I),
- MCStreamer::WeakReference);
+ MCSA_WeakReference);
}
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) {
if (!I->hasExternalWeakLinkage()) continue;
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(I),
- MCStreamer::WeakReference);
+ MCSA_WeakReference);
}
}
@@ -323,9 +323,9 @@
MCSymbol *Target = GetGlobalValueSymbol(GV);
if (I->hasExternalLinkage() || !MAI->getWeakRefDirective())
- OutStreamer.EmitSymbolAttribute(Name, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);
else if (I->hasWeakLinkage())
- OutStreamer.EmitSymbolAttribute(Name, MCStreamer::WeakReference);
+ OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);
else
assert(I->hasLocalLinkage() && "Invalid alias linkage");
@@ -601,7 +601,7 @@
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".constructors_used");
OutStreamer.EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
- MCStreamer::Reference);
+ MCSA_Reference);
}
return true;
}
@@ -615,7 +615,7 @@
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".destructors_used");
OutStreamer.EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
- MCStreamer::Reference);
+ MCSA_Reference);
}
return true;
}
@@ -636,7 +636,7 @@
dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
if (GV && getObjFileLowering().shouldEmitUsedDirectiveFor(GV, Mang))
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(GV),
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
}
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Sat Jan 23 00:39:22 2010
@@ -247,7 +247,7 @@
// dead-stripping unconditionally.
if (MAI->hasNoDeadStrip())
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
} else {
O << *EHFrameInfo.FunctionEHSym << ":\n";
@@ -316,7 +316,7 @@
if (MMI->isUsedFunction(EHFrameInfo.function))
if (MAI->hasNoDeadStrip())
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
}
Asm->O << '\n';
}
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Sat Jan 23 00:39:22 2010
@@ -85,11 +85,11 @@
virtual void EmitLabel(MCSymbol *Symbol);
- virtual void EmitAssemblerFlag(AssemblerFlag Flag);
+ virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value);
- virtual void EmitSymbolAttribute(MCSymbol *Symbol, SymbolAttr Attribute);
+ virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
@@ -195,10 +195,10 @@
Symbol->setSection(*CurSection);
}
-void MCAsmStreamer::EmitAssemblerFlag(AssemblerFlag Flag) {
+void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
switch (Flag) {
default: assert(0 && "Invalid flag!");
- case SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
+ case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
}
EmitEOL();
}
@@ -217,21 +217,23 @@
}
void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
- SymbolAttr Attribute) {
+ MCSymbolAttr Attribute) {
switch (Attribute) {
- case Global: OS << MAI.getGlobalDirective(); break; // .globl
- case Hidden: OS << ".hidden "; break;
- case IndirectSymbol: OS << ".indirect_symbol "; break;
- case Internal: OS << ".internal "; break;
- case LazyReference: OS << ".lazy_reference "; break;
- case Local: OS << ".local "; break;
- case NoDeadStrip: OS << ".no_dead_strip "; break;
- case PrivateExtern: OS << ".private_extern "; break;
- case Protected: OS << ".protected "; break;
- case Reference: OS << ".reference "; break;
- case Weak: OS << ".weak "; break;
- case WeakDefinition: OS << ".weak_definition "; break;
- case WeakReference: OS << MAI.getWeakRefDirective(); break;// .weak_reference
+ case MCSA_Invalid: assert(0 && "Invalid symbol attribute");
+ case MCSA_Global: OS << MAI.getGlobalDirective(); break; // .globl
+ case MCSA_Hidden: OS << ".hidden "; break;
+ case MCSA_IndirectSymbol: OS << ".indirect_symbol "; break;
+ case MCSA_Internal: OS << ".internal "; break;
+ case MCSA_LazyReference: OS << ".lazy_reference "; break;
+ case MCSA_Local: OS << ".local "; break;
+ case MCSA_NoDeadStrip: OS << ".no_dead_strip "; break;
+ case MCSA_PrivateExtern: OS << ".private_extern "; break;
+ case MCSA_Protected: OS << ".protected "; break;
+ case MCSA_Reference: OS << ".reference "; break;
+ case MCSA_Weak: OS << ".weak "; break;
+ case MCSA_WeakDefinition: OS << ".weak_definition "; break;
+ // .weak_reference
+ case MCSA_WeakReference: OS << MAI.getWeakRefDirective(); break;
}
OS << *Symbol;
Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Sat Jan 23 00:39:22 2010
@@ -117,36 +117,23 @@
/// @{
virtual void SwitchSection(const MCSection *Section);
-
virtual void EmitLabel(MCSymbol *Symbol);
-
- virtual void EmitAssemblerFlag(AssemblerFlag Flag);
-
+ virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value);
-
- virtual void EmitSymbolAttribute(MCSymbol *Symbol, SymbolAttr Attribute);
-
+ virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
-
virtual void EmitCommonSymbol(MCSymbol *Symbol, unsigned Size,
unsigned ByteAlignment);
-
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
unsigned Size = 0, unsigned ByteAlignment = 0);
-
virtual void EmitBytes(StringRef Data, unsigned AddrSpace);
-
virtual void EmitValue(const MCExpr *Value, unsigned Size,unsigned AddrSpace);
-
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
unsigned MaxBytesToEmit = 0);
-
virtual void EmitValueToOffset(const MCExpr *Offset,
unsigned char Value = 0);
-
virtual void EmitInstruction(const MCInst &Inst);
-
virtual void Finish();
/// @}
@@ -183,9 +170,9 @@
Symbol->setSection(*CurSection);
}
-void MCMachOStreamer::EmitAssemblerFlag(AssemblerFlag Flag) {
+void MCMachOStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
switch (Flag) {
- case SubsectionsViaSymbols:
+ case MCAF_SubsectionsViaSymbols:
Assembler.setSubsectionsViaSymbols(true);
return;
}
@@ -204,10 +191,10 @@
}
void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
- SymbolAttr Attribute) {
+ MCSymbolAttr Attribute) {
// Indirect symbols are handled differently, to match how 'as' handles
// them. This makes writing matching .o files easier.
- if (Attribute == MCStreamer::IndirectSymbol) {
+ if (Attribute == MCSA_IndirectSymbol) {
// Note that we intentionally cannot use the symbol data here; this is
// important for matching the string table that 'as' generates.
IndirectSymbolData ISD;
@@ -229,20 +216,21 @@
// In the future it might be worth trying to make these operations more well
// defined.
switch (Attribute) {
- case MCStreamer::IndirectSymbol:
- case MCStreamer::Hidden:
- case MCStreamer::Internal:
- case MCStreamer::Protected:
- case MCStreamer::Weak:
- case MCStreamer::Local:
+ case MCSA_Invalid:
+ case MCSA_IndirectSymbol:
+ case MCSA_Hidden:
+ case MCSA_Internal:
+ case MCSA_Protected:
+ case MCSA_Weak:
+ case MCSA_Local:
assert(0 && "Invalid symbol attribute for Mach-O!");
break;
- case MCStreamer::Global:
+ case MCSA_Global:
SD.setExternal(true);
break;
- case MCStreamer::LazyReference:
+ case MCSA_LazyReference:
// FIXME: This requires -dynamic.
SD.setFlags(SD.getFlags() | SF_NoDeadStrip);
if (Symbol->isUndefined())
@@ -251,23 +239,23 @@
// Since .reference sets the no dead strip bit, it is equivalent to
// .no_dead_strip in practice.
- case MCStreamer::Reference:
- case MCStreamer::NoDeadStrip:
+ case MCSA_Reference:
+ case MCSA_NoDeadStrip:
SD.setFlags(SD.getFlags() | SF_NoDeadStrip);
break;
- case MCStreamer::PrivateExtern:
+ case MCSA_PrivateExtern:
SD.setExternal(true);
SD.setPrivateExtern(true);
break;
- case MCStreamer::WeakReference:
+ case MCSA_WeakReference:
// FIXME: This requires -dynamic.
if (Symbol->isUndefined())
SD.setFlags(SD.getFlags() | SF_WeakReference);
break;
- case MCStreamer::WeakDefinition:
+ case MCSA_WeakDefinition:
// FIXME: 'as' enforces that this is defined and global. The manual claims
// it has to be in a coalesced section, but this isn't enforced.
SD.setFlags(SD.getFlags() | SF_WeakDefinition);
Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCNullStreamer.cpp Sat Jan 23 00:39:22 2010
@@ -31,11 +31,11 @@
virtual void EmitLabel(MCSymbol *Symbol) {}
- virtual void EmitAssemblerFlag(AssemblerFlag Flag) {}
+ virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {}
- virtual void EmitSymbolAttribute(MCSymbol *Symbol, SymbolAttr Attribute) {}
+ virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){}
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Sat Jan 23 00:39:22 2010
@@ -702,29 +702,29 @@
// Symbol attribute directives
if (IDVal == ".globl" || IDVal == ".global")
- return ParseDirectiveSymbolAttribute(MCStreamer::Global);
+ return ParseDirectiveSymbolAttribute(MCSA_Global);
if (IDVal == ".hidden")
- return ParseDirectiveSymbolAttribute(MCStreamer::Hidden);
+ return ParseDirectiveSymbolAttribute(MCSA_Hidden);
if (IDVal == ".indirect_symbol")
- return ParseDirectiveSymbolAttribute(MCStreamer::IndirectSymbol);
+ return ParseDirectiveSymbolAttribute(MCSA_IndirectSymbol);
if (IDVal == ".internal")
- return ParseDirectiveSymbolAttribute(MCStreamer::Internal);
+ return ParseDirectiveSymbolAttribute(MCSA_Internal);
if (IDVal == ".lazy_reference")
- return ParseDirectiveSymbolAttribute(MCStreamer::LazyReference);
+ return ParseDirectiveSymbolAttribute(MCSA_LazyReference);
if (IDVal == ".no_dead_strip")
- return ParseDirectiveSymbolAttribute(MCStreamer::NoDeadStrip);
+ return ParseDirectiveSymbolAttribute(MCSA_NoDeadStrip);
if (IDVal == ".private_extern")
- return ParseDirectiveSymbolAttribute(MCStreamer::PrivateExtern);
+ return ParseDirectiveSymbolAttribute(MCSA_PrivateExtern);
if (IDVal == ".protected")
- return ParseDirectiveSymbolAttribute(MCStreamer::Protected);
+ return ParseDirectiveSymbolAttribute(MCSA_Protected);
if (IDVal == ".reference")
- return ParseDirectiveSymbolAttribute(MCStreamer::Reference);
+ return ParseDirectiveSymbolAttribute(MCSA_Reference);
if (IDVal == ".weak")
- return ParseDirectiveSymbolAttribute(MCStreamer::Weak);
+ return ParseDirectiveSymbolAttribute(MCSA_Weak);
if (IDVal == ".weak_definition")
- return ParseDirectiveSymbolAttribute(MCStreamer::WeakDefinition);
+ return ParseDirectiveSymbolAttribute(MCSA_WeakDefinition);
if (IDVal == ".weak_reference")
- return ParseDirectiveSymbolAttribute(MCStreamer::WeakReference);
+ return ParseDirectiveSymbolAttribute(MCSA_WeakReference);
if (IDVal == ".comm")
return ParseDirectiveComm(/*IsLocal=*/false);
@@ -1238,7 +1238,7 @@
/// ParseDirectiveSymbolAttribute
/// ::= { ".globl", ".weak", ... } [ identifier ( , identifier )* ]
-bool AsmParser::ParseDirectiveSymbolAttribute(MCStreamer::SymbolAttr Attr) {
+bool AsmParser::ParseDirectiveSymbolAttribute(MCSymbolAttr Attr) {
if (Lexer.isNot(AsmToken::EndOfStatement)) {
for (;;) {
StringRef Name;
@@ -1463,7 +1463,7 @@
Lex();
- Out.EmitAssemblerFlag(MCStreamer::SubsectionsViaSymbols);
+ Out.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
return false;
}
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Sat Jan 23 00:39:22 2010
@@ -1205,7 +1205,7 @@
// implementation of multiple entry points). If this doesn't occur, the
// linker can safely perform dead code stripping. Since LLVM never
// generates code that does this, it is always safe to set.
- OutStreamer.EmitAssemblerFlag(MCStreamer::SubsectionsViaSymbols);
+ OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
}
}
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Sat Jan 23 00:39:22 2010
@@ -968,7 +968,7 @@
// implementation of multiple entry points). If this doesn't occur, the
// linker can safely perform dead code stripping. Since LLVM never generates
// code that does this, it is always safe to set.
- OutStreamer.EmitAssemblerFlag(MCStreamer::SubsectionsViaSymbols);
+ OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
return AsmPrinter::doFinalization(M);
}
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=94294&r1=94293&r2=94294&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Sat Jan 23 00:39:22 2010
@@ -84,7 +84,7 @@
break;
case Function::DLLExportLinkage:
case Function::ExternalLinkage:
- OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCSA_Global);
break;
case Function::LinkerPrivateLinkage:
case Function::LinkOnceAnyLinkage:
@@ -92,10 +92,10 @@
case Function::WeakAnyLinkage:
case Function::WeakODRLinkage:
if (Subtarget->isTargetDarwin()) {
- OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCSA_Global);
O << MAI->getWeakDefDirective() << *CurrentFnSym << '\n';
} else if (Subtarget->isTargetCygMing()) {
- OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCSA_Global);
O << "\t.linkonce discard\n";
} else {
O << "\t.weak\t" << *CurrentFnSym << '\n';
@@ -709,7 +709,7 @@
// implementation of multiple entry points). If this doesn't occur, the
// linker can safely perform dead code stripping. Since LLVM never
// generates code that does this, it is always safe to set.
- OutStreamer.EmitAssemblerFlag(MCStreamer::SubsectionsViaSymbols);
+ OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
}
if (Subtarget->isTargetCOFF()) {
More information about the llvm-commits
mailing list