diff options
author | John McCall <rjmccall@apple.com> | 2011-10-17 18:09:15 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-10-17 18:09:15 +0000 |
commit | 0ddaeb9b031070ec64afe92d9892875ac44df427 (patch) | |
tree | fabdbbd8a366601ea6548bdabd2d458b1ac26e1a /lib/AST | |
parent | 4919dfd54e2296ca997e3d1c9dab85976bba8e95 (diff) |
Add a new placeholder type to represent "unbridged"
casts in ARC.
No semantic analysis yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 | ||||
-rw-r--r-- | lib/AST/ASTImporter.cpp | 2 | ||||
-rw-r--r-- | lib/AST/ItaniumMangle.cpp | 1 | ||||
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 1 | ||||
-rw-r--r-- | lib/AST/Type.cpp | 1 | ||||
-rw-r--r-- | lib/AST/TypeLoc.cpp | 1 |
6 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 462428086d..4fbb5408dc 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -464,6 +464,9 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target) { // "any" type; useful for debugger-like clients. InitBuiltinType(UnknownAnyTy, BuiltinType::UnknownAny); + // Placeholder type for unbridged ARC casts. + InitBuiltinType(ARCUnbridgedCastTy, BuiltinType::ARCUnbridgedCast); + // C99 6.2.5p11. FloatComplexTy = getComplexType(FloatTy); DoubleComplexTy = getComplexType(DoubleTy); diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index af66b04c3a..ae2b8903f2 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -1387,6 +1387,8 @@ QualType ASTNodeImporter::VisitBuiltinType(const BuiltinType *T) { case BuiltinType::Dependent: return Importer.getToContext().DependentTy; case BuiltinType::UnknownAny: return Importer.getToContext().UnknownAnyTy; case BuiltinType::BoundMember: return Importer.getToContext().BoundMemberTy; + case BuiltinType::ARCUnbridgedCast: + return Importer.getToContext().ARCUnbridgedCastTy; case BuiltinType::ObjCId: // FIXME: Make sure that the "to" context supports Objective-C! diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index acedf70f29..f7af57ef66 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -1739,6 +1739,7 @@ void CXXNameMangler::mangleType(const BuiltinType *T) { case BuiltinType::Dependent: case BuiltinType::BoundMember: case BuiltinType::UnknownAny: + case BuiltinType::ARCUnbridgedCast: llvm_unreachable("mangling a placeholder type"); break; case BuiltinType::ObjCId: Out << "11objc_object"; break; diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 1515db49fe..98fc2d52cb 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -705,6 +705,7 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T) { case BuiltinType::Dependent: case BuiltinType::UnknownAny: case BuiltinType::BoundMember: + case BuiltinType::ARCUnbridgedCast: llvm_unreachable( "Overloaded and dependent types shouldn't get to name mangling"); case BuiltinType::ObjCId: Out << "PAUobjc_object@@"; break; diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 44eeec004f..5b7daadd98 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1495,6 +1495,7 @@ const char *BuiltinType::getName(const PrintingPolicy &Policy) const { case BoundMember: return "<bound member function type>"; case Dependent: return "<dependent type>"; case UnknownAny: return "<unknown type>"; + case ARCUnbridgedCast: return "<ARC unbridged cast type>"; case ObjCId: return "id"; case ObjCClass: return "Class"; case ObjCSel: return "SEL"; diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index 8e8b227e1f..2724e8c46a 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -237,6 +237,7 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const { case BuiltinType::Dependent: case BuiltinType::BoundMember: case BuiltinType::UnknownAny: + case BuiltinType::ARCUnbridgedCast: case BuiltinType::ObjCId: case BuiltinType::ObjCClass: case BuiltinType::ObjCSel: |