[PATCH] D59673: [Driver] Allow setting the DWO name DWARF attribute separately
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 7 14:22:38 PDT 2019
aaronpuchert added a comment.
In D59673#1452269 <https://reviews.llvm.org/D59673#1452269>, @dblaikie wrote:
> Ah, fair. You could actually test the dwo_name is accurate in the .dwo file (I added the dwo_name to the .dwo file so that multi-level dwp error messages could be more informative)
Ok, I'll just check the dwo_name for both files then.
>>> (& I guess there's an LLVM patch to add the rest of this functionality?)
>>
>> What do we have to do there? Should we add the option to `llc` as well?
>
> Yep - pretty much anything in MCOptions should be surfaced through llc for llvm-level testing.
I was about to add this when I discovered that there is such an option already. The command line `clang -cc1 -split-dwarf-file a -fsplit-dwarf-dwo-name-attr b` corresponds to `llc -split-dwarf-output a -split-dwarf-file b`. That seems a bit unfortunate, especially the different meanings of `-split-dwarf-file`. Should/can we strive to emulate the behavior of llc in Clang instead? That would perhaps require changes to the behavior of `-split-dwarf-file`. Here's how the options behave with llc:
| Option | ∅ | `-split-dwarf-file a` |
| ∅ | No split | Split DI in same object, set `DW_AT_GNU_dwo_name = a`, no extra file |
| `-split-dwarf-output b` | No split | Split DI, set `DW_AT_GNU_dwo_name = a`, separate file `b` |
|
Currently, Clang's `-enable-split-dwarf[=split] -split-dwarf-file a` does the same as `-split-dwarf-output a -split-dwarf-file a` in llc, and `-enable-split-dwarf=single -split-dwarf-file a` does the same as `-split-dwarf-file a` in llc.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59673/new/
https://reviews.llvm.org/D59673
More information about the cfe-commits
mailing list