[PATCH] D46815: [DbgInfo] Fix StripDebugInfo

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 11:21:12 PDT 2018


vsk added inline comments.


================
Comment at: lib/IR/DebugInfo.cpp:385
+                                "llvm.dbg.declare",
+                                "llvm.dbg.addr"};
+  for (StringRef FuncName : DbgIntrinsics) {
----------------
There's a new debug label instruction you should include: http://llvm.org/doxygen/classllvm_1_1DbgLabelInst.html


================
Comment at: test/DebugInfo/strip-intrinsic-dbg.ll:2
+; RUN: opt -S -enable-debugify -strip-debugify <%s | FileCheck %s
+
+; CHECK-LABEL: foo
----------------
Sorry to not have mentioned this earlier, but you can simplify this test further by removing all of the definitions, declaring the debug intrinsics, and running -strip-debug. E.g: "declare void @llvm.dbg.declare()", etc.


================
Comment at: tools/opt/opt.cpp:207
+StripDebugify("strip-debugify",
+           cl::desc("Strip debugify metadata in enable-debugify after check."));
+
----------------
Shouldn't -strip-debug do the right thing with debugify metadata?


https://reviews.llvm.org/D46815





More information about the llvm-commits mailing list