This is an archive of the discontinued LLVM Phabricator instance.

-fdebug-prefix-map option for cc1as
ClosedPublic

Authored by starsid on Jul 5 2018, 12:19 PM.

Diff Detail

Repository
rC Clang

Event Timeline

starsid created this revision.Jul 5 2018, 12:19 PM
starsid updated this revision to Diff 154285.Jul 5 2018, 12:27 PM

include generator input file for flag property change

compnerd accepted this revision.Jul 5 2018, 2:52 PM

This seems reasonable if you need the support in the assembler. However, please add a test to ensure that the paths are mapped when invoking the assembler rather than the compiler.

This revision is now accepted and ready to land.Jul 5 2018, 2:52 PM
starsid updated this revision to Diff 154354.Jul 5 2018, 10:33 PM

add a test for the Driver passing the new flag

However, please add a test to ensure that the paths are mapped when invoking the assembler

I added the tests to check the mapping logic through llvm-mc in D48988. In this revision, I merely test if the driver is passing the flags to cc1as. The only thing that is untested is if cc1as_main is setting the options in MCContext correctly. If you want to see a test for that, please can you guide me a little on an appropriate way to test this within tools/clang/test.

However, please add a test to ensure that the paths are mapped when invoking the assembler

I added the tests to check the mapping logic through llvm-mc in D48988. In this revision, I merely test if the driver is passing the flags to cc1as. The only thing that is untested is if cc1as_main is setting the options in MCContext correctly. If you want to see a test for that, please can you guide me a little on an appropriate way to test this within tools/clang/test.

That would be more of an integration test, which we don't generally have in the 'lit' tests. I think demonstrating correct mapping by llvm-mc is fine.

I have made a suggestion for the test in this patch, which helps show the option is being passed to cc1as as intended.

test/Driver/debug-prefix-map.S
4

To show that the option is on the cc1as command line specifically:
CHECK: cc1as
CHECK-SAME: -fdebug-prefix-map=old=new

starsid updated this revision to Diff 154669.Jul 9 2018, 12:01 PM
starsid marked an inline comment as done.

Test improvements

This revision was automatically updated to reflect the committed changes.