llvm-6502/tools
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
..
bugpoint Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
bugpoint-passes bugpoint Enhancement. 2015-04-20 23:42:22 +00:00
dsymutil AsmPrinter: Rename begin_values() => values_begin(), NFC 2015-05-28 18:55:38 +00:00
gold Fix build error from r234957 2015-04-15 00:13:51 +00:00
llc Resubmit r237954 (MIR Serialization: print and parse LLVM IR using MIR format). 2015-05-27 18:02:19 +00:00
lli Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-ar Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
llvm-as Fix input validation issues in llvm-as/llvm-dis 2015-05-11 21:20:20 +00:00
llvm-bcanalyzer [llvm-bcanalyzer] Add -show-binary-blobs option. 2015-05-13 18:51:49 +00:00
llvm-c-test Fix build breakage caused by memory leaks in llvm-c-test 2015-01-28 18:32:31 +00:00
llvm-config Refactoring CMake CrossCompile module. 2015-03-12 17:33:34 +00:00
llvm-cov Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-cxxdump Change range-based for-loop to use const auto&. No functionality change. 2015-04-15 03:17:49 +00:00
llvm-diff Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default" 2015-03-03 21:18:16 +00:00
llvm-dis Fix input validation issues in llvm-as/llvm-dis 2015-05-11 21:20:20 +00:00
llvm-dwarfdump Add llvm-dwarfdump-fuzzer that uses LibFuzzer to fuzz llvm-dwarfdump tool. 2015-05-28 18:35:18 +00:00
llvm-extract uselistorder: Remove the global bits 2015-04-15 03:14:06 +00:00
llvm-go llvm-go: Set $GCCGO instead of putting a gccgo executable on $PATH. 2015-02-14 01:45:57 +00:00
llvm-jitlistener Prune CRLFs. 2015-05-25 01:43:23 +00:00
llvm-link Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
llvm-lto libLTO, llvm-lto, gold: Introduce flag for controlling optimization level. 2015-03-19 22:01:00 +00:00
llvm-mc Add targets to cmake for specific target components. 2015-04-20 18:22:05 +00:00
llvm-mcmarkup Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using std::unique_ptr 2014-08-21 20:44:56 +00:00
llvm-nm Fix llvm-nm -S option. 2015-05-22 13:28:35 +00:00
llvm-objdump [Objdump] Removing unused parameter. 2015-05-29 14:48:25 +00:00
llvm-pdbdump Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-profdata Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
llvm-readobj [llvm-readobj/ELF] Teach how to decode DF_1_XXX flags 2015-05-25 19:12:18 +00:00
llvm-rtdyld Make it easier to use DwarfContext with MCJIT 2015-05-21 21:24:32 +00:00
llvm-shlib Updating symbol wildcards one more time. 2015-04-16 21:58:22 +00:00
llvm-size Assigning and copying command line option objects shouldn't be allowed. 2015-01-22 01:49:59 +00:00
llvm-stress Verifier: Remove the separate -verify-di pass 2015-03-19 22:24:17 +00:00
llvm-symbolizer A few fixes for llvm-symbolizer on Windows. 2015-05-06 22:26:30 +00:00
lto LTO: Add API to choose whether to embed uselists 2015-04-27 23:38:54 +00:00
macho-dump Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers. 2014-12-18 00:53:40 +00:00
msbuild MSBuild integration: fix the loop in install.bat 2014-09-30 22:30:06 +00:00
obj2yaml [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section support 2015-05-07 15:40:48 +00:00
opt Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and 2015-05-26 20:17:20 +00:00
verify-uselistorder uselistorder: Pull the assembly bit up out of the printer 2015-04-15 02:12:41 +00:00
yaml2obj [yaml2elf] Replace error message by assert call in writeSectionContent methods 2015-05-08 07:05:04 +00:00
CMakeLists.txt llvm-cxxdump: Rename llvm-vtabledump to llvm-cxxdump 2015-03-15 01:30:58 +00:00
LLVMBuild.txt Reflow long lines of some LLVMBuild files 2015-05-14 15:38:27 +00:00
Makefile llvm-cxxdump: Rename llvm-vtabledump to llvm-cxxdump 2015-03-15 01:30:58 +00:00