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 | 64a41cb39ec57a25fad31d4c9d8232b6cda3abb1 (patch) | |
tree | a3df2a0b20bcaa2e1b0ad755ab7000fbac4ff19b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 92028dad66e317561b0e40360e329a9a443eaeb4 (diff) | |
download | bcm5719-llvm-64a41cb39ec57a25fad31d4c9d8232b6cda3abb1.tar.gz bcm5719-llvm-64a41cb39ec57a25fad31d4c9d8232b6cda3abb1.zip |
Reduce indentation, no functionality change.
llvm-svn: 69033
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c771461704d..077c02384a7 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<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; } |