summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-16 23:02:25 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-16 23:02:25 +0000
commitb65dbfff527537c10406632e14ecd94b8896a042 (patch)
tree72e38ff66539dbf2e9295efb14a1bd6aed1202a1 /clang/test
parentf4d2e0d458394a537e9ca82f6ef16ae72995b4bf (diff)
downloadbcm5719-llvm-b65dbfff527537c10406632e14ecd94b8896a042.tar.gz
bcm5719-llvm-b65dbfff527537c10406632e14ecd94b8896a042.zip
A module with an umbrella header assumes that all of the headers in
the umbrella header's directory and its subdirectories are part of the module (that's why it's an umbrella). Make sure that these headers are considered to be part of the module for lookup purposes. llvm-svn: 144859
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/Inputs/module.map38
-rw-r--r--clang/test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h3
-rw-r--r--clang/test/Modules/normal-module-map.cpp4
3 files changed, 24 insertions, 21 deletions
diff --git a/clang/test/Modules/Inputs/module.map b/clang/test/Modules/Inputs/module.map
index aefaf9d73a1..b14ab24a8a2 100644
--- a/clang/test/Modules/Inputs/module.map
+++ b/clang/test/Modules/Inputs/module.map
@@ -1,19 +1,19 @@
-module diamond_top { umbrella "diamond_top.h" }
-module diamond_left { umbrella "diamond_left.h" }
-module diamond_right { umbrella "diamond_right.h" }
-module diamond_bottom { umbrella "diamond_bottom.h" }
-module irgen { umbrella "irgen.h" }
-module lookup_left_objc { umbrella "lookup_left.h" }
-module lookup_right_objc { umbrella "lookup_right.h" }
-module lookup_left_cxx { umbrella "lookup_left.hpp" }
-module lookup_right_cxx { umbrella "lookup_right.hpp" }
-module module_private_left { umbrella "module_private_left.h" }
-module module_private_right { umbrella "module_private_right.h" }
-module macros { umbrella "macros.h" }
-module category_top { umbrella "category_top.h" }
-module category_left { umbrella "category_left.h" }
-module category_right { umbrella "category_right.h" }
-module category_bottom { umbrella "category_bottom.h" }
-module redeclarations_left { umbrella "redeclarations_left.h" }
-module redeclarations_right { umbrella "redeclarations_right.h" }
-module load_failure { umbrella "load_failure.h" }
+module diamond_top { header "diamond_top.h" }
+module diamond_left { header "diamond_left.h" }
+module diamond_right { header "diamond_right.h" }
+module diamond_bottom { header "diamond_bottom.h" }
+module irgen { header "irgen.h" }
+module lookup_left_objc { header "lookup_left.h" }
+module lookup_right_objc { header "lookup_right.h" }
+module lookup_left_cxx { header "lookup_left.hpp" }
+module lookup_right_cxx { header "lookup_right.hpp" }
+module module_private_left { header "module_private_left.h" }
+module module_private_right { header "module_private_right.h" }
+module macros { header "macros.h" }
+module category_top { header "category_top.h" }
+module category_left { header "category_left.h" }
+module category_right { header "category_right.h" }
+module category_bottom { header "category_bottom.h" }
+module redeclarations_left { header "redeclarations_left.h" }
+module redeclarations_right { header "redeclarations_right.h" }
+module load_failure { header "load_failure.h" }
diff --git a/clang/test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h b/clang/test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h
index 5d201f58d2c..74623765585 100644
--- a/clang/test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h
+++ b/clang/test/Modules/Inputs/normal-module-map/Umbrella/Umbrella.h
@@ -1 +1,4 @@
int umbrella;
+
+#include "umbrella_sub.h"
+
diff --git a/clang/test/Modules/normal-module-map.cpp b/clang/test/Modules/normal-module-map.cpp
index c8338b7061d..c87657f5a9b 100644
--- a/clang/test/Modules/normal-module-map.cpp
+++ b/clang/test/Modules/normal-module-map.cpp
@@ -4,10 +4,10 @@
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodule-name=libB -emit-module-from-map %S/Inputs/normal-module-map/module.map
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodule-name=libNested -emit-module-from-map %S/Inputs/normal-module-map/nested/module.map
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map %s -verify
-#include "Umbrella/Umbrella.h"
+#include "Umbrella/umbrella_sub.h"
int getUmbrella() {
- return umbrella;
+ return umbrella + umbrella_sub;
}
__import_module__ Umbrella2;
OpenPOWER on IntegriCloud