diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-10-05 19:17:28 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-10-05 19:17:28 +0000 |
commit | 77672776392e36a7bd65cb2845834675aefd8076 (patch) | |
tree | 8749d506e990fd21612925a0d8bd5f7708791171 /llvm/tools/dsymutil/DebugMap.h | |
parent | e07072130873f3fb65a827a6397cd7d7684241ca (diff) | |
download | bcm5719-llvm-77672776392e36a7bd65cb2845834675aefd8076.tar.gz bcm5719-llvm-77672776392e36a7bd65cb2845834675aefd8076.zip |
[llvm-dsymutil] Add support for __swift_ast MachO DWARF section
Summary:
Xcode's dsymutil emits a __swift_ast DWARF section, which is required for debugging,
and which contains a byte-for-byte dump of the swiftmodule file.
Add this feature to llvm-dsymutil.
Tested with `gobjdump --dwarf=info -s`, by verifying that the contents of
`__DWARF.__swift_ast` match between Xcode's dsymutil and llvm-dsymutil
(Xcode's dwarfdump and llvm-dwarfdump don't currently recognize the
__swift_ast section).
Reviewers: aprantl, friss
Subscribers: llvm-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D38504
llvm-svn: 315004
Diffstat (limited to 'llvm/tools/dsymutil/DebugMap.h')
-rw-r--r-- | llvm/tools/dsymutil/DebugMap.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/dsymutil/DebugMap.h b/llvm/tools/dsymutil/DebugMap.h index eab0cb0a800..0b564149488 100644 --- a/llvm/tools/dsymutil/DebugMap.h +++ b/llvm/tools/dsymutil/DebugMap.h @@ -94,7 +94,8 @@ public: /// debug map. DebugMapObject & addDebugMapObject(StringRef ObjectFilePath, - sys::TimePoint<std::chrono::seconds> Timestamp); + sys::TimePoint<std::chrono::seconds> Timestamp, + uint8_t Type); const Triple &getTriple() const { return BinaryTriple; } @@ -154,6 +155,8 @@ public: return Timestamp; } + uint8_t getType() const { return Type; } + iterator_range<StringMap<SymbolMapping>::const_iterator> symbols() const { return make_range(Symbols.begin(), Symbols.end()); } @@ -166,12 +169,13 @@ private: friend class DebugMap; /// DebugMapObjects can only be constructed by the owning DebugMap. DebugMapObject(StringRef ObjectFilename, - sys::TimePoint<std::chrono::seconds> Timestamp); + sys::TimePoint<std::chrono::seconds> Timestamp, uint8_t Type); std::string Filename; sys::TimePoint<std::chrono::seconds> Timestamp; StringMap<SymbolMapping> Symbols; DenseMap<uint64_t, DebugMapEntry *> AddressToMapping; + uint8_t Type; /// For YAMLIO support. ///@{ |