aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/pp-record.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-27 18:47:48 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-27 18:47:48 +0000
commitdb81d38d9cd468a9eeffe8ab092be4d48e43888e (patch)
tree55a88d48974070cdae846f824d2bb77f801c818e /test/Preprocessor/pp-record.c
parente0335786c17a6ca45966f66094146e9d8ba2d54a (diff)
[preprocessor] Handle correctly inclusion directives that have macro expansions, e.g
"#include MACRO(STUFF)". -As an inclusion position for the included file, use the file location of the file where it was included but *after* the macro expansions. We want the macro expansions to be considered as before-in-translation-unit for everything in the included file. -In the preprocessing record take into account that only inclusion directives can be encountered as "out-of-order" (by comparing the start of the range which for inclusions is the hash location) and use binary search if there is an extreme number of macro expansions in the include directive. Fixes rdar://11111779 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/pp-record.c')
-rw-r--r--test/Preprocessor/pp-record.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/Preprocessor/pp-record.c b/test/Preprocessor/pp-record.c
index dcb52b56b7..f098683eea 100644
--- a/test/Preprocessor/pp-record.c
+++ b/test/Preprocessor/pp-record.c
@@ -2,8 +2,11 @@
// http://llvm.org/PR11120
-#define FILE_HEADER_NAME "pp-record.h"
+#define STRINGIZE(text) STRINGIZE_I(text)
+#define STRINGIZE_I(text) #text
-#if defined(FILE_HEADER_NAME)
-#include FILE_HEADER_NAME
-#endif
+#define INC pp-record.h
+
+#include STRINGIZE(INC)
+
+CAKE;