diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-06 22:01:30 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-06 22:01:30 +0000 |
commit | 8174f2c23ce005c53b0ac2885cb2e967de1aafbb (patch) | |
tree | 8942c29b371b4bdeabaeba090ba4fa53bb6df729 /clang/lib/CodeGen/CGVtable.h | |
parent | 94bb5e8d7556183f3634496c8fc4ee58f2b99e3d (diff) | |
download | bcm5719-llvm-8174f2c23ce005c53b0ac2885cb2e967de1aafbb.tar.gz bcm5719-llvm-8174f2c23ce005c53b0ac2885cb2e967de1aafbb.zip |
Work-in-progess rewrite of thunks: move thunk generation outside of vtable
generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.
llvm-svn: 90722
Diffstat (limited to 'clang/lib/CodeGen/CGVtable.h')
-rw-r--r-- | clang/lib/CodeGen/CGVtable.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGVtable.h b/clang/lib/CodeGen/CGVtable.h index fd7a4865b64..1507725f0fb 100644 --- a/clang/lib/CodeGen/CGVtable.h +++ b/clang/lib/CodeGen/CGVtable.h @@ -15,6 +15,7 @@ #define CLANG_CODEGEN_CGVTABLE_H #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/GlobalVariable.h" #include "GlobalDecl.h" @@ -83,6 +84,11 @@ class CGVtableInfo { /// pointers in the vtable for a given record decl. llvm::DenseMap<const CXXRecordDecl *, uint64_t> NumVirtualFunctionPointers; + typedef llvm::DenseMap<std::pair<GlobalDecl, GlobalDecl>, + ThunkAdjustment> SavedThisAdjustmentsTy; + SavedThisAdjustmentsTy SavedThisAdjustments; + llvm::DenseSet<const CXXRecordDecl*> SavedThisAdjustmentRecords; + /// getNumVirtualFunctionPointers - Return the number of virtual function /// pointers in the vtable for a given record decl. uint64_t getNumVirtualFunctionPointers(const CXXRecordDecl *RD); @@ -122,6 +128,8 @@ public: int64_t getVirtualBaseOffsetIndex(const CXXRecordDecl *RD, const CXXRecordDecl *VBase); + ThunkAdjustment getThisAdjustment(GlobalDecl GD, GlobalDecl OGD); + /// getVtableAddressPoint - returns the address point of the vtable for the /// given record decl. /// FIXME: This should return a list of address points. |