[PATCH] D32559: Debug info: Add support for DW_TAG_thrown_type.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 14:30:22 PDT 2017


aprantl created this revision.

For Swift we would like to be able to record the error types that a
function may throw in the debug info, so the debugger can display them alongside the
function's return value when finish-ing a function.

      

DWARF defines DW_TAG_thrown_type (intended to be used for C++ throw()
declarations) that is a perfect fit for this purpose. This patch wires
up support for DW_TAG_thrown_type in LLVM by adding a list of thrown
types to DISubprogram.

      

To offset the cost of the extra pointer, there is a follow-up patch
that turns DISubprogram into a variable-length node.

      

rdar://problem/29481673


Repository:
  rL LLVM

https://reviews.llvm.org/D32559

Files:
  include/llvm/IR/DebugInfoMetadata.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/MetadataLoader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.h
  lib/IR/AsmWriter.cpp
  lib/IR/DebugInfoMetadata.cpp
  lib/IR/LLVMContextImpl.h
  lib/IR/Verifier.cpp
  test/Assembler/disubprogram.ll
  test/DebugInfo/Generic/thrownTypes.ll
  test/Verifier/DISubprogram.ll
  unittests/IR/MetadataTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32559.96820.patch
Type: text/x-patch
Size: 35055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170426/2ccee259/attachment-0001.bin>


More information about the llvm-commits mailing list