[RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef
[oota-llvm.git] / include / llvm / Object / SymbolicFile.h
index 2bfff4c6b5a0f8d516c9e0d916505cedc9e9dd29..6b10ceb263acb875ef6150e8bb279a526a8998bb 100644 (file)
@@ -15,6 +15,7 @@
 #define LLVM_OBJECT_SYMBOLICFILE_H
 
 #include "llvm/Object/Binary.h"
+#include "llvm/Support/Format.h"
 
 namespace llvm {
 namespace object {
@@ -29,6 +30,12 @@ union DataRefImpl {
   DataRefImpl() { std::memset(this, 0, sizeof(DataRefImpl)); }
 };
 
+template <typename OStream>
+OStream& operator<<(OStream &OS, const DataRefImpl &D) {
+  OS << "(" << format("0x%x8", D.p) << " (" << format("0x%x8", D.d.a) << ", " << format("0x%x8", D.d.b) << "))";
+  return OS;
+}
+
 inline bool operator==(const DataRefImpl &a, const DataRefImpl &b) {
   // Check bitwise identical. This is the only legal way to compare a union w/o
   // knowing which member is in use.
@@ -115,8 +122,6 @@ public:
 
 typedef content_iterator<BasicSymbolRef> basic_symbol_iterator;
 
-const uint64_t UnknownAddressOrSize = ~0ULL;
-
 class SymbolicFile : public Binary {
 public:
   ~SymbolicFile() override;