mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Add a SymbolicFile interface between Binary and ObjectFile.
This interface allows IRObjectFile to be implemented without having dummy methods for all section and segment related methods. Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is still not plugged in since it requires some refactoring to make a Module hold a DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,7 +25,16 @@ void ObjectFile::anchor() { }
|
||||
|
||||
ObjectFile::ObjectFile(unsigned int Type, MemoryBuffer *Source,
|
||||
bool BufferOwned)
|
||||
: Binary(Type, Source, BufferOwned) {}
|
||||
: SymbolicFile(Type, Source, BufferOwned) {}
|
||||
|
||||
error_code ObjectFile::printSymbolName(raw_ostream &OS,
|
||||
DataRefImpl Symb) const {
|
||||
StringRef Name;
|
||||
if (error_code EC = getSymbolName(Symb, Name))
|
||||
return EC;
|
||||
OS << Name;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code ObjectFile::getSymbolAlignment(DataRefImpl DRI,
|
||||
uint32_t &Result) const {
|
||||
|
Reference in New Issue
Block a user