summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-12-06 18:56:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-12-06 18:56:22 +0000
commitc8dfde2051d66a2fd1426ec56d8c611e21afeef4 (patch)
tree50d55665dd5dae184d99b591600d0c8b6ef8d90c
parent9c60c7dcf4aa0dd1fe263f3668faf5a39d2548b0 (diff)
downloadbcm5719-llvm-c8dfde2051d66a2fd1426ec56d8c611e21afeef4.tar.gz
bcm5719-llvm-c8dfde2051d66a2fd1426ec56d8c611e21afeef4.zip
Replace one use of check with checkLazy.
Reduce total allocation when linking clang from 320.04MB to 300.82MB. llvm-svn: 319924
-rw-r--r--lld/ELF/InputFiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 7bd8a814959..52b30f722f4 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -595,8 +595,8 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
template <class ELFT>
StringRef ObjFile<ELFT>::getSectionName(const Elf_Shdr &Sec) {
- return check(this->getObj().getSectionName(&Sec, SectionStringTable),
- toString(this));
+ return checkLazy(this->getObj().getSectionName(&Sec, SectionStringTable),
+ [=]() { return toString(this); });
}
template <class ELFT> void ObjFile<ELFT>::initializeSymbols() {
OpenPOWER on IntegriCloud