diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-04 20:02:42 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-04 20:02:42 +0000 |
| commit | c75c4fad469022949df46faf22dbc3aad6d1624c (patch) | |
| tree | 30ebcf04caf51d45c3f2a84d8fde76cafa124af7 /llvm/lib/Bitcode/Reader/BitcodeReader.h | |
| parent | 69bf48eeb153b8f9346b1d0c6a347cb2f59d267e (diff) | |
| download | llvm-c75c4fad469022949df46faf22dbc3aad6d1624c.zip llvm-c75c4fad469022949df46faf22dbc3aad6d1624c.tar.gz llvm-c75c4fad469022949df46faf22dbc3aad6d1624c.tar.bz2 | |
Revert "Convert a few std::strings to StringRef."
This reverts commit r212342.
We can get a StringRef into the current Record, but not one in the bitcode
itself since the string is compressed in it.
llvm-svn: 212356
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h index e831ea5..1d4869a 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.h +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.h @@ -196,9 +196,6 @@ class BitcodeReader : public GVMaterializer { static const std::error_category &BitcodeErrorCategory(); - static ErrorOr<StringRef> convertToStringRef(ArrayRef<uint64_t> Record, - unsigned Idx); - public: enum ErrorType { BitcodeStreamInvalidSize, @@ -223,7 +220,7 @@ public: InvalidValue // Invalid version, inst number, attr number, etc }; - static std::error_code Error(ErrorType E) { + std::error_code Error(ErrorType E) { return std::error_code(E, BitcodeErrorCategory()); } @@ -255,7 +252,7 @@ public: /// @brief Cheap mechanism to just extract module triple /// @returns true if an error occurred. - ErrorOr<StringRef> parseTriple(); + ErrorOr<std::string> parseTriple(); static uint64_t decodeSignRotatedValue(uint64_t V); @@ -357,7 +354,7 @@ private: std::error_code ResolveGlobalAndAliasInits(); std::error_code ParseMetadata(); std::error_code ParseMetadataAttachment(); - ErrorOr<StringRef> parseModuleTriple(); + ErrorOr<std::string> parseModuleTriple(); std::error_code ParseUseLists(); std::error_code InitStream(); std::error_code InitStreamFromBuffer(); |
