[PATCH] D45024: [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 2 08:53:47 PDT 2018
aprantl added a comment.
There should also be testcases that exercise the new verifier code.
================
Comment at: include/llvm/IR/DebugInfoMetadata.h:2615
+
+ DILabel(LLVMContext &C, StorageType Storage, unsigned Line,
+ ArrayRef<Metadata *> Ops)
----------------
aprantl wrote:
> Why do we need to store the Line in the DILabel? Isn't it redundant with the DILocation !dbg attachment on the dbg.label intrinsic?
I don't think that it is necessary to store the line number in the DILabel. It is already stored in the !dbg DILocation attachment on the call.
================
Comment at: lib/IR/AsmWriter.cpp:1978
+ Printer.printString("name", N->getName());
+ Printer.printMetadata("file", N->getRawFile());
+ Printer.printInt("line", N->getLine());
----------------
I think file and line should just come from the DILocation. Is there a situation where the File in the DILabel would not match the one in the DILocation?
Repository:
rL LLVM
https://reviews.llvm.org/D45024
More information about the llvm-commits
mailing list