[PATCH] D97552: [clang][cli] Fix generation of '-fvisibility' with regards to '-mignore-xcoff-visibility'

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 9 04:40:47 PST 2021


jansvoboda11 added a comment.

In D97552#2607842 <https://reviews.llvm.org/D97552#2607842>, @DiggerLin wrote:

> 1. in your summary , it looks  clang will emit "-fvisibility default"  to cc1 even if there is no -fvisibility in the clang command ?  I compiled the clang with your patch, it looks do not always emit "-fvisibility default"  to cc1.  I understand wrong on your summary ?
> 2. If clang will emit "-fvisibility default"  to cc1 when there is no -fvisibility in the clang command, it is a new functionality , there should be a test case for it?



1. `-fvisibility default` will be generated by `CompilerInvocation::generateCC1CommandLine`, which will be used during Clang modules build. Not by the Clang driver when constructing `-cc1` invocation on normal (non-modular) build.
2. This code is tested by a round-trip mechanism when `-DCLANG_ROUND_TRIP_CC1_ARGS` is turned on: https://lists.llvm.org/pipermail/cfe-dev/2021-February/067714.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97552



More information about the cfe-commits mailing list