[PATCH] D45024: [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 08:38:03 PDT 2018


aprantl added a comment.

I found a few more nitpicks, but my overall LGTM still stands.



================
Comment at: include/llvm/IR/DebugInfoMetadata.h:2607
 
+/// Label.
+///
----------------
This just repeats the name of the class.
How about something like: `This represents a source-level label, such as a C goto label.`


================
Comment at: include/llvm/IR/IntrinsicInst.h:175
+    Metadata *getRawExpression() const {
+      return nullptr;
+    }
----------------
llvm_unreachable() ?


================
Comment at: test/Assembler/debug-label-bitcode.ll:54
+!10 = !DILocation(line: 4, column: 1, scope: !4)
+!11 = !DILabel(scope: !4, name: "done", file: !1, line: 7)
+!12 = !DILocation(line: 7, column: 1, scope: !4)
----------------
I think for all other constructs we also have negative testcases that verify that 
!DILabel(name: "done", file: !1, line: 7)
!DILabel(scope: !4, file: !1, line: 7)
!DILabel(scope: !4, name: "done", line: 7)
!DILabel(scope: !4, name: "done", file: !1)

are rejected.


Repository:
  rL LLVM

https://reviews.llvm.org/D45024





More information about the llvm-commits mailing list