summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LTO.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-11-29 18:05:04 +0000
committerRui Ueyama <ruiu@google.com>2016-11-29 18:05:04 +0000
commita13efc2a73106ed35e6477e23d867e5d53909387 (patch)
tree41696a891fc54f8e77971d8e8c2654cad975ed46 /lld/ELF/LTO.cpp
parentc62b64a9e867bc2aa8c9e29245628e4dd6de993c (diff)
downloadbcm5719-llvm-a13efc2a73106ed35e6477e23d867e5d53909387.tar.gz
bcm5719-llvm-a13efc2a73106ed35e6477e23d867e5d53909387.zip
Introduce StringRefZ class to represent null-terminated strings.
StringRefZ is a class to represent a null-terminated string. String length is computed lazily, so it's more efficient than StringRef to represent strings in string table. The motivation of defining this new class is to merge functions that only differ in string types; we have many constructors that takes `const char *` or `StringRef`. With StringRefZ, we can merge them. Differential Revision: https://reviews.llvm.org/D27037 llvm-svn: 288172
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r--lld/ELF/LTO.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 8d4ad913947..a3d6a141a20 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -97,8 +97,8 @@ BitcodeCompiler::BitcodeCompiler() : LTOObj(createLTO()) {}
BitcodeCompiler::~BitcodeCompiler() = default;
static void undefine(Symbol *S) {
- replaceBody<Undefined>(S, S->body()->getName(), STV_DEFAULT, S->body()->Type,
- nullptr);
+ replaceBody<Undefined>(S, S->body()->getName(), /*IsLocal=*/false,
+ STV_DEFAULT, S->body()->Type, nullptr);
}
void BitcodeCompiler::add(BitcodeFile &F) {
OpenPOWER on IntegriCloud