[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 22 12:18:47 PDT 2021


leonardchan added a comment.

In D85802#2707677 <https://reviews.llvm.org/D85802#2707677>, @jansvoboda11 wrote:

> The fact that tests pass in assert builds without the argument generation suggests the feature doesn't have sufficient test coverage. Currently, the flag will be dropped during `CompilerInvocation` command-line round-trip and won't have any effect.
>
> The test in `clang/test/Frontend/invalid-cxx-abi.cpp` tests only the driver side and I don't think that's good enough. Can you please add a test that actually hits `-cc1` and checks the flag has the desired behavior?
>
> More context: https://lists.llvm.org/pipermail/cfe-dev/2021-February/067714.html

I added `cc1` invocations to the test and an extra one to assert that the flag is actually making it to codegen. I'm still unsure though how `GenerateLangArgs` should work though. Prior to this, I was still able to assert through both a driver and cc1 invocation that I get the desired behavior in a debug build with assertions enabled.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85802/new/

https://reviews.llvm.org/D85802



More information about the cfe-commits mailing list