[lld] r175993 - [ELF] Change functions to virtual, in ExecutableAtoms
Shankar Easwaran
shankare at codeaurora.org
Sun Feb 24 07:11:55 PST 2013
Author: shankare
Date: Sun Feb 24 09:11:55 2013
New Revision: 175993
URL: http://llvm.org/viewvc/llvm-project?rev=175993&view=rev
Log:
[ELF] Change functions to virtual, in ExecutableAtoms
Modified:
lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h
Modified: lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h?rev=175993&r1=175992&r2=175993&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ExecutableAtoms.h Sun Feb 24 09:11:55 2013
@@ -33,7 +33,7 @@ public:
: ELFFile<ELFT>(ti, name) {}
/// \brief add a global absolute atom
- void addAbsoluteAtom(StringRef symbolName) {
+ virtual void addAbsoluteAtom(StringRef symbolName) {
Elf_Sym *symbol = new (_allocator.Allocate<Elf_Sym>()) Elf_Sym;
symbol->st_name = 0;
symbol->st_value = 0;
@@ -48,7 +48,7 @@ public:
}
/// \brief add an undefined atom
- void addUndefinedAtom(StringRef symbolName) {
+ virtual void addUndefinedAtom(StringRef symbolName) {
Elf_Sym *symbol = new (_allocator) Elf_Sym;
symbol->st_name = 0;
symbol->st_value = 0;
@@ -60,19 +60,19 @@ public:
_undefinedAtoms._atoms.push_back(newAtom);
}
- const File::atom_collection<DefinedAtom> &defined() const {
+ virtual const File::atom_collection<DefinedAtom> &defined() const {
return _definedAtoms;
}
- const File::atom_collection<UndefinedAtom> &undefined() const {
+ virtual const File::atom_collection<UndefinedAtom> &undefined() const {
return _undefinedAtoms;
}
- const File::atom_collection<SharedLibraryAtom> &sharedLibrary() const {
+ virtual const File::atom_collection<SharedLibraryAtom> &sharedLibrary() const {
return _sharedLibraryAtoms;
}
- const File::atom_collection<AbsoluteAtom> &absolute() const {
+ virtual const File::atom_collection<AbsoluteAtom> &absolute() const {
return _absoluteAtoms;
}
@@ -81,7 +81,7 @@ public:
llvm_unreachable("cannot add atoms to Runtime files");
}
-private:
+protected:
llvm::BumpPtrAllocator _allocator;
File::atom_collection_vector<DefinedAtom> _definedAtoms;
File::atom_collection_vector<UndefinedAtom> _undefinedAtoms;
More information about the llvm-commits
mailing list