]> granicus.if.org Git - llvm/commitdiff
[llvm-nm] Small fix to Exected<StringRef>
authorSid Manning <sidneym@quicinc.com>
Fri, 30 Aug 2019 14:12:04 +0000 (14:12 +0000)
committerSid Manning <sidneym@quicinc.com>
Fri, 30 Aug 2019 14:12:04 +0000 (14:12 +0000)
Differential Revision: https://reviews.llvm.org/D66976

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370474 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-nm/llvm-nm.cpp

index b2cc8fba1777cf3b303552c10f1e0fdd9dc8f4b9..6f9b38dfb3fac77d181eeee9f5c53e54e7585c41 100644 (file)
@@ -1099,7 +1099,7 @@ static char getNMSectionTagAndName(SymbolicFile &Obj, basic_symbol_iterator I,
 
       Expected<StringRef> NameOrErr = (*SecIOrErr)->getName();
       if (!NameOrErr) {
-        consumeError(SecIOrErr.takeError());
+        consumeError(NameOrErr.takeError());
         return '?';
       }
       SecName = *NameOrErr;