diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-17 20:35:05 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-17 20:35:05 +0000 |
commit | 5f0dd6162c941a32e89052f8848799df0553b7c7 (patch) | |
tree | 930bffd6d833243036aea31edd6bb365508f77ce /clang/lib/CodeGen/CGException.cpp | |
parent | 443250f08da3ea3396586f0349d8d34d42223633 (diff) | |
download | bcm5719-llvm-5f0dd6162c941a32e89052f8848799df0553b7c7.tar.gz bcm5719-llvm-5f0dd6162c941a32e89052f8848799df0553b7c7.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 1a9ebb395fc..223b8f76d0d 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -567,7 +567,8 @@ void CodeGenFunction::EnterCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) { if (CaughtType->isObjCObjectPointerType()) TypeInfo = CGM.getObjCRuntime().GetEHType(CaughtType); else - TypeInfo = CGM.getAddrOfCXXCatchDescriptor(CaughtType); + TypeInfo = + CGM.getAddrOfCXXHandlerMapEntry(CaughtType, C->getCaughtType()); CatchScope->setHandler(I, TypeInfo, Handler); } else { // No exception decl indicates '...', a catch-all. |