[PATCH] D49652: Apply -fdebug-prefix-map in reverse of command line order

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 23 14:19:14 PDT 2018


probinson added a comment.

In https://reviews.llvm.org/D49652#1172352, @alxu wrote:

> I was just going to run llvm-dwarfdump.


Well, that's one of those quirks I mentioned.  This is a Clang change, and Clang tests should exercise as little of LLVM as possible.  That means you don't generate assembler or an object file, if you can possibly help it.  And in this case, the path renaming should be visible in the debug-info metadata, which makes it easy enough to test by emitting LLVM IR and looking at that.  It's by far the most common test idiom for changes to Clang's CodeGen layer.

Given that the prefix mapping happens in the LLVM IR, it should be no harder to emit IR and write a pattern-match than it would be for dwarfdump output.  Really.  Try `clang -g -S -emit-llvm` on some simple test file, then throw a remap option at it and see what's different.


Repository:
  rC Clang

https://reviews.llvm.org/D49652





More information about the cfe-commits mailing list