diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-03-13 18:26:17 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-13 18:26:17 +0000 |
| commit | ba3e5ecf075c1d186906c06fe4f85a560c244699 (patch) | |
| tree | 44c13b5601f9c9b8472a9ff20bfcf9a34c70c86e /clang/lib/Sema/SemaChecking.cpp | |
| parent | bdf40a62a740c6e0b6f10543617ba768759951b6 (diff) | |
| download | bcm5719-llvm-ba3e5ecf075c1d186906c06fe4f85a560c244699.tar.gz bcm5719-llvm-ba3e5ecf075c1d186906c06fe4f85a560c244699.zip | |
MS ABI: Implement __GetExceptionInfo for std::make_exception_ptr
std::make_exception_ptr calls std::__GetExceptionInfo in order to figure
out how to properly copy the exception object.
Differential Revision: http://reviews.llvm.org/D8280
llvm-svn: 232188
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 60382e8b616..c4ff8b4ef39 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -503,6 +503,19 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, break; } + case Builtin::BI__GetExceptionInfo: + if (checkArgCount(*this, TheCall, 1)) + return ExprError(); + + if (CheckCXXThrowOperand( + TheCall->getLocStart(), + Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), + TheCall)) + return ExprError(); + + TheCall->setType(Context.VoidPtrTy); + break; + } // Since the target specific builtins for each arch overlap, only check those |

