[cfe-commits] r160202 - /cfe/trunk/lib/AST/Decl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Fri Jul 13 16:26:44 PDT 2012
Author: rafael
Date: Fri Jul 13 18:26:43 2012
New Revision: 160202
URL: http://llvm.org/viewvc/llvm-project?rev=160202&view=rev
Log:
Move option test earlier in the function.
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=160202&r1=160201&r2=160202&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Fri Jul 13 18:26:43 2012
@@ -170,8 +170,8 @@
static bool useInlineVisibilityHidden(const NamedDecl *D) {
// FIXME: we should warn if -fvisibility-inlines-hidden is used with c.
- ASTContext &Context = D->getASTContext();
- if (!Context.getLangOpts().CPlusPlus)
+ const LangOptions &Opts = D->getASTContext().getLangOpts();
+ if (!Opts.CPlusPlus || !Opts.InlineVisibilityHidden)
return false;
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
@@ -193,7 +193,6 @@
// anyway.
return TSK != TSK_ExplicitInstantiationDeclaration &&
TSK != TSK_ExplicitInstantiationDefinition &&
- FD->getASTContext().getLangOpts().InlineVisibilityHidden &&
FD->hasBody(Def) && Def->isInlined();
}
More information about the cfe-commits
mailing list