This option was in a rather convoluted place, causing global parameters
to be set in awkward and undesirable ways to try to account for it
indirectly. Add tests for the -disable-debug-info option and ensure we
don't print unintended markers from unintended places.
Details
- Reviewers
uabelho dstenb - Commits
- rG9606ef03f039: [AsmPrinter] fix -disable-debug-info option
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks! The problem I saw is fixed with this patch.
@dstenb : Any opinions about this?
Thanks! This looks good to me.
Since the option is now moved into AsmPrinter, can you add a FIXME comment to clarify that the option does (still) not work when emitting CodeView? E.g. at line 320.
The test fails on Mac, see e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8863756117615904432/+/steps/package_clang/0/stdout
The output of the first run line is:
$ bin/llc -disable-debug-info-print=true -exception-model=dwarf -o - ../llvm/test/CodeGen/Generic/disable-debug-info-print.ll .section __TEXT,__text,regular,pure_instructions .build_version macos, 10, 15 .globl _main ## -- Begin function main .p2align 4, 0x90 _main: ## @main ## %bb.0: ## %entry xorl %eax, %eax retq ## -- End function .globl _helper ## -- Begin function helper .p2align 4, 0x90 _helper: ## @helper .cfi_startproc ## %bb.0: ## %entry xorl %eax, %eax retq .cfi_endproc ## -- End function .subsections_via_symbols
Note that the .file directive which the test checks for isn't there.
The failure is probably reproducible by passing a -mtriple=darwin something to llc.
I've reverted in 105ed27ed80dd47a9d32e72bbdd2a776a3318f38 in the meantime.
Thanks for identifying that. I think I can re-land just without that part of the test. It is not essential, I added it just to try to check all of the dwarf-related output.