summaryrefslogtreecommitdiff
path: root/include/llvm/Object/SymbolicFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/SymbolicFile.h')
-rw-r--r--include/llvm/Object/SymbolicFile.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Object/SymbolicFile.h b/include/llvm/Object/SymbolicFile.h
index 537997ac6318..0c5b38111a9c 100644
--- a/include/llvm/Object/SymbolicFile.h
+++ b/include/llvm/Object/SymbolicFile.h
@@ -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.
@@ -94,6 +101,7 @@ public:
// (e.g. section symbols)
SF_Thumb = 1U << 8, // Thumb symbol in a 32-bit ARM binary
SF_Hidden = 1U << 9, // Symbol has hidden visibility
+ SF_Const = 1U << 10, // Symbol value is constant
};
BasicSymbolRef() : OwningObject(nullptr) { }