[Remarks][NFC] Move the string table parsing out of the parser constructor

Make the parser take an already-parsed string table.

llvm-svn: 365101
diff --git a/llvm/lib/Remarks/RemarkParser.cpp b/llvm/lib/Remarks/RemarkParser.cpp
index 144f08f..1e14ca8 100644
--- a/llvm/lib/Remarks/RemarkParser.cpp
+++ b/llvm/lib/Remarks/RemarkParser.cpp
@@ -22,8 +22,8 @@
 
 Parser::Parser(StringRef Buf) : Impl(llvm::make_unique<YAMLParserImpl>(Buf)) {}
 
-Parser::Parser(StringRef Buf, StringRef StrTabBuf)
-    : Impl(llvm::make_unique<YAMLParserImpl>(Buf, StrTabBuf)) {}
+Parser::Parser(StringRef Buf, const ParsedStringTable &StrTab)
+    : Impl(llvm::make_unique<YAMLParserImpl>(Buf, &StrTab)) {}
 
 Parser::~Parser() = default;
 
@@ -69,7 +69,7 @@
   }
 }
 
-Expected<StringRef> ParsedStringTable::operator[](size_t Index) {
+Expected<StringRef> ParsedStringTable::operator[](size_t Index) const {
   if (Index >= Offsets.size())
     return createStringError(
         std::make_error_code(std::errc::invalid_argument),