[PATCH] D45078: [DebugInfo] Enable the capability of attaching metadata to BasicBlock.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 23:25:32 PDT 2018


HsiangKai created this revision.
HsiangKai added reviewers: rnk, chenwj, aprantl.
Herald added a subscriber: JDevlieghere.

In order to attach debug info to labels. We need to enable the capability of attaching metadata to BasicBlock. If we have following LLVM IR fragment,

top:

  %0 = load i32, i32* %a.addr, align 4

we could attach debug metadata to label 'top' as follow

top: !10

  %0 = load i32, i32* %a.addr, align 4

!10 = DILabel(name: top, ...)


Repository:
  rL LLVM

https://reviews.llvm.org/D45078

Files:
  include/llvm/IR/BasicBlock.h
  lib/IR/AsmWriter.cpp
  lib/IR/LLVMContextImpl.h
  lib/IR/Metadata.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45078.140386.patch
Type: text/x-patch
Size: 7419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180330/14474ab9/attachment.bin>


More information about the llvm-commits mailing list