From f5416740fc923ed6b24784c8ce73ccf57b6edbbd Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Thu, 4 Feb 2016 00:55:24 +0000 Subject: Fix predefine for __NSConstantString struct type Per review feedback the name was wrong and it can be used outside Objective-C. Unfortunately, making the internal struct visible broke some ASTMatchers tests that assumed that the first record decl would be from user code, rather than a builtin type. I'm worried that this will also affect users' code. So this patch adds a typedef to wrap the internal struct and only makes the typedef visible to namelookup. This is sufficient to allow the ASTReader to merge the decls we need without making the struct itself visible. rdar://problem/24425801 llvm-svn: 259734 --- clang/test/Modules/Inputs/builtin.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'clang/test/Modules/Inputs/builtin.h') diff --git a/clang/test/Modules/Inputs/builtin.h b/clang/test/Modules/Inputs/builtin.h index d8779452342..4717ff2a52a 100644 --- a/clang/test/Modules/Inputs/builtin.h +++ b/clang/test/Modules/Inputs/builtin.h @@ -1,10 +1,7 @@ int i; int *p = &i; -#ifdef __OBJC__ void use_constant_string_builtins(void) { (void)__builtin___CFStringMakeConstantString(""); (void)__builtin___NSStringMakeConstantString(""); } -#endif - -- cgit v1.2.3