Add r224985 back with fixes.
[oota-llvm.git] / include / llvm / MC / MCAssembler.h
index 681a317287992794c2f9bb10ec3cab197e32311c..31f29eb1f3ffb3e7c4f198d85d8d753dc70cc151 100644 (file)
@@ -11,6 +11,7 @@
 #define LLVM_MC_MCASSEMBLER_H
 
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallString.h"
@@ -881,6 +882,8 @@ private:
 
   iplist<MCSymbolData> Symbols;
 
+  DenseSet<const MCSymbol *> LocalsUsedInReloc;
+
   /// The map of sections to their associated assembler backend data.
   //
   // FIXME: Avoid this indirection?
@@ -980,6 +983,9 @@ private:
                                         MCFragment &F, const MCFixup &Fixup);
 
 public:
+  void addLocalUsedInReloc(const MCSymbol &Sym);
+  bool isLocalUsedInReloc(const MCSymbol &Sym) const;
+
   /// Compute the effective fragment size assuming it is laid out at the given
   /// \p SectionAddress and \p FragmentOffset.
   uint64_t computeFragmentSize(const MCAsmLayout &Layout,