WinCOFFObjectWriter: optimize the string table for common suffices
[oota-llvm.git] / include / llvm / MC / StringTableBuilder.h
index ec9910118209a502a34e33b514c746bea4e9ac67..0c58f5c84f6809a488b807e7783bb890a27468ab 100644 (file)
@@ -29,9 +29,14 @@ public:
     return StringIndexMap.GetOrCreateValue(s, 0).getKey();
   }
 
+  enum Kind {
+    ELF,
+    WinCOFF
+  };
+
   /// \brief Analyze the strings and build the final table. No more strings can
   /// be added after this point.
-  void finalize();
+  void finalize(Kind kind);
 
   /// \brief Retrieve the string table data. Can only be used after the table
   /// is finalized.
@@ -48,6 +53,8 @@ public:
     return StringIndexMap[s];
   }
 
+  void clear();
+
 private:
   bool isFinalized() {
     return !StringTable.empty();