From 5f0dd6162c941a32e89052f8848799df0553b7c7 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 17 Mar 2015 20:35:05 +0000 Subject: MS ABI: Emit HandlerMap entries for C++ catch The HandlerMap describes, to the runtime, what sort of catches surround the try. In principle, this structure has to be emitted by the backend because only it knows the layout of the stack (the runtime needs to know where on the stack the destination of a copy lives, etc.) but there is some C++ specific information that the backend can't reason about. Stick this information in special LLVM globals with the relevant "const", "volatile", "reference" info mangled into the name. llvm-svn: 232538 --- clang/lib/CodeGen/CodeGenModule.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 03948d6..c91de6d 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3644,8 +3644,10 @@ llvm::Constant *CodeGenModule::EmitUuidofInitializer(StringRef Uuid) { return llvm::ConstantStruct::getAnon(Fields); } -llvm::Constant *CodeGenModule::getAddrOfCXXCatchDescriptor(QualType Ty) { - return getCXXABI().getAddrOfCXXCatchDescriptor(Ty); +llvm::Constant * +CodeGenModule::getAddrOfCXXHandlerMapEntry(QualType Ty, + QualType CatchHandlerType) { + return getCXXABI().getAddrOfCXXHandlerMapEntry(Ty, CatchHandlerType); } llvm::Constant *CodeGenModule::GetAddrOfRTTIDescriptor(QualType Ty, -- cgit v1.1