[llvm-commits] [llvm] r76087 - in /llvm/trunk: include/llvm/MC/MCStreamer.h lib/MC/MCAsmStreamer.cpp tools/llvm-mc/AsmParser.cpp
Kevin Enderby
enderby at apple.com
Thu Jul 16 10:56:52 PDT 2009
Author: enderby
Date: Thu Jul 16 12:56:39 2009
New Revision: 76087
URL: http://llvm.org/viewvc/llvm-project?rev=76087&view=rev
Log:
Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.
Modified:
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/tools/llvm-mc/AsmParser.cpp
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=76087&r1=76086&r2=76087&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Thu Jul 16 12:56:39 2009
@@ -53,6 +53,10 @@
SymbolAttrLast = WeakReference
};
+ enum AssemblerFlag {
+ SubsectionsViaSymbols /// .subsections_via_symbols (Apple)
+ };
+
private:
MCContext &Context;
@@ -89,10 +93,8 @@
// symbol section in the constructor and initialize it here?
virtual void EmitLabel(MCSymbol *Symbol) = 0;
- /// SubsectionsViaSymbols - Note in the output that the conventions used in
- /// in the assembly file allows the bytes of a section to be divided up at
- /// the boundaries of the symbols by a link editor for processing as atoms.
- virtual void SubsectionsViaSymbols(void) = 0;
+ /// EmitAssemblerFlag - Note in the output the specified @param Flag
+ virtual void EmitAssemblerFlag(AssemblerFlag Flag) = 0;
/// EmitAssignment - Emit an assignment of @param Value to @param Symbol.
///
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=76087&r1=76086&r2=76087&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Thu Jul 16 12:56:39 2009
@@ -38,7 +38,7 @@
virtual void EmitLabel(MCSymbol *Symbol);
- virtual void SubsectionsViaSymbols(void);
+ virtual void EmitAssemblerFlag(AssemblerFlag Flag);
virtual void EmitAssignment(MCSymbol *Symbol, const MCValue &Value,
bool MakeAbsolute = false);
@@ -129,8 +129,11 @@
Symbol->setExternal(false);
}
-void MCAsmStreamer::SubsectionsViaSymbols(void) {
- OS << ".subsections_via_symbols\n";
+void MCAsmStreamer::EmitAssemblerFlag(AssemblerFlag Flag) {
+ switch (Flag) {
+ case SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
+ }
+ OS << '\n';
}
void MCAsmStreamer::AbortAssembly(const char *AbortReason) {
Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=76087&r1=76086&r2=76087&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Thu Jul 16 12:56:39 2009
@@ -1107,7 +1107,7 @@
Lexer.Lex();
- Out.SubsectionsViaSymbols();
+ Out.EmitAssemblerFlag(MCStreamer::SubsectionsViaSymbols);
return false;
}
More information about the llvm-commits
mailing list