summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-01-23 15:10:37 +0000
committerAlexander Kornienko <alexfh@google.com>2015-01-23 15:10:37 +0000
commite94b7c24c809dd398a146786e9612afa99ed0395 (patch)
tree953cf3c54c9b64a40e2a925628eefb4072ad9a25 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parenta6354cae566699786f3755d684504e14518811e7 (diff)
downloadbcm5719-llvm-e94b7c24c809dd398a146786e9612afa99ed0395.tar.gz
bcm5719-llvm-e94b7c24c809dd398a146786e9612afa99ed0395.zip
[clang-tidy] Use shrink_to_fit instead of copy and swap trick
The shrink_to_fit() method is more readable and more effective than the copy and swap trick to reduce the capacity of a shrinkable container. Note that, the shrink_to_fit() method is only available in C++11 and up. Example: std::vector<int>(v).swap(v); will be replaced with v.shrink_to_fit(); http://reviews.llvm.org/D7087 Patch by Gábor Horváth! llvm-svn: 226912
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud