From 529ecb237ac423b29a555b5ef930c118d117a542 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 22 Jun 2015 21:15:01 +0000 Subject: [modules] Add a flag to disable the feature that permits conflicting redefinitions of internal-linkage symbols that are not visible. Such conflicts are an accident waiting to happen, and this feature conflicts with the desire to include existing headers into multiple modules and merge the results. (In an ideal world, it should not be possible to export internal linkage symbols from a module, but sadly the glibc and libstdc++ headers provide 'static inline' functions in a few cases.) llvm-svn: 240335 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 7a3391685a4..2d26548db39 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1521,6 +1521,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Args.hasArg(OPT_fmodules_decluse) || Opts.ModulesStrictDeclUse; Opts.ModulesLocalVisibility = Args.hasArg(OPT_fmodules_local_submodule_visibility); + Opts.ModulesHideInternalLinkage = + !Args.hasArg(OPT_fno_modules_hide_internal_linkage); Opts.ModulesSearchAll = Opts.Modules && !Args.hasArg(OPT_fno_modules_search_all) && Args.hasArg(OPT_fmodules_search_all); -- cgit v1.2.3