[Object/ELF] - Make getSymbol() return Error.
That is consistent with other methods around
and helps to handle error on a caller side.
Differential revision: https://reviews.llvm.org/D26247
llvm-svn: 285886
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp
index c1dfe67..578da22 100644
--- a/llvm/lib/Object/Error.cpp
+++ b/llvm/lib/Object/Error.cpp
@@ -50,6 +50,8 @@
return "Invalid section index";
case object_error::bitcode_section_not_found:
return "Bitcode section not found in object file";
+ case object_error::invalid_symbol_index:
+ return "Invalid symbol index";
}
llvm_unreachable("An enumerator of object_error does not have a message "
"defined.");