summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DebugMap.h
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-01-07 23:27:25 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-01-07 23:27:25 +0000
commit91b43adb69d91faa1546eb9df0ead7b550a855f2 (patch)
tree0f3de5ff430e829bdbce855106ec4ffb67d25509 /llvm/tools/dsymutil/DebugMap.h
parent6f366c3a040e3bdc6756d455b0b82996cd5822ef (diff)
downloadbcm5719-llvm-91b43adb69d91faa1546eb9df0ead7b550a855f2.tar.gz
bcm5719-llvm-91b43adb69d91faa1546eb9df0ead7b550a855f2.zip
[dsymutil] Upstream unobfuscation logic.
The unobufscation support for BCSymbolMaps was the last piece of code that hasn't been upstreamed yet. This patch contains a reworked version of the existing code and relevant tests. Differential revision: https://reviews.llvm.org/D56346 llvm-svn: 350580
Diffstat (limited to 'llvm/tools/dsymutil/DebugMap.h')
-rw-r--r--llvm/tools/dsymutil/DebugMap.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/tools/dsymutil/DebugMap.h b/llvm/tools/dsymutil/DebugMap.h
index c9883773d3d..d8de37e33d5 100644
--- a/llvm/tools/dsymutil/DebugMap.h
+++ b/llvm/tools/dsymutil/DebugMap.h
@@ -75,7 +75,7 @@ class DebugMapObject;
class DebugMap {
Triple BinaryTriple;
std::string BinaryPath;
-
+ std::vector<uint8_t> BinaryUUID;
using ObjectContainer = std::vector<std::unique_ptr<DebugMapObject>>;
ObjectContainer Objects;
@@ -89,8 +89,10 @@ class DebugMap {
///@}
public:
- DebugMap(const Triple &BinaryTriple, StringRef BinaryPath)
- : BinaryTriple(BinaryTriple), BinaryPath(BinaryPath) {}
+ DebugMap(const Triple &BinaryTriple, StringRef BinaryPath,
+ ArrayRef<uint8_t> BinaryUUID = ArrayRef<uint8_t>())
+ : BinaryTriple(BinaryTriple), BinaryPath(BinaryPath),
+ BinaryUUID(BinaryUUID.begin(), BinaryUUID.end()) {}
using const_iterator = ObjectContainer::const_iterator;
@@ -113,6 +115,10 @@ public:
const Triple &getTriple() const { return BinaryTriple; }
+ const ArrayRef<uint8_t> getUUID() const {
+ return ArrayRef<uint8_t>(BinaryUUID);
+ }
+
StringRef getBinaryPath() const { return BinaryPath; }
void print(raw_ostream &OS) const;
OpenPOWER on IntegriCloud