summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-08-04 15:38:49 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-08-04 15:38:49 +0000
commitda32cf82ba068a38fa9b8170df16442348b3993c (patch)
treea6ef1de94d74642931918b3321c046328c749201 /clang/lib/CodeGen
parent23cdeeea0f70ceb46710c33271baedef6e936f49 (diff)
downloadbcm5719-llvm-da32cf82ba068a38fa9b8170df16442348b3993c.tar.gz
bcm5719-llvm-da32cf82ba068a38fa9b8170df16442348b3993c.zip
[CodeGen] Fold memcpy into SmallVector initializer. No functionality change.
llvm-svn: 243992
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGException.cpp5
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();
OpenPOWER on IntegriCloud