forked from OSchip/llvm-project
[ELF] Set `addAbsoluteAtom` and `addUndefinedAtom` functions return type to void
We do not use values returned by these functions anywhere. So let's return nothing. llvm-svn: 234358
This commit is contained in:
parent
3dba8a2d96
commit
64bcb690e9
|
@ -450,7 +450,7 @@ public:
|
|||
: ELFFile<ELFT>(name, ctx) {}
|
||||
|
||||
/// \brief add a global absolute atom
|
||||
virtual Atom *addAbsoluteAtom(StringRef symbolName) {
|
||||
virtual void addAbsoluteAtom(StringRef symbolName) {
|
||||
assert(!symbolName.empty() && "AbsoluteAtoms must have a name");
|
||||
Elf_Sym *sym = new (this->_readerStorage) Elf_Sym;
|
||||
sym->st_name = 0;
|
||||
|
@ -461,11 +461,10 @@ public:
|
|||
sym->st_size = 0;
|
||||
ELFAbsoluteAtom<ELFT> *atom = this->createAbsoluteAtom(symbolName, sym, -1);
|
||||
this->_absoluteAtoms._atoms.push_back(atom);
|
||||
return atom;
|
||||
}
|
||||
|
||||
/// \brief add an undefined atom
|
||||
virtual Atom *addUndefinedAtom(StringRef symbolName) {
|
||||
virtual void addUndefinedAtom(StringRef symbolName) {
|
||||
assert(!symbolName.empty() && "UndefinedAtoms must have a name");
|
||||
Elf_Sym *sym = new (this->_readerStorage) Elf_Sym;
|
||||
sym->st_name = 0;
|
||||
|
@ -476,7 +475,6 @@ public:
|
|||
sym->st_size = 0;
|
||||
ELFUndefinedAtom<ELFT> *atom = this->createUndefinedAtom(symbolName, sym);
|
||||
this->_undefinedAtoms._atoms.push_back(atom);
|
||||
return atom;
|
||||
}
|
||||
|
||||
// cannot add atoms to Runtime file
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
SymbolFile(ELFLinkingContext &ctx)
|
||||
: RuntimeFile<ELFT>(ctx, "Dynamic absolute symbols") {}
|
||||
|
||||
Atom *addUndefinedAtom(StringRef) override {
|
||||
void addUndefinedAtom(StringRef) override {
|
||||
llvm_unreachable("Cannot add undefined atoms to resolve undefined symbols");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue