]> granicus.if.org Git - clang/commitdiff
Reduce indentation, no functionality change.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 14 Apr 2009 07:02:17 +0000 (07:02 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 14 Apr 2009 07:02:17 +0000 (07:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index c771461704d906b31bc326a3c4c7a00e4a3c50ae..077c02384a7853ef3109bf4788d85152bfb65e13 100644 (file)
@@ -324,20 +324,21 @@ void CodeGenModule::SetFunctionAttributes(const Decl *D,
 
 static CodeGenModule::GVALinkage 
 GetLinkageForFunctionOrMethodDecl(const Decl *D) {
-  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
-    // "static" and attr(always_inline) functions get internal linkage.
-    if (FD->getStorageClass() == FunctionDecl::Static ||
-        FD->hasAttr<AlwaysInlineAttr>())
-      return CodeGenModule::GVA_Internal;
-    if (FD->isInline()) {
-      if (FD->getStorageClass() == FunctionDecl::Extern)
-        return CodeGenModule::GVA_ExternInline;
-      return CodeGenModule::GVA_Inline;
-    }
-  } else {
-    assert(isa<ObjCMethodDecl>(D));
+  if (isa<ObjCMethodDecl>(D))
     return CodeGenModule::GVA_Internal;
+
+  const FunctionDecl *FD = cast<FunctionDecl>(D);
+  // "static" and attr(always_inline) functions get internal linkage.
+  if (FD->getStorageClass() == FunctionDecl::Static ||
+      FD->hasAttr<AlwaysInlineAttr>())
+    return CodeGenModule::GVA_Internal;
+
+  if (FD->isInline()) {
+    if (FD->getStorageClass() == FunctionDecl::Extern)
+      return CodeGenModule::GVA_ExternInline;
+    return CodeGenModule::GVA_Inline;
   }
+
   return CodeGenModule::GVA_Normal;
 }