X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FObject%2FSymbolicFile.h;h=6b10ceb263acb875ef6150e8bb279a526a8998bb;hb=3c4c9334b22f59d9ec8728491993ac731e09801a;hp=b6a8b4d81501b5b3b1bbf7a6827b25832176ce93;hpb=c71d3d47a0a7db9784db39a1de1194bd49370e41;p=oota-llvm.git diff --git a/include/llvm/Object/SymbolicFile.h b/include/llvm/Object/SymbolicFile.h index b6a8b4d8150..6b10ceb263a 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 +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. @@ -93,6 +100,7 @@ public: SF_FormatSpecific = 1U << 7, // Specific to the object file format // (e.g. section symbols) SF_Thumb = 1U << 8, // Thumb symbol in a 32-bit ARM binary + SF_Hidden = 1U << 9, // Symbol has hidden visibility }; BasicSymbolRef() : OwningObject(nullptr) { } @@ -114,11 +122,9 @@ public: typedef content_iterator basic_symbol_iterator; -const uint64_t UnknownAddressOrSize = ~0ULL; - class SymbolicFile : public Binary { public: - virtual ~SymbolicFile(); + ~SymbolicFile() override; SymbolicFile(unsigned int Type, MemoryBufferRef Source); // virtual interface.