diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-09 00:31:06 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-09 00:31:06 +0000 |
| commit | 708453d99ff4b16a3c0df889a64d6593fac3d6e9 (patch) | |
| tree | 2d1366930d71d6985cf40fb26dd8d82e331cf119 | |
| parent | 464bc55a1e462b2a928e621a3182b28591afc059 (diff) | |
| download | bcm5719-llvm-708453d99ff4b16a3c0df889a64d6593fac3d6e9.tar.gz bcm5719-llvm-708453d99ff4b16a3c0df889a64d6593fac3d6e9.zip | |
Assume GV is not null for now.
It will come back when we add support for inline asm in .bc files.
llvm-svn: 262972
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 96499ea0af2..2986cb0d487 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -438,17 +438,15 @@ void BitcodeFile::parse(DenseSet<StringRef> &ComdatGroups) { } for (const BasicSymbolRef &Sym : Obj->symbols()) { - uint8_t Visibility = STV_DEFAULT; const GlobalValue *GV = Obj->getSymbolGV(Sym.getRawDataRefImpl()); + assert(GV); uint32_t Flags = Sym.getFlags(); - if (GV) { - if (const Comdat *C = GV->getComdat()) - if (!KeptComdats.count(C)) - continue; - if (!(Flags & object::BasicSymbolRef::SF_Global)) + if (const Comdat *C = GV->getComdat()) + if (!KeptComdats.count(C)) continue; - Visibility = getGvVisibility(GV); - } + if (!(Flags & object::BasicSymbolRef::SF_Global)) + continue; + uint8_t Visibility = getGvVisibility(GV); SmallString<64> Name; raw_svector_ostream OS(Name); |

