Drop prelink support.
[oota-llvm.git] / include / llvm / MC / ConstantPools.h
index 1fc0332f63c296a7e1b4d0faea2a713599e943ea..552e1443e7d0244d9be99561e6536ca3f462f124 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/SMLoc.h"
 
 namespace llvm {
 class MCContext;
@@ -26,11 +27,12 @@ class MCStreamer;
 class MCSymbol;
 
 struct ConstantPoolEntry {
-  ConstantPoolEntry(MCSymbol *L, const MCExpr *Val, unsigned Sz)
-    : Label(L), Value(Val), Size(Sz) {}
+  ConstantPoolEntry(MCSymbol *L, const MCExpr *Val, unsigned Sz, SMLoc Loc_)
+    : Label(L), Value(Val), Size(Sz), Loc(Loc_) {}
   MCSymbol *Label;
   const MCExpr *Value;
   unsigned Size;
+  SMLoc Loc;
 };
 
 // A class to keep track of assembler-generated constant pools that are use to
@@ -49,7 +51,7 @@ public:
   //
   // \returns a MCExpr that references the newly inserted value
   const MCExpr *addEntry(const MCExpr *Value, MCContext &Context,
-                         unsigned Size);
+                         unsigned Size, SMLoc Loc);
 
   // Emit the contents of the constant pool using the provided streamer.
   void emitEntries(MCStreamer &Streamer);
@@ -73,21 +75,18 @@ class AssemblerConstantPools {
   // sections in a stable order to ensure that we have print the
   // constant pools in a deterministic order when printing an assembly
   // file.
-  typedef MapVector<const MCSection *, ConstantPool> ConstantPoolMapTy;
+  typedef MapVector<MCSection *, ConstantPool> ConstantPoolMapTy;
   ConstantPoolMapTy ConstantPools;
 
 public:
-  AssemblerConstantPools() {}
-  ~AssemblerConstantPools() {}
-
   void emitAll(MCStreamer &Streamer);
   void emitForCurrentSection(MCStreamer &Streamer);
   const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr,
-                         unsigned Size);
+                         unsigned Size, SMLoc Loc);
 
 private:
-  ConstantPool *getConstantPool(const MCSection *Section);
-  ConstantPool &getOrCreateConstantPool(const MCSection *Section);
+  ConstantPool *getConstantPool(MCSection *Section);
+  ConstantPool &getOrCreateConstantPool(MCSection *Section);
 };
 } // end namespace llvm