diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 16dc7d16dd4..7f4d1c01a75 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -1008,9 +1008,8 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) { // Copy the handler blocks off before we pop the EH stack. Emitting // the handlers might scribble on this memory. - SmallVector<EHCatchScope::Handler, 8> Handlers(NumHandlers); - memcpy(Handlers.data(), CatchScope.begin(), - NumHandlers * sizeof(EHCatchScope::Handler)); + SmallVector<EHCatchScope::Handler, 8> Handlers( + CatchScope.begin(), CatchScope.begin() + NumHandlers); EHStack.popCatch(); |