llvm-6502/lib/ExecutionEngine
Benjamin Kramer 9589ff8949 Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.


Call sites were found with the ASTMatcher + some semi-automated cleanup.

memberCallExpr(
    argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
    on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
    hasArgument(0, bindTemporaryExpr(
                       hasType(recordDecl(hasNonTrivialDestructor())),
                       has(constructExpr()))),
    unless(isInTemplateInstantiation()))

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29 19:43:39 +00:00
..
IntelJITEvents Move DIContext.h to common DebugInfo location. 2015-04-23 17:37:47 +00:00
Interpreter Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
MCJIT Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
OProfileJIT [jitlistener] Remove unused code 2015-04-08 13:17:48 +00:00
Orc [Orc] Reapply r236465 with fixes for the MSVC bots. 2015-05-05 17:37:18 +00:00
RuntimeDyld [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6 2015-05-28 13:48:41 +00:00
CMakeLists.txt [ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager into 2015-02-15 23:22:43 +00:00
ExecutionEngine.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
ExecutionEngineBindings.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
GDBRegistrationListener.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
LLVMBuild.txt Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and 2015-05-26 20:17:20 +00:00
Makefile [Orc] New JIT APIs. 2015-01-23 21:25:00 +00:00
SectionMemoryManager.cpp [Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine. 2015-02-06 19:36:40 +00:00
TargetSelect.cpp Readdress r236990, use of static members on a non-static variable. 2015-05-11 22:20:48 +00:00