Reapply r259624, it is likely not the commit causing the bot failures.
Original message: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259721 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/ASTContext.h 1 addition, 0 deletionsinclude/clang/AST/ASTContext.h
- include/clang/Serialization/ASTBitCodes.h 4 additions, 1 deletioninclude/clang/Serialization/ASTBitCodes.h
- lib/AST/ASTContext.cpp 10 additions, 4 deletionslib/AST/ASTContext.cpp
- lib/Sema/Sema.cpp 4 additions, 0 deletionslib/Sema/Sema.cpp
- lib/Serialization/ASTReader.cpp 3 additions, 0 deletionslib/Serialization/ASTReader.cpp
- lib/Serialization/ASTWriter.cpp 2 additions, 0 deletionslib/Serialization/ASTWriter.cpp
- test/CodeGenObjC/2010-02-01-utf16-with-null.m 2 additions, 2 deletionstest/CodeGenObjC/2010-02-01-utf16-with-null.m
- test/CodeGenObjC/arc-no-arc-exceptions.m 1 addition, 1 deletiontest/CodeGenObjC/arc-no-arc-exceptions.m
- test/CodeGenObjC/tentative-cfconstantstring.m 2 additions, 2 deletionstest/CodeGenObjC/tentative-cfconstantstring.m
- test/Modules/Inputs/builtin.h 7 additions, 0 deletionstest/Modules/Inputs/builtin.h
- test/Modules/builtins.m 18 additions, 8 deletionstest/Modules/builtins.m
Loading
Please register or sign in to comment