[Remarks] Introduce a new format: yaml-strtab
This exposes better support to use a string table with a format through
an actual new remark::Format, called yaml-strtab.
This can now be used with -fsave-optimization-record=yaml-strtab.
llvm-svn: 366849
diff --git a/llvm/lib/Remarks/YAMLRemarkSerializer.cpp b/llvm/lib/Remarks/YAMLRemarkSerializer.cpp
index e437974..1297fbc 100644
--- a/llvm/lib/Remarks/YAMLRemarkSerializer.cpp
+++ b/llvm/lib/Remarks/YAMLRemarkSerializer.cpp
@@ -17,10 +17,6 @@
using namespace llvm;
using namespace llvm::remarks;
-cl::opt<bool> RemarksYAMLStringTable(
- "remarks-yaml-string-table", cl::init(false), cl::Hidden,
- cl::desc("Enable the usage of a string table with YAML remarks."));
-
// Use the same keys whether we use a string table or not (respectively, T is an
// unsigned or a StringRef).
template <typename T>
@@ -153,11 +149,8 @@
LLVM_YAML_IS_SEQUENCE_VECTOR(Argument)
-YAMLSerializer::YAMLSerializer(raw_ostream &OS, UseStringTable UseStringTable)
- : Serializer(OS), YAMLOutput(OS, reinterpret_cast<void *>(this)) {
- if (UseStringTable == remarks::UseStringTable::Yes || RemarksYAMLStringTable)
- StrTab.emplace();
-}
+YAMLSerializer::YAMLSerializer(raw_ostream &OS)
+ : Serializer(OS), YAMLOutput(OS, reinterpret_cast<void *>(this)) {}
void YAMLSerializer::emit(const Remark &Remark) {
// Again, YAMLTraits expect a non-const object for inputting, but we're not