summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Type.cpp18
-rw-r--r--clang/lib/Sema/SemaType.cpp6
2 files changed, 1 insertions, 23 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 114c9ac7df9..8e6aa23618c 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -470,24 +470,6 @@ bool Type::isIntegralOrEnumerationType() const {
return false;
}
-bool Type::isLegacyObjCIdType(ASTContext &Ctx) const {
- if (const PointerType *PTTo = getAs<PointerType>()) {
- QualType PointeeTy = PTTo->getPointeeType();
- if (const RecordType *RTy = PointeeTy->getAs<RecordType>())
- return RTy->getDecl()->getIdentifier() == &Ctx.Idents.get("objc_object");
- }
- return false;
-}
-
-bool Type::isLegacyObjCClassType(ASTContext &Ctx) const {
- if (const PointerType *PTTo = getAs<PointerType>()) {
- QualType PointeeTy = PTTo->getPointeeType();
- if (const RecordType *RTy = PointeeTy->getAs<RecordType>())
- return RTy->getDecl()->getIdentifier() == &Ctx.Idents.get("objc_class");
- }
- return false;
-}
-
bool Type::isEnumeralType() const {
if (const TagType *TT = dyn_cast<TagType>(CanonicalType))
return TT->getDecl()->isEnum();
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 06d8b3d4f6b..aa30b5c2da3 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -1274,12 +1274,8 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
if (BTy->getKind() == BuiltinType::Float)
ArgTy = Context.DoubleTy;
}
- } else if (getLangOptions().ObjC1) {
- if (ArgTy->isLegacyObjCIdType(Context))
- ArgTy = Context.getObjCIdType();
- else if (ArgTy->isLegacyObjCClassType(Context))
- ArgTy = Context.getObjCClassType();
}
+
ArgTys.push_back(ArgTy);
}
OpenPOWER on IntegriCloud