Don't own the buffer in object::Binary.
[oota-llvm.git] / tools / llvm-symbolizer / LLVMSymbolize.h
index cd11e656e79451ac8bbccadeafd42dd04d7c9ff9..a56f1329fd61933364a569d37d36ebacdbf2d3d5 100644 (file)
@@ -75,6 +75,12 @@ private:
 
   // Owns all the parsed binaries and object files.
   SmallVector<std::unique_ptr<Binary>, 4> ParsedBinariesAndObjects;
+  SmallVector<std::unique_ptr<MemoryBuffer>, 4> MemoryBuffers;
+  void addOwningBinary(OwningBinary<Binary> Bin) {
+    ParsedBinariesAndObjects.push_back(std::move(Bin.getBinary()));
+    MemoryBuffers.push_back(std::move(Bin.getBuffer()));
+  }
+
   // Owns module info objects.
   typedef std::map<std::string, ModuleInfo *> ModuleMapTy;
   ModuleMapTy Modules;