[PATCH] D91624: [llvm-readelf/obj] - Improve the error reporting in printStackSize().
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 02:03:48 PST 2020
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/stack-sizes.test:397-398
# RUN: yaml2obj --docnum=7 %s -o %t07
-# RUN: llvm-readelf --stack-sizes %t07 2> %t07-gnu.err | FileCheck %s --check-prefix=BADSECTION-OUT-GNU
-# RUN: FileCheck %s < %t07-gnu.err --check-prefix=BADSECTION-ERR -DFILE=%t07
-# RUN: llvm-readobj --stack-sizes %t07 2> %t07-llvm.err | FileCheck %s --check-prefix=BADSECTION-OUT-LLVM
-# RUN: FileCheck %s < %t07-llvm.err --check-prefix=BADSECTION-ERR -DFILE=%t07
-
-# RUN: llvm-readelf --stack-sizes --demangle %t07 2>&1 | FileCheck %s --check-prefix=BADSECTION-DEMANGLE-ERR -DFILE=%t07
-# RUN: llvm-readobj --stack-sizes --demangle %t07 2>&1 | FileCheck %s --check-prefix=BADSECTION-DEMANGLE-ERR -DFILE=%t07
-
-# BADSECTION-OUT-GNU: Size Function
-# BADSECTION-OUT-GNU: 8 ?
+# RUN: llvm-readelf --stack-sizes %t07 2>&1 | FileCheck %s -DFILE=%t07 --check-prefix=BADSECTION-OUT-GNU
+# RUN: llvm-readobj --stack-sizes %t07 2>&1 | FileCheck %s -DFILE=%t07 --check-prefix=BADSECTION-OUT-LLVM
+
----------------
jhenderson wrote:
> Would `--implicit-check-not=warning:` be worthwhile?
Done.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5847
+ (*TargetOrErr).Name + "': " + toString(SectionOrErr.takeError())));
consumeError(SectionOrErr.takeError());
+ } else if (*SectionOrErr != FunctionSec) {
----------------
jhenderson wrote:
> I think you can delete this `consumeError` since you're calling `takeError` above, right?
Right. Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91624/new/
https://reviews.llvm.org/D91624
More information about the llvm-commits
mailing list