From: Daniel Dunbar Date: Tue, 14 Apr 2009 07:02:17 +0000 (+0000) Subject: Reduce indentation, no functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=529d7d2c6ed88930bc3d7aab7611a50b6169e279;p=clang Reduce indentation, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index c771461704..077c02384a 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -324,20 +324,21 @@ void CodeGenModule::SetFunctionAttributes(const Decl *D, static CodeGenModule::GVALinkage GetLinkageForFunctionOrMethodDecl(const Decl *D) { - if (const FunctionDecl *FD = dyn_cast(D)) { - // "static" and attr(always_inline) functions get internal linkage. - if (FD->getStorageClass() == FunctionDecl::Static || - FD->hasAttr()) - return CodeGenModule::GVA_Internal; - if (FD->isInline()) { - if (FD->getStorageClass() == FunctionDecl::Extern) - return CodeGenModule::GVA_ExternInline; - return CodeGenModule::GVA_Inline; - } - } else { - assert(isa(D)); + if (isa(D)) return CodeGenModule::GVA_Internal; + + const FunctionDecl *FD = cast(D); + // "static" and attr(always_inline) functions get internal linkage. + if (FD->getStorageClass() == FunctionDecl::Static || + FD->hasAttr()) + return CodeGenModule::GVA_Internal; + + if (FD->isInline()) { + if (FD->getStorageClass() == FunctionDecl::Extern) + return CodeGenModule::GVA_ExternInline; + return CodeGenModule::GVA_Inline; } + return CodeGenModule::GVA_Normal; }