diff options
Diffstat (limited to 'tools/dsymutil/DebugMap.h')
-rw-r--r-- | tools/dsymutil/DebugMap.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/dsymutil/DebugMap.h b/tools/dsymutil/DebugMap.h index 06ac5a503dcd1..1a3d62b67b7b4 100644 --- a/tools/dsymutil/DebugMap.h +++ b/tools/dsymutil/DebugMap.h @@ -1,4 +1,4 @@ -//===- tools/dsymutil/DebugMap.h - Generic debug map representation -------===// +//=== tools/dsymutil/DebugMap.h - Generic debug map representation -*- C++ -*-// // // The LLVM Linker // @@ -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. |