projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70ffd65
)
Use emplace_back to replace size() and resize().
author
Dehao Chen
<dehao@google.com>
Mon, 10 Jul 2017 15:31:53 +0000
(15:31 +0000)
committer
Dehao Chen
<dehao@google.com>
Mon, 10 Jul 2017 15:31:53 +0000
(15:31 +0000)
Summary: This speeds-up thin-link for ~29% for large programs.
Reviewers: tejohnson
Reviewed By: tejohnson
Subscribers: grandinj, sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D35145
llvm-svn: 307543
llvm/tools/gold/gold-plugin.cpp
patch
|
blob
|
history
diff --git
a/llvm/tools/gold/gold-plugin.cpp
b/llvm/tools/gold/gold-plugin.cpp
index
cf207d9
..
6d011ba
100644
(file)
--- a/
llvm/tools/gold/gold-plugin.cpp
+++ b/
llvm/tools/gold/gold-plugin.cpp
@@
-477,7
+477,7
@@
static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
std::unique_ptr<InputFile> Obj = std::move(*ObjOrErr);
- Modules.
resize(Modules.size() + 1
);
+ Modules.
emplace_back(
);
claimed_file &cf = Modules.back();
cf.handle = file->handle;