aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-12 23:36:15 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-12 23:36:15 +0000
commit279b5eb6910d64a293e9c0e2887a05c65d8737d7 (patch)
tree5537a0f31a4265fc8167a0c7dd6868338f1d2b0a /include
parentf18d0d8b39e891460d50f8a8b85029885b264986 (diff)
Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects, and the optimization isn't really that valuable. Platforms with less ornery linkers can feel free to enable this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Driver/CC1Options.td2
-rw-r--r--include/clang/Frontend/CodeGenOptions.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index c83818a4b7..13d7e64be6 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -400,6 +400,8 @@ def ffreestanding : Flag<"-ffreestanding">,
HelpText<"Assert that the compilation takes place in a freestanding environment">;
def fgnu_runtime : Flag<"-fgnu-runtime">,
HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
+def fhidden_weak_vtables : Flag<"-fhidden-weak-vtables">,
+ HelpText<"Generate weak vtables and RTTI with hidden visibility">;
def std_EQ : Joined<"-std=">,
HelpText<"Language standard to compile for">;
def fmath_errno : Flag<"-fmath-errno">,
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h
index 63f247b5a9..0df8444cb1 100644
--- a/include/clang/Frontend/CodeGenOptions.h
+++ b/include/clang/Frontend/CodeGenOptions.h
@@ -50,8 +50,10 @@ public:
/// various IR entities came from. Only useful
/// when running CodeGen as a subroutine.
unsigned FunctionSections : 1; /// Set when -ffunction-sections is enabled
- unsigned EmitWeakTemplatesHidden : 1; /// Emit weak vtables and typeinfo for
+ unsigned HiddenWeakTemplateVTables : 1; /// Emit weak vtables and RTTI for
/// template classes with hidden visibility
+ unsigned HiddenWeakVTables : 1; /// Emit weak vtables, RTTI, and thunks with
+ /// hidden visibility
unsigned InstrumentFunctions : 1; /// Set when -finstrument-functions is enabled
unsigned MergeAllConstants : 1; /// Merge identical constants.
unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
@@ -112,7 +114,8 @@ public:
DisableRedZone = 0;
EmitDeclMetadata = 0;
FunctionSections = 0;
- EmitWeakTemplatesHidden = 0;
+ HiddenWeakTemplateVTables = 0;
+ HiddenWeakVTables = 0;
MergeAllConstants = 1;
NoCommon = 0;
NoImplicitFloat = 0;