[RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef

rather than a string section name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243456 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2015-07-28 17:52:11 +00:00
parent eb9ef2d368
commit ce8287db09
10 changed files with 73 additions and 56 deletions

View 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.