This revision was automatically updated to reflect the committed changes.
Closed by commit rL300108: [Modules] Enable local submodule visibility for
ObjC/C (authored by bruno).
Changed prior to commit:
https://reviews.llvm.org/D31781?vs=94407=95034#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31781
Files:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/Modules/localsubmodulevis.m
Index: cfe/trunk/test/Modules/localsubmodulevis.m
===
--- cfe/trunk/test/Modules/localsubmodulevis.m
+++ cfe/trunk/test/Modules/localsubmodulevis.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility
-fimplicit-module-maps -fmodules-cache-path=%t.a -I %S/Inputs/preprocess
-verify %s
+// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility
-fimplicit-module-maps -fmodules-cache-path=%t.b -I %S/Inputs/preprocess -x c
-verify -x c %s
+
+// expected-no-diagnostics
+
+#include "file.h"
+
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -2117,12 +2117,6 @@
Args.hasFlag(OPT_fdeclspec, OPT_fno_declspec,
(Opts.MicrosoftExt || Opts.Borland || Opts.CUDA));
- // 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(A->getValue())
.Case("target", LangOptions::ASMM_Target)
Index: cfe/trunk/test/Modules/localsubmodulevis.m
===
--- cfe/trunk/test/Modules/localsubmodulevis.m
+++ cfe/trunk/test/Modules/localsubmodulevis.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fimplicit-module-maps -fmodules-cache-path=%t.a -I %S/Inputs/preprocess -verify %s
+// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fimplicit-module-maps -fmodules-cache-path=%t.b -I %S/Inputs/preprocess -x c -verify -x c %s
+
+// expected-no-diagnostics
+
+#include "file.h"
+
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -2117,12 +2117,6 @@
Args.hasFlag(OPT_fdeclspec, OPT_fno_declspec,
(Opts.MicrosoftExt || Opts.Borland || Opts.CUDA));
- // 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(A->getValue())
.Case("target", LangOptions::ASMM_Target)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits