diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-29 14:39:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-29 14:39:25 +0000 |
commit | 6a1bfb2f9b4f0c56099475d6aaba7b218600d666 (patch) | |
tree | 77cc7de80d3d6f9b00e1f3a0a59f1dd6f3db16f8 /llvm/lib/Object/Error.cpp | |
parent | ffb551b2b03566620fd037736c9bfc089c5102f5 (diff) | |
download | bcm5719-llvm-6a1bfb2f9b4f0c56099475d6aaba7b218600d666.tar.gz bcm5719-llvm-6a1bfb2f9b4f0c56099475d6aaba7b218600d666.zip |
Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.
This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.
llvm-svn: 240950
Diffstat (limited to 'llvm/lib/Object/Error.cpp')
-rw-r--r-- | llvm/lib/Object/Error.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp index 644a178c162..5d613d77609 100644 --- a/llvm/lib/Object/Error.cpp +++ b/llvm/lib/Object/Error.cpp @@ -41,6 +41,8 @@ std::string _object_error_category::message(int EV) const { return "Invalid data was encountered while parsing the file"; case object_error::unexpected_eof: return "The end of the file was unexpectedly encountered"; + case object_error::string_table_non_null_end: + return "String table must end with a null terminator"; case object_error::bitcode_section_not_found: return "Bitcode section not found in object file"; case object_error::macho_small_load_command: |