diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-14 15:16:10 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-14 15:16:10 +0000 |
commit | 9f8e2d77c1089c110aead93c0a92cc836f752a95 (patch) | |
tree | 2f84ca32f8f43eb73563fa98badd25f146f3e8dd /clang/lib/AST/VTableBuilder.cpp | |
parent | 193573ec89ce4f16749b323e72e0a49e1e9364e5 (diff) | |
download | bcm5719-llvm-9f8e2d77c1089c110aead93c0a92cc836f752a95.tar.gz bcm5719-llvm-9f8e2d77c1089c110aead93c0a92cc836f752a95.zip |
Reduce double set lookups by using the result of insert.
No functionality change.
llvm-svn: 192598
Diffstat (limited to 'clang/lib/AST/VTableBuilder.cpp')
-rw-r--r-- | clang/lib/AST/VTableBuilder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp index 027735dff05..045b7f1a42d 100644 --- a/clang/lib/AST/VTableBuilder.cpp +++ b/clang/lib/AST/VTableBuilder.cpp @@ -3151,9 +3151,8 @@ static void EnumerateVFPtrs( CharUnits NextBaseOffset; const CXXRecordDecl *NextLastVBase; if (I->isVirtual()) { - if (VisitedVBases.count(BaseDecl)) + if (!VisitedVBases.insert(BaseDecl)) continue; - VisitedVBases.insert(BaseDecl); NextBaseOffset = MostDerivedClassLayout.getVBaseClassOffset(BaseDecl); NextLastVBase = BaseDecl; } else { |