Use getError and remove the error_code operator.
[oota-llvm.git] / tools / llvm-readobj / ELFDumper.cpp
index b82cecdd4d978eebde8c8ca91223545e7764f663..77405714a48000e4d6163e8652bd74d8bd462edf 100644 (file)
@@ -66,7 +66,7 @@ private:
 
 template <class T> T errorOrDefault(ErrorOr<T> Val, T Default = T()) {
   if (!Val) {
-    error(Val);
+    error(Val.getError());
     return Default;
   }
 
@@ -632,7 +632,7 @@ void ELFDumper<ELFT>::printSymbol(typename ELFO::Elf_Sym_Iter Symbol) {
       FullSymbolName += (IsDefault ? "@@" : "@");
       FullSymbolName += *Version;
     } else
-      error(Version);
+      error(Version.getError());
   }
 
   DictScope D(W, "Symbol");