[PATCH] D95605: [llvm-readobj/elf] - Report "bitcode files are not supported" warning for bitcode files.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 05:32:03 PST 2021
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/basic.test:24
+## Test we report a meaningful warning for bitcode files.
+## Check we are trying to continue dumping other files.
+
----------------
================
Comment at: llvm/test/tools/llvm-readobj/basic.test:27
+## Note: 'echo -e -n "\x42\x43\xc0\xde" > %t.bc.1' simply doesn't work properly on windows.
+## It has an issue with writing of 2 last bytes and emits a different data instead.
+## echo.exe from GnuWin32 works properly though, but using of python is a more stable way.
----------------
I'm guessing the problem is related to the third and fourth bytes being greater than 0x7f and therefore potentially signed?
================
Comment at: llvm/test/tools/llvm-readobj/basic.test:33-34
+RUN: FileCheck --check-prefix=BITCODE -DFILE1=%t.bc.1 -DFILE2=%t.bc.2 %s
+RUN: llvm-readobj %t.bc.1 %t.bc.2 2>&1 | \
+RUN: FileCheck --check-prefix=BITCODE -DFILE1=%t.bc.1 -DFILE2=%t.bc.2 %s
+
----------------
Did you mean to repeat this check twice? Doesn't seem to be much point in that... I'm guessing you meant to do them the other way around.
================
Comment at: llvm/tools/llvm-readobj/llvm-readobj.cpp:659
+ reportWarning(createStringError(errc::invalid_argument,
+ "bitcode files are not supported."),
+ File);
----------------
Error messages generally don't end in a full stop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95605/new/
https://reviews.llvm.org/D95605
More information about the llvm-commits
mailing list