From 224d8a74ae4087519f07479bb23de4a3ae53e24f Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 6 Jan 2012 17:19:32 +0000 Subject: When inferring a submodule ID during module creation, look up the include stack to find the first file that is known to be part of the module. This copes with situations where the module map doesn't completely specify all of the headers that are involved in the module, which can come up when there are very strange #include_next chains (e.g., with weird compiler/stdlib headers like stdarg.h or float.h). llvm-svn: 147662 --- clang/test/Modules/Inputs/def-include.h | 13 +++++++++++++ clang/test/Modules/Inputs/def.h | 5 +---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 clang/test/Modules/Inputs/def-include.h (limited to 'clang/test/Modules') diff --git a/clang/test/Modules/Inputs/def-include.h b/clang/test/Modules/Inputs/def-include.h new file mode 100644 index 00000000000..9e0e575e206 --- /dev/null +++ b/clang/test/Modules/Inputs/def-include.h @@ -0,0 +1,13 @@ + + + + + + + + + + +struct B { + int b1; +}; diff --git a/clang/test/Modules/Inputs/def.h b/clang/test/Modules/Inputs/def.h index 7c1a99ef7e6..6d06b081251 100644 --- a/clang/test/Modules/Inputs/def.h +++ b/clang/test/Modules/Inputs/def.h @@ -1,4 +1,4 @@ - +#include "def-include.h" @@ -8,7 +8,4 @@ } @end -struct B { - int b1; -}; -- cgit v1.2.3