[PATCH] D42501: [dsymutil] Generate Apple accelerator tables

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 09:08:15 PST 2018


aprantl requested changes to this revision.
aprantl added a comment.
This revision now requires changes to proceed.

Almost there. Thanks for bearing with me!



================
Comment at: include/llvm/CodeGen/AccelTable.h:453
+#ifndef NDEBUG
+  void print(raw_ostream &OS) const override {
+    OS << "  Static Offset: " << Offset << "\n";
----------------
Doesn't need to happen in this commit, but I think we should move the implementation of the print functions into the cpp file.


================
Comment at: tools/dsymutil/CMakeLists.txt:4
   AsmPrinter
+  BinaryFormat
   DebugInfoDWARF
----------------
JDevlieghere wrote:
> aprantl wrote:
> > What's the dependency that makes this necessary?
> The call to `dwarf::djbHash()`
That is silly :-) and dsymutil is already huge.

MD5 is in Support, so let's this function to Support too, and remove it from the dwarf namespace.


================
Comment at: tools/dsymutil/DwarfLinker.cpp:1311
     Asm->EmitInt32(Name.Die->getOffset());
-    Asm->OutStreamer->EmitBytes(
-        StringRef(Name.Name.data(), Name.Name.size() + 1));
+    Asm->OutStreamer->EmitBytes(StringRef(Name.Name.getString().data(),
+                                          Name.Name.getString().size() + 1));
----------------
JDevlieghere wrote:
> aprantl wrote:
> > The + 1 is for a \NUL? And it's guaranteed to exist?
> I'll double check!
Is there no `EmitInt8()` or `EmitByte()` ?


https://reviews.llvm.org/D42501





More information about the llvm-commits mailing list