minor tweaks


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43515 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index 5bd5df5..2be198d 100644
--- a/Sema/Sema.cpp
+++ b/Sema/Sema.cpp
@@ -31,17 +31,18 @@
 /// For now, we will *not* install id as a built-in. FIXME: reconsider this.
 QualType Sema::GetObjcIdType(SourceLocation Loc) {
   assert(TUScope && "GetObjcIdType(): Top-level scope is null");
-  if (Context.getObjcIdType().isNull()) {
-    IdentifierInfo *IdIdent = &Context.Idents.get("id");
-    ScopedDecl *IdDecl = LookupScopedDecl(IdIdent, Decl::IDNS_Ordinary, 
-                                          SourceLocation(), TUScope);
-    TypedefDecl *ObjcIdTypedef = dyn_cast_or_null<TypedefDecl>(IdDecl);
-    if (!ObjcIdTypedef) {
-      Diag(Loc, diag::err_missing_id_definition);
-      return QualType();
-    }
-    Context.setObjcIdType(ObjcIdTypedef);
+  if (!Context.getObjcIdType().isNull())
+    return Context.getObjcIdType();
+    
+  IdentifierInfo *IdIdent = &Context.Idents.get("id");
+  ScopedDecl *IdDecl = LookupScopedDecl(IdIdent, Decl::IDNS_Ordinary, 
+                                        SourceLocation(), TUScope);
+  TypedefDecl *ObjcIdTypedef = dyn_cast_or_null<TypedefDecl>(IdDecl);
+  if (!ObjcIdTypedef) {
+    Diag(Loc, diag::err_missing_id_definition);
+    return QualType();
   }
+  Context.setObjcIdType(ObjcIdTypedef);
   return Context.getObjcIdType();
 }