Don't lookup an object symbol name in the module.
[oota-llvm.git] / include / llvm / Object / IRObjectFile.h
index b650d5d32934994731bdc7ad40273114a5a78bc5..10ea05ddf1f7913cfe6e45124d72e817450ab573 100644 (file)
@@ -36,7 +36,10 @@ public:
   std::error_code printSymbolName(raw_ostream &OS,
                                   DataRefImpl Symb) const override;
   uint32_t getSymbolFlags(DataRefImpl Symb) const override;
-  const GlobalValue *getSymbolGV(DataRefImpl Symb) const;
+  GlobalValue *getSymbolGV(DataRefImpl Symb);
+  const GlobalValue *getSymbolGV(DataRefImpl Symb) const {
+    return const_cast<IRObjectFile *>(this)->getSymbolGV(Symb);
+  }
   basic_symbol_iterator symbol_begin_impl() const override;
   basic_symbol_iterator symbol_end_impl() const override;
 
@@ -46,6 +49,7 @@ public:
   Module &getModule() {
     return *M;
   }
+  std::unique_ptr<Module> takeModule() { return std::move(M); }
 
   static inline bool classof(const Binary *v) {
     return v->isIR();