diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-16 20:05:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-16 20:05:18 +0000 |
commit | a081da5e44600d02983d6562bed1b4fd61e410fd (patch) | |
tree | 4e375ae850fd64690541ca5d5a57b440a2d27d40 /test/Modules/normal-module-map.cpp | |
parent | 3d5f24ae1ad6241e630b7824eb8d02a8576193ab (diff) |
Implement (de-)serialization of the buffer contents for an overridden
file in the source manager. This allows us to properly create and use
modules described by module map files without umbrella headers (or
with incompletely umbrella headers). More generally, we can actually
build a PCH file that makes use of file -> buffer remappings, which
could be useful in libclang in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/normal-module-map.cpp')
-rw-r--r-- | test/Modules/normal-module-map.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp index 9e9f31578d..c8338b7061 100644 --- a/test/Modules/normal-module-map.cpp +++ b/test/Modules/normal-module-map.cpp @@ -1,4 +1,8 @@ // RUN: rm -rf %t +// FIXME: Eventually, we should be able to remove these explicit module creation lines +// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodule-name=libA -emit-module-from-map %S/Inputs/normal-module-map/module.map +// 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" @@ -8,9 +12,7 @@ int getUmbrella() { __import_module__ Umbrella2; -// FIXME: The expected error here is temporary, since we don't yet have the -// logic to build a module from a module map. -#include "a1.h" // expected-error{{module 'libA' not found}} +#include "a1.h" #include "b1.h" #include "nested/nested2.h" |