Reduce indentation, no functionality change.

llvm-svn: 69033
This commit is contained in:
Daniel Dunbar 2009-04-14 07:02:17 +00:00
parent 92028dad66
commit 64a41cb39e
1 changed files with 13 additions and 12 deletions

View 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;
}