[cfe-commits] r96582 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Thu Feb 18 08:29:25 PST 2010
Author: andersca
Date: Thu Feb 18 10:29:24 2010
New Revision: 96582
URL: http://llvm.org/viewvc/llvm-project?rev=96582&view=rev
Log:
Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=96582&r1=96581&r2=96582&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Feb 18 10:29:24 2010
@@ -58,8 +58,11 @@
struct OverriderInfo {
/// Method - The method decl of the overrider.
const CXXMethodDecl *Method;
+
+ /// BaseOffset - the base offset of the overrider.
+ uint64_t BaseOffset;
- OverriderInfo() : Method(0) { }
+ OverriderInfo() : Method(0), BaseOffset(0) { }
};
private:
@@ -236,6 +239,7 @@
OverriderInfo& Overrider = OverridersMap[std::make_pair(Base, MD)];
assert(!Overrider.Method && "Overrider should not exist yet!");
+ Overrider.BaseOffset = Base.getBaseOffset();
Overrider.Method = MD;
}
}
@@ -460,6 +464,7 @@
}
// Set the new overrider.
+ Overrider.BaseOffset = NewBase.getBaseOffset();
Overrider.Method = NewMD;
// And propagate it further.
More information about the cfe-commits
mailing list