diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 07:02:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 07:02:17 +0000 |
commit | 529d7d2c6ed88930bc3d7aab7611a50b6169e279 (patch) | |
tree | 2444fbc47954fba920036c92df410ab818b5544f /lib/CodeGen | |
parent | dbb5a376c8b9272813a30c5519031e9ea2fb071f (diff) |
Reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
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<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; } |