mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[AST] VarDecl::hasDefinition() - Early exit if we find a strong definition.
llvm-svn: 152166
This commit is contained in:
parent
304314d739
commit
082c62d943
@ -1313,8 +1313,11 @@ VarDecl::DefinitionKind VarDecl::hasDefinition() const {
|
||||
|
||||
const VarDecl *First = getFirstDeclaration();
|
||||
for (redecl_iterator I = First->redecls_begin(), E = First->redecls_end();
|
||||
I != E; ++I)
|
||||
I != E; ++I) {
|
||||
Kind = std::max(Kind, (*I)->isThisDeclarationADefinition());
|
||||
if (Kind == Definition)
|
||||
break;
|
||||
}
|
||||
|
||||
return Kind;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user