Assume GV is not null for now.

It will come back when we add support for inline asm in .bc files.

llvm-svn: 262972
This commit is contained in:
Rafael Espindola 2016-03-09 00:31:06 +00:00
parent 464bc55a1e
commit 708453d99f
1 changed files with 6 additions and 8 deletions

View File

@ -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);