mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 00:16:25 +00:00
[llvm-bcanalyzer] Don't dump the contents if -dump is not passed
With all the previous refactorings this slipped through and now we always dump the contents of the bitcode files, even if -dump is not passed.
This commit is contained in:
parent
7a21472d38
commit
e206b99c28
11
test/Other/bcanalyzer-dump-option.txt
Normal file
11
test/Other/bcanalyzer-dump-option.txt
Normal file
@ -0,0 +1,11 @@
|
||||
RUN: llvm-bcanalyzer -dump %S/Inputs/has-block-info.bc | FileCheck -check-prefix=WITH-DUMP %s
|
||||
RUN: llvm-bcanalyzer %S/Inputs/has-block-info.bc | FileCheck -check-prefix=WITHOUT-DUMP %s
|
||||
|
||||
WITH-DUMP: <ABC
|
||||
WITHOUT-DUMP-NOT: <ABC
|
||||
WITH-DUMP: </ABC>
|
||||
WITHOUT-DUMP-NOT: </ABC>
|
||||
WITH-DUMP: <XYZ
|
||||
WITHOUT-DUMP-NOT: <XYZ
|
||||
WITH-DUMP: </XYZ>
|
||||
WITHOUT-DUMP-NOT: </XYZ>
|
@ -102,8 +102,9 @@ int main(int argc, char **argv) {
|
||||
O.Symbolic = !NonSymbolic;
|
||||
O.ShowBinaryBlobs = ShowBinaryBlobs;
|
||||
|
||||
ExitOnErr(
|
||||
BA.analyze(O, CheckHash.empty() ? None : Optional<StringRef>(CheckHash)));
|
||||
ExitOnErr(BA.analyze(
|
||||
Dump ? Optional<BCDumpOptions>(O) : Optional<BCDumpOptions>(None),
|
||||
CheckHash.empty() ? None : Optional<StringRef>(CheckHash)));
|
||||
|
||||
if (Dump)
|
||||
outs() << "\n\n";
|
||||
|
Loading…
Reference in New Issue
Block a user