diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-10-09 09:23:58 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-10-09 09:23:58 +0000 |
commit | ad9d3b8fd1f00f979baa49b29867edbbc6967d08 (patch) | |
tree | c401a87307f46129d10687620cfa19e69cfd808d /clang/lib/CodeGen/MicrosoftCXXABI.cpp | |
parent | 1411aeb2a258a2f92f3d13353c91c1af3c7c6419 (diff) | |
download | bcm5719-llvm-ad9d3b8fd1f00f979baa49b29867edbbc6967d08.tar.gz bcm5719-llvm-ad9d3b8fd1f00f979baa49b29867edbbc6967d08.zip |
Reland 192220 "Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft" with relaxed assertions
llvm-svn: 192285
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); |