[PATCH] D75585: Add debug info support for Swift/Clang APINotes.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 16:40:27 PST 2020
aprantl created this revision.
aprantl added reviewers: dblaikie, davide, vsk.
aprantl added a project: debug-info.
Herald added a reviewer: deadalnix.
Herald added subscribers: ormris, hiraditya.
Herald added a reviewer: JDevlieghere.
Herald added a project: LLVM.
aprantl marked an inline comment as done.
aprantl added inline comments.
================
Comment at: llvm/include/llvm/BinaryFormat/Dwarf.def:412
// Apple extensions.
+HANDLE_DW_AT(0x3e07, APPLE_apinotes, 0, APPLE)
HANDLE_DW_AT(0x3fe1, APPLE_optimized, 0, APPLE)
----------------
I'm fine with calling this `DW_AT_LLVM_apinotes`, too.
Disclaimer: This is a little awkward, since this adds DWARF support for a feature that is currently only present in swift-clang but has been proposed for upstreaming (http://lists.llvm.org/pipermail/cfe-dev/2015-December/046335.html) multiple times (http://lists.llvm.org/pipermail/cfe-dev/2017-May/053860.html) and will — I believe — eventually find tis way into upstream clang.
In order for dsymutil to collect .apinotes files (which capture attributes such as nullability, Swift import names, and availability), I want to propose adding an `apinotes:` field to DIModule that gets translated into a `DW_AT_LLVM_apinotes (path)` nested inside `DW_TAG_module`. This will be primarily used by LLDB to indirectly extract the Swift names of Clang declarations that were deserialized from DWARF.
https://reviews.llvm.org/D75585
Files:
llvm/include/llvm-c/DebugInfo.h
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/test/Assembler/dimodule.ll
llvm/test/DebugInfo/X86/DIModule.ll
llvm/tools/llvm-c-test/debuginfo.c
llvm/unittests/IR/MetadataTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75585.248065.patch
Type: text/x-patch
Size: 18545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/1939ba08/attachment.bin>
More information about the llvm-commits
mailing list