[PATCH] D67563: Debug Info: Add support for named constants

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 10:33:25 PDT 2019


aprantl created this revision.
aprantl added reviewers: davide, vsk, dblaikie.
aprantl added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

DWARF defines DW_TAG_constant for "languages that have true named constants" (DWARF v5 section 4.1). This patch adds LLVM IR metadata and DWARF AsmPrinter support for this feature. The primary motivation behind this addition is for representing "let"-bindings in Swift, to communicate to the debugger that these may not be modified. It is very likely also useful for many other programming languages that have named constants.

rdar://problem/16042546


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67563

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/DebugInfoFlags.def
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
  llvm/test/DebugInfo/Generic/constants.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67563.220136.patch
Type: text/x-patch
Size: 4379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190913/dba96919/attachment.bin>


More information about the llvm-commits mailing list