llvm-objdump: don't print relocations in non-relocatable files.
[oota-llvm.git] / lib / Object / COFFObjectFile.cpp
index 29ea0a1a79c33315c636c3e124ae2c40f6b10f2d..717f019509bd7d8f2f515669f46837135b24df3a 100644 (file)
@@ -979,6 +979,10 @@ COFFObjectFile::getRelocationValueString(DataRefImpl Rel,
   return object_error::success;
 }
 
+bool COFFObjectFile::isRelocatableObject() const {
+  return !DataDirectory;
+}
+
 bool ImportDirectoryEntryRef::
 operator==(const ImportDirectoryEntryRef &Other) const {
   return ImportTable == Other.ImportTable && Index == Other.Index;