[all-commits] [llvm/llvm-project] fcf75a: [clang][cli] Fix generation of '-fvisibility' with...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Fri Mar 5 01:57:42 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fcf75ae6ce20e3575b1464ce724619f38c43edd2
https://github.com/llvm/llvm-project/commit/fcf75ae6ce20e3575b1464ce724619f38c43edd2
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2021-03-05 (Fri, 05 Mar 2021)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/lib/Frontend/CompilerInvocation.cpp
Log Message:
-----------
[clang][cli] Fix generation of '-fvisibility' with regards to '-mignore-xcoff-visibility'
This patch fixes failure of the `CodeGen/aix-ignore-xcoff-visibility.cpp` test with command line round-trip.
The absence of '-fvisibility' implies '-mignore-xcoff-visibility'.
The problem is that when '-fvisibility default' is passed to -cc1, it isn't being generated. (This adheres to the principle that generation doesn't produce arguments with default values.)
However, that caused '-mignore-xcoff-visibility' to be implied in the generated command line (without '-fvisibility'), while it wasn't implied in the original command line (with '-fvisibility').
This patch fixes that by always generating '-fvisibility' and explains the situation in comment.
(The '-mginore-xcoff-visibility' option was added in D87451).
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D97552
More information about the All-commits
mailing list