diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-10-08 19:15:38 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-10-08 19:15:38 +0000 |
commit | 1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7 (patch) | |
tree | 181eaf94cdb1e23dbf5b7bab845ba1a97377d1b5 /clang/lib/CodeGen/MicrosoftCXXABI.cpp | |
parent | 71cd285dc84426c786010c3bdbfcbfb1f7e23016 (diff) | |
download | bcm5719-llvm-1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7.tar.gz bcm5719-llvm-1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7.zip |
Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1787
llvm-svn: 192220
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/MicrosoftCXXABI.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index 1d73b213b7d..7452c860d0b 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -173,8 +173,20 @@ public: CXXDtorType DtorType, SourceLocation CallLoc, llvm::Value *This); + void adjustCallArgsForDestructorThunk(CodeGenFunction &CGF, GlobalDecl GD, + CallArgList &CallArgs) { + assert(GD.getDtorType() == Dtor_Deleting && + "Only deleting destructor thunks are available in this ABI"); + CallArgs.add(RValue::get(getStructorImplicitParamValue(CGF)), + CGM.getContext().IntTy); + } + void emitVirtualInheritanceTables(const CXXRecordDecl *RD); + void setThunkLinkage(llvm::Function *Thunk, bool ForVTable) { + Thunk->setLinkage(llvm::GlobalValue::WeakAnyLinkage); + } + void EmitGuardedInit(CodeGenFunction &CGF, const VarDecl &D, llvm::GlobalVariable *DeclPtr, bool PerformInit); |