summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/VTableBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/VTableBuilder.cpp')
-rw-r--r--clang/lib/AST/VTableBuilder.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index ca5f0aad001..359e3498028 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/lib/AST/VTableBuilder.cpp
@@ -2649,12 +2649,6 @@ struct InitialOverriddenDefinitionCollector {
} // end namespace
-static bool BaseInSet(const CXXBaseSpecifier *Specifier,
- CXXBasePath &Path, void *BasesSet) {
- BasesSetVectorTy *Bases = (BasesSetVectorTy *)BasesSet;
- return Bases->count(Specifier->getType()->getAsCXXRecordDecl());
-}
-
// Let's study one class hierarchy as an example:
// struct A {
// virtual void f();
@@ -2720,8 +2714,12 @@ VFTableBuilder::ComputeThisOffset(FinalOverriders::OverriderInfo Overrider) {
return Overrider.Offset;
CXXBasePaths Paths;
- Overrider.Method->getParent()->lookupInBases(BaseInSet, &Collector.Bases,
- Paths);
+ Overrider.Method->getParent()->lookupInBases(
+ [&Collector](const CXXBaseSpecifier *Specifier, CXXBasePath &) {
+ return Collector.Bases.count(
+ Specifier->getType()->getAsCXXRecordDecl());
+ },
+ Paths);
// This will hold the smallest this offset among overridees of MD.
// This implies that an offset of a non-virtual base will dominate an offset
OpenPOWER on IntegriCloud