diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 1d6723f33a0..11750224d8c 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1597,6 +1597,12 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, << Opts.CurrentModule << Opts.ImplementationOfModule; } + // For now, we only support local submodule visibility in C++ (because we + // heavily depend on the ODR for merging redefinitions). + if (Opts.ModulesLocalVisibility && !Opts.CPlusPlus) + Diags.Report(diag::err_drv_argument_not_allowed_with) + << "-fmodules-local-submodule-visibility" << "C"; + if (Arg *A = Args.getLastArg(OPT_faddress_space_map_mangling_EQ)) { switch (llvm::StringSwitch<unsigned>(A->getValue()) .Case("target", LangOptions::ASMM_Target) |