From 64a41cb39ec57a25fad31d4c9d8232b6cda3abb1 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 14 Apr 2009 07:02:17 +0000 Subject: Reduce indentation, no functionality change. llvm-svn: 69033 --- clang/lib/CodeGen/CodeGenModule.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c771461704d9..077c02384a78 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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; } -- cgit v1.2.3