From da32cf82ba068a38fa9b8170df16442348b3993c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 4 Aug 2015 15:38:49 +0000 Subject: [CodeGen] Fold memcpy into SmallVector initializer. No functionality change. llvm-svn: 243992 --- clang/lib/CodeGen/CGException.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGException.cpp') 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 Handlers(NumHandlers); - memcpy(Handlers.data(), CatchScope.begin(), - NumHandlers * sizeof(EHCatchScope::Handler)); + SmallVector Handlers( + CatchScope.begin(), CatchScope.begin() + NumHandlers); EHStack.popCatch(); -- cgit v1.2.3