summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-11-29 19:11:39 +0000
committerRui Ueyama <ruiu@google.com>2016-11-29 19:11:39 +0000
commit84e65a7ca1174e7b5f00785baafe7aabdbc1619e (patch)
treeb27f9e4ee306d2bdeab9a52f34b25d00bbe55eb6
parent79fcd4141842a24b580d9ea0c6021e071e5f5d97 (diff)
downloadbcm5719-llvm-84e65a7ca1174e7b5f00785baafe7aabdbc1619e.tar.gz
bcm5719-llvm-84e65a7ca1174e7b5f00785baafe7aabdbc1619e.zip
Use StringRefZ explicitly instead of const char *.
This patch is to avoid an implicit conversion from const char * to StringRefZ, to make it apparent where we are using StringRefZ. llvm-svn: 288182
-rw-r--r--lld/ELF/InputFiles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index c8bcd739ff6..de7e1034852 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -450,7 +450,7 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
if (this->StringTable.size() <= Sym->st_name)
fatal(toString(this) + ": invalid symbol name offset");
- const char *Name = this->StringTable.data() + Sym->st_name;
+ StringRefZ Name = this->StringTable.data() + Sym->st_name;
if (Sym->st_shndx == SHN_UNDEF)
return new (BAlloc)
Undefined(Name, /*IsLocal=*/true, StOther, Type, this);
OpenPOWER on IntegriCloud