summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DebugMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/DebugMap.h')
-rw-r--r--llvm/tools/dsymutil/DebugMap.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/tools/dsymutil/DebugMap.h b/llvm/tools/dsymutil/DebugMap.h
index 4907b8f1a72..1a3d62b67b7 100644
--- a/llvm/tools/dsymutil/DebugMap.h
+++ b/llvm/tools/dsymutil/DebugMap.h
@@ -117,12 +117,15 @@ public:
class DebugMapObject {
public:
struct SymbolMapping {
- yaml::Hex64 ObjectAddress;
+ Optional<yaml::Hex64> ObjectAddress;
yaml::Hex64 BinaryAddress;
yaml::Hex32 Size;
- SymbolMapping(uint64_t ObjectAddress, uint64_t BinaryAddress, uint32_t Size)
- : ObjectAddress(ObjectAddress), BinaryAddress(BinaryAddress),
- Size(Size) {}
+ SymbolMapping(Optional<uint64_t> ObjectAddr, uint64_t BinaryAddress,
+ uint32_t Size)
+ : BinaryAddress(BinaryAddress), Size(Size) {
+ if (ObjectAddr)
+ ObjectAddress = *ObjectAddr;
+ }
/// For YAML IO support
SymbolMapping() = default;
};
@@ -132,7 +135,7 @@ public:
/// \brief Adds a symbol mapping to this DebugMapObject.
/// \returns false if the symbol was already registered. The request
/// is discarded in this case.
- bool addSymbol(llvm::StringRef SymName, uint64_t ObjectAddress,
+ bool addSymbol(llvm::StringRef SymName, Optional<uint64_t> ObjectAddress,
uint64_t LinkedAddress, uint32_t Size);
/// \brief Lookup a symbol mapping.
OpenPOWER on IntegriCloud