summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 2e6b9e6505a..923baa58bcd 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -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 {
OpenPOWER on IntegriCloud