llvm.org GIT mirror llvm / 66a1cdb
LTO: Remove Symbol::getIRName(). Its only use was in the LTO implementation. Also document Symbol::getName(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288302 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 3 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
161161 skip();
162162 }
163163
164 /// Returns the mangled name of the global.
164165 StringRef getName() const { return Name; }
165 StringRef getIRName() const {
166 if (GV)
167 return GV->getName();
168 return StringRef();
169 }
166
170167 uint32_t getFlags() const { return Flags; }
171168 GlobalValue::VisibilityTypes getVisibility() const {
172169 if (GV)
380380 // We also record if we see an instance of a common as prevailing, so that
381381 // if none is prevailing we can ignore it later.
382382 if (Sym.getFlags() & object::BasicSymbolRef::SF_Common) {
383 auto &CommonRes = RegularLTO.Commons[Sym.getIRName()];
383 // FIXME: We should figure out what to do about commons defined by asm.
384 // For now they aren't reported correctly by ModuleSymbolTable.
385 assert(GV);
386 auto &CommonRes = RegularLTO.Commons[GV->getName()];
384387 CommonRes.Size = std::max(CommonRes.Size, Sym.getCommonSize());
385388 CommonRes.Align = std::max(CommonRes.Align, Sym.getCommonAlignment());
386389 CommonRes.Prevailing |= Res.Prevailing;