Fix gcc warnings.
[oota-llvm.git] / tools / llvm-symbolizer / LLVMSymbolize.h
index c7f87b1429c0b933191dba22c702b0022555c413..eb2666a542c97344df9269f5aa9f63838c9541f3 100644 (file)
@@ -48,6 +48,9 @@ public:
   };
 
   LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}
+  ~LLVMSymbolizer() {
+    flush();
+  }
 
   // Returns the result of symbolization for module name/offset as
   // a string (possibly containing newlines).
@@ -56,6 +59,7 @@ public:
   std::string
   symbolizeData(const std::string &ModuleName, uint64_t ModuleOffset);
   void flush();
+  static std::string DemangleName(const std::string &Name);
 private:
   typedef std::pair<Binary*, Binary*> BinaryPair;
 
@@ -67,7 +71,7 @@ private:
   ObjectFile *getObjectFileFromBinary(Binary *Bin, const std::string &ArchName);
 
   std::string printDILineInfo(DILineInfo LineInfo) const;
-  void DemangleName(std::string &Name) const;
+  static std::string DemangleGlobalName(const std::string &Name);
 
   // Owns all the parsed binaries and object files.
   SmallVector<Binary*, 4> ParsedBinariesAndObjects;