diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-01-29 14:52:50 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-01-29 14:52:50 +0000 |
commit | 5ead3a2b07cb743b70ce745935a54ea5d06e73fb (patch) | |
tree | 1e60a2af834aa2cdb345e15db8c562d0857ab90f /llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | |
parent | 855fc3bbcaf25938351a1493812765eb93c5c887 (diff) | |
download | llvm-5ead3a2b07cb743b70ce745935a54ea5d06e73fb.zip llvm-5ead3a2b07cb743b70ce745935a54ea5d06e73fb.tar.gz llvm-5ead3a2b07cb743b70ce745935a54ea5d06e73fb.tar.bz2 |
[dsymutil] Generate Apple accelerator tables
This patch adds support for generating accelerator tables in dsymutil.
This feature was already present in our internal repository but not yet
upstreamed because it requires changes to the Apple accelerator table
implementation.
Differential revision: https://reviews.llvm.org/D42501
llvm-svn: 323655
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp index 026573b..5c80206 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp @@ -72,6 +72,8 @@ void AppleAccelTableHeader::setBucketAndHashCount(uint32_t HashCount) { constexpr AppleAccelTableHeader::Atom AppleAccelTableTypeData::Atoms[]; constexpr AppleAccelTableHeader::Atom AppleAccelTableOffsetData::Atoms[]; +constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticOffsetData::Atoms[]; +constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticTypeData::Atoms[]; void AppleAccelTableBase::emitHeader(AsmPrinter *Asm) { Header.emit(Asm); } @@ -219,3 +221,15 @@ void AppleAccelTableTypeData::emit(AsmPrinter *Asm) const { Asm->EmitInt16(Die->getTag()); Asm->EmitInt8(0); } + +void AppleAccelTableStaticOffsetData::emit(AsmPrinter *Asm) const { + Asm->EmitInt32(Offset); +} + +void AppleAccelTableStaticTypeData::emit(AsmPrinter *Asm) const { + Asm->EmitInt32(Offset); + Asm->EmitInt16(Tag); + Asm->EmitInt8(ObjCClassIsImplementation ? dwarf::DW_FLAG_type_implementation + : 0); + Asm->EmitInt32(QualifiedNameHash); +} |