[llvm-commits] [llvm] r74024 - in /llvm/trunk: include/llvm/MC/MCContext.h include/llvm/MC/MCStreamer.h lib/MC/MCContext.cpp

Daniel Dunbar daniel at zuster.org
Tue Jun 23 16:39:15 PDT 2009


Author: ddunbar
Date: Tue Jun 23 18:39:15 2009
New Revision: 74024

URL: http://llvm.org/viewvc/llvm-project?rev=74024&view=rev
Log:
Update for MCImm -> MCValue rename.

Modified:
    llvm/trunk/include/llvm/MC/MCContext.h
    llvm/trunk/include/llvm/MC/MCStreamer.h
    llvm/trunk/lib/MC/MCContext.cpp

Modified: llvm/trunk/include/llvm/MC/MCContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=74024&r1=74023&r2=74024&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCContext.h (original)
+++ llvm/trunk/include/llvm/MC/MCContext.h Tue Jun 23 18:39:15 2009
@@ -16,7 +16,7 @@
 
 namespace llvm {
   class MCAtom;
-  class MCImm;
+  class MCValue;
   class MCSection;
   class MCSymbol;
 
@@ -32,7 +32,7 @@
     StringMap<MCSymbol*> Symbols;
 
     /// SymbolValues - Bindings of symbols to values.
-    DenseMap<MCSymbol*, MCImm> SymbolValues;
+    DenseMap<MCSymbol*, MCValue> SymbolValues;
 
     /// Allocator - Allocator object used for creating machine code objects.
     ///
@@ -73,11 +73,11 @@
 
     /// SetSymbolValue - Set the value binding for @param Symbol to @param
     /// Value.
-    void SetSymbolValue(MCSymbol *Symbol, const MCImm &Value);
+    void SetSymbolValue(MCSymbol *Symbol, const MCValue &Value);
 
     /// GetSymbolValue - Return the current value for @param Symbol, or null if
     /// none exists.
-    const MCImm *GetSymbolValue(MCSymbol *Symbol) const;
+    const MCValue *GetSymbolValue(MCSymbol *Symbol) const;
 
     void *Allocate(unsigned Size, unsigned Align = 8) {
       return Allocator.Allocate(Size, Align);

Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=74024&r1=74023&r2=74024&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Tue Jun 23 18:39:15 2009
@@ -13,7 +13,7 @@
 namespace llvm {
   class MCAtom;
   class MCContext;
-  class MCImm;
+  class MCValue;
   class MCInst;
   class MCSection;
   class MCSymbol;
@@ -59,7 +59,7 @@
     //
     // FIXME: What to do about the current section? Should we get rid of the
     // symbol section in the constructor and initialize it here?
-    virtual void EmitLabel(MCSymbol *Symbol);
+    virtual void EmitLabel(MCSymbol *Symbol) = 0;
 
     /// EmitAssignment - Emit an assignment of @param Value to @param Symbol.
     ///
@@ -75,7 +75,7 @@
     /// @param MakeAbsolute - If true, then the symbol should be given the
     /// absolute value of @param Value, even if @param Value would be
     /// relocatable expression. This corresponds to the ".set" directive.
-    virtual void EmitAssignment(MCSymbol *Symbol, const MCImm &Value,
+    virtual void EmitAssignment(MCSymbol *Symbol, const MCValue &Value,
                                 bool MakeAbsolute = false) = 0;
 
     /// EmitSymbolAttribute - Add the given @param Attribute to @param Symbol.
@@ -103,11 +103,14 @@
     /// @param Value - The value to emit.
     /// @param Size - The size of the integer (in bytes) to emit. This must
     /// match a native machine width.
-    virtual void EmitValue(const MCImm &Value, unsigned Size) = 0;
+    virtual void EmitValue(const MCValue &Value, unsigned Size) = 0;
 
     /// EmitInstruction - Emit the given @param Instruction into the current
     /// section.
     virtual void EmitInstruction(const MCInst &Inst) = 0;
+
+    /// Finish - Finish emission of machine code and flush any output.
+    virtual void Finish() = 0;
   };
 
   /// createAsmStreamer - Create a machine code streamer which will print out

Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=74024&r1=74023&r2=74024&view=diff

==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Tue Jun 23 18:39:15 2009
@@ -1,4 +1,4 @@
-//===- lib/MachineCode/MCContext.cpp - Machine Code Context ---------------===//
+//===- lib/MC/MCContext.cpp - Machine Code Context ------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -10,9 +10,9 @@
 #include "llvm/MC/MCContext.h"
 
 #include "llvm/MC/MCAtom.h"
-#include "llvm/MC/MCImm.h"
 #include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/MCValue.h"
 using namespace llvm;
 
 MCContext::MCContext()
@@ -63,12 +63,12 @@
   SymbolValues.erase(Sym);
 }
 
-void MCContext::SetSymbolValue(MCSymbol *Sym, const MCImm &Value) {
+void MCContext::SetSymbolValue(MCSymbol *Sym, const MCValue &Value) {
   SymbolValues[Sym] = Value;
 }
 
-const MCImm *MCContext::GetSymbolValue(MCSymbol *Sym) const {
-  DenseMap<MCSymbol*, MCImm>::iterator it = SymbolValues.find(Sym);
+const MCValue *MCContext::GetSymbolValue(MCSymbol *Sym) const {
+  DenseMap<MCSymbol*, MCValue>::iterator it = SymbolValues.find(Sym);
 
   if (it == SymbolValues.end())
     return 0;





More information about the llvm-commits mailing list