summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-11-23 18:04:25 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-11-23 18:04:25 +0000
commit0afc5551960972003c133ab409cecdfaf80b1fe2 (patch)
treed05fff54b0c59d67a46881c6c8f78c192466ef63 /clang/lib
parentd4dca6fde6cb03273929db7c6d77de377a536d8d (diff)
downloadbcm5719-llvm-0afc5551960972003c133ab409cecdfaf80b1fe2.tar.gz
bcm5719-llvm-0afc5551960972003c133ab409cecdfaf80b1fe2.zip
Make 'SEL' pointer to a builtin type and not an
objective-c pointer type. This was a serious mishap and luckily, Ted's test caught that (and patch fixes the test case). llvm-svn: 89680
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Type.cpp1
-rw-r--r--clang/lib/Sema/Sema.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 7a8d3af2a06..5a2434da3c3 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -725,6 +725,7 @@ const char *BuiltinType::getName(const LangOptions &LO) const {
case UndeducedAuto: return "auto";
case ObjCId: return "id";
case ObjCClass: return "Class";
+ case ObjCSel: return "SEL";
}
}
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 62c2e25f52a..11729e0dacf 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -300,7 +300,7 @@ void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
// Built-in ObjC types may already be set by PCHReader (hence isNull checks).
if (Context.getObjCSelType().isNull()) {
// Create the built-in typedef for 'SEL'.
- QualType SelT = Context.getObjCObjectPointerType(Context.ObjCBuiltinSelTy);
+ QualType SelT = Context.getPointerType(Context.ObjCBuiltinSelTy);
DeclaratorInfo *SelInfo = Context.getTrivialDeclaratorInfo(SelT);
TypedefDecl *SelTypedef
= TypedefDecl::Create(Context, CurContext, SourceLocation(),
OpenPOWER on IntegriCloud