Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "Work around vtable index issue due to base class definition b…
…eing replaced by later PCM."

This reverts commit fc1cb80.
And brings that file back to the original clang version.
  • Loading branch information
Axel-Naumann committed Jun 23, 2017
commit efee688bea7f0bfdc298084a95bc564fbae1348d
12 changes: 4 additions & 8 deletions interpreter/llvm/src/tools/clang/lib/AST/VTableBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,8 +1170,7 @@ void ItaniumVTableBuilder::ComputeThisAdjustments() {
continue;
}

if (MD->getParent()->getCanonicalDecl()
== MostDerivedClass->getCanonicalDecl())
if (MD->getParent() == MostDerivedClass)
AddThunk(MD, Thunk);
}
}
Expand Down Expand Up @@ -1358,8 +1357,7 @@ bool ItaniumVTableBuilder::IsOverriderUsed(

// If the overrider is the first base in the primary base chain, we know
// that the overrider will be used.
if (Overrider->getParent()->getCanonicalDecl()
== FirstBaseInPrimaryBaseChain->getCanonicalDecl())
if (Overrider->getParent() == FirstBaseInPrimaryBaseChain)
return true;

ItaniumVTableBuilder::PrimaryBasesSetVectorTy PrimaryBases;
Expand Down Expand Up @@ -1422,8 +1420,7 @@ FindNearestOverriddenMethod(const CXXMethodDecl *MD,
// Now check the overridden methods.
for (const CXXMethodDecl *OverriddenMD : OverriddenMethods) {
// We found our overridden method.
if (OverriddenMD->getParent()->getCanonicalDecl()
== PrimaryBase->getCanonicalDecl())
if (OverriddenMD->getParent() == PrimaryBase)
return OverriddenMD;
}
}
Expand Down Expand Up @@ -1530,8 +1527,7 @@ void ItaniumVTableBuilder::AddMethods(
Overrider);

if (ThisAdjustment.Virtual.Itanium.VCallOffsetOffset &&
Overrider.Method->getParent()->getCanonicalDecl()
== MostDerivedClass->getCanonicalDecl()) {
Overrider.Method->getParent() == MostDerivedClass) {

// There's no return adjustment from OverriddenMD and MD,
// but that doesn't mean there isn't one between MD and
Expand Down