diff options
author | Manman Ren <manman.ren@gmail.com> | 2017-01-11 00:48:19 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2017-01-11 00:48:19 +0000 |
commit | 7f41c4d802bec54338f3108f2732c410746a50f2 (patch) | |
tree | 8c2c15c8e014228daac28fcc972df1c875c713e2 /clang/test | |
parent | a9054ddd9ccf8d1a94b4c2a8966bcf44874311ae (diff) | |
download | bcm5719-llvm-7f41c4d802bec54338f3108f2732c410746a50f2.tar.gz bcm5719-llvm-7f41c4d802bec54338f3108f2732c410746a50f2.zip |
Module: Do not create Implicit ImportDecl for module X if we
are building an implemenation of module X.
This fixes a regression caused by r280409.
rdar://problem/29930553
llvm-svn: 291628
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Modules/Inputs/module-impl-with-link/foo.h | 1 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/module-impl-with-link/module.modulemap | 4 | ||||
-rw-r--r-- | clang/test/Modules/module-impl-with-link.c | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/module-impl-with-link/foo.h b/clang/test/Modules/Inputs/module-impl-with-link/foo.h new file mode 100644 index 00000000000..90fe1bcc585 --- /dev/null +++ b/clang/test/Modules/Inputs/module-impl-with-link/foo.h @@ -0,0 +1 @@ +//empty diff --git a/clang/test/Modules/Inputs/module-impl-with-link/module.modulemap b/clang/test/Modules/Inputs/module-impl-with-link/module.modulemap new file mode 100644 index 00000000000..b85f8b6fe80 --- /dev/null +++ b/clang/test/Modules/Inputs/module-impl-with-link/module.modulemap @@ -0,0 +1,4 @@ +module Clib { + header "foo.h" + link "Clib" +} diff --git a/clang/test/Modules/module-impl-with-link.c b/clang/test/Modules/module-impl-with-link.c new file mode 100644 index 00000000000..5e5ca83aafd --- /dev/null +++ b/clang/test/Modules/module-impl-with-link.c @@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -fmodule-name=Clib %s -I %S/Inputs/module-impl-with-link -emit-llvm -o - +#include "foo.h" +// CHECK: !{{[0-9]+}} = !{i32 6, !"Linker Options", ![[LINK_OPTIONS:[0-9]+]]} +// Make sure we don't generate linker option for module Clib since this TU is +// an implementation of Clib. +// CHECK: ![[LINK_OPTIONS]] = !{} |