Skip to content

Commit c429dd8

Browse files
committed
Update error message.
1 parent 8ebe0a2 commit c429dd8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

llvm/test/tools/llvm-readobj/ELF/call-graph-info-err-invalid-flags.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# RUN: not llvm-readelf --elf-output-style=LLVM --call-graph-info %t 2>&1 | FileCheck %s -DFILE=%t --check-prefix=ERR
99
# RUN: not llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t 2>&1 | FileCheck %s -DFILE=%t --check-prefix=ERR
1010

11-
# ERR: error: 'While reading call graph info's Flags': Unknown Flags. Expected a value in the range [0-7] but found [8]
11+
# ERR: error: 'While reading call graph info's Flags': Unexpected value. Expected [0-7] but found [8]
1212

1313
.text
1414
.globl _Z3foov

llvm/tools/llvm-readobj/ELFDumper.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5385,11 +5385,9 @@ template <class ELFT> bool ELFDumper<ELFT>::processCallGraphSection() {
53855385
"While reading call graph info's Flags");
53865386
callgraph::Flags CGFlags = static_cast<callgraph::Flags>(FlagsVal);
53875387
if (FlagsVal > 7) {
5388-
reportError(
5389-
createError(
5390-
"Unknown Flags. Expected a value in the range [0-7] but found [" +
5391-
std::to_string(FlagsVal) + "]"),
5392-
"While reading call graph info's Flags");
5388+
reportError(createError("Unexpected value. Expected [0-7] but found [" +
5389+
std::to_string(FlagsVal) + "]"),
5390+
"While reading call graph info's Flags");
53935391
}
53945392
uint64_t FuncAddrOffset = Offset;
53955393
typename ELFT::uint FuncAddr =

0 commit comments

Comments
 (0)