diff options
author | Ben Langmuir <blangmuir@apple.com> | 2015-10-28 22:25:37 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2015-10-28 22:25:37 +0000 |
commit | b9ad4e60638131f4d68c18f128bf44ccec2cd77c (patch) | |
tree | df6f584bfb6f07b12dd63e557e4e9efaea7d8895 /clang/test/Modules/builtins.m | |
parent | a309efef399d342a364d051581b5f3738deba370 (diff) | |
download | bcm5719-llvm-b9ad4e60638131f4d68c18f128bf44ccec2cd77c.tar.gz bcm5719-llvm-b9ad4e60638131f4d68c18f128bf44ccec2cd77c.zip |
Fix missing builtin identifier infos with PCH+modules
Use the *current* state of "is-moduleness" rather than the state at
serialization time so that if we read a builtin identifier from a module
that wasn't "interesting" to that module, we will still write it out to
a PCH that imports that module.
Otherwise, we would get mysterious "unknown builtin" errors when using
PCH+modules.
rdar://problem/23287656
llvm-svn: 251565
Diffstat (limited to 'clang/test/Modules/builtins.m')
-rw-r--r-- | clang/test/Modules/builtins.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Modules/builtins.m b/clang/test/Modules/builtins.m index c095f4f0164..33d23979ce7 100644 --- a/clang/test/Modules/builtins.m +++ b/clang/test/Modules/builtins.m @@ -10,7 +10,15 @@ int bar() { return __builtin_object_size(p, 0); } +int baz() { + return IS_CONST(0); +} // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify + +// RUN: rm -rf %t.pch.cache +// RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %S/Inputs/use-builtin.h +// RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs %s -include-pch %t.pch %s -verify + // expected-no-diagnostics |