diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2016-02-03 22:14:53 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2016-02-03 22:14:53 +0000 |
| commit | 0cdb86bd382c26c6543540961fc2c3a54d6bf1f8 (patch) | |
| tree | ef703218b476c148833c91315948f90179266497 /clang/lib | |
| parent | e551051a58f2188ccafd28ad47b5092875cc72e8 (diff) | |
| download | bcm5719-llvm-0cdb86bd382c26c6543540961fc2c3a54d6bf1f8.tar.gz bcm5719-llvm-0cdb86bd382c26c6543540961fc2c3a54d6bf1f8.zip | |
Revert r259624 - Make CF constant string decl visible to name lookup to fix module errors.
This breaks some internal bots in stage2: clang seg fault.
Looking with Ben to see what is going on.
llvm-svn: 259715
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 14 | ||||
| -rw-r--r-- | clang/lib/Sema/Sema.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
4 files changed, 4 insertions, 19 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index fc5ff8668e9..02b3e51d1de 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4868,11 +4868,10 @@ int ASTContext::getIntegerTypeOrder(QualType LHS, QualType RHS) const { return 1; } -TagDecl *ASTContext::getCFConstantStringDecl() const { +// getCFConstantStringType - Return the type used for constant CFStrings. +QualType ASTContext::getCFConstantStringType() const { if (!CFConstantStringTypeDecl) { - // This type is designed to be compatible with NSConstantString, but cannot - // use the same name, since NSConstantString is an interface. - CFConstantStringTypeDecl = buildImplicitRecord("__NSConstantString"); + CFConstantStringTypeDecl = buildImplicitRecord("NSConstantString"); CFConstantStringTypeDecl->startDefinition(); QualType FieldTypes[4]; @@ -4902,12 +4901,7 @@ TagDecl *ASTContext::getCFConstantStringDecl() const { CFConstantStringTypeDecl->completeDefinition(); } - return CFConstantStringTypeDecl; -} - -// getCFConstantStringType - Return the type used for constant CFStrings. -QualType ASTContext::getCFConstantStringType() const { - return getTagDeclType(getCFConstantStringDecl()); + return getTagDeclType(CFConstantStringTypeDecl); } QualType ASTContext::getObjCSuperType() const { diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 3745cdd9a59..39b8cc9f0c6 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -189,10 +189,6 @@ void Sema::Initialize() { DeclarationName Protocol = &Context.Idents.get("Protocol"); if (IdResolver.begin(Protocol) == IdResolver.end()) PushOnScopeChains(Context.getObjCProtocolDecl(), TUScope); - - DeclarationName ConstantString = &Context.Idents.get("NSConstantString"); - if (IdResolver.begin(ConstantString) == IdResolver.end()) - PushOnScopeChains(Context.getCFConstantStringDecl(), TUScope); } // Initialize Microsoft "predefined C++ types". diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 1fbff107ea5..72fbea6e9a8 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -6444,9 +6444,6 @@ static Decl *getPredefinedDecl(ASTContext &Context, PredefinedDeclIDs ID) { case PREDEF_DECL_MAKE_INTEGER_SEQ_ID: return Context.getMakeIntegerSeqDecl(); - - case PREDEF_DECL_CF_CONSTANT_STRING_ID: - return Context.getCFConstantStringDecl(); } llvm_unreachable("PredefinedDeclIDs unknown enum value"); } diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index a590e188eca..ec04cd6c1fa 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -4152,8 +4152,6 @@ uint64_t ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, RegisterPredefDecl(Context.ExternCContext, PREDEF_DECL_EXTERN_C_CONTEXT_ID); RegisterPredefDecl(Context.MakeIntegerSeqDecl, PREDEF_DECL_MAKE_INTEGER_SEQ_ID); - RegisterPredefDecl(Context.CFConstantStringTypeDecl, - PREDEF_DECL_CF_CONSTANT_STRING_ID); // Build a record containing all of the tentative definitions in this file, in // TentativeDefinitions order. Generally, this record will be empty for |

