[PATCH] D40512: [Debugify] Add a pass to test debug info preservation
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 16:22:03 PST 2017
vsk added inline comments.
================
Comment at: lib/Transforms/Utils/Debugify.cpp:162
+ unsigned VarNum;
+ bool Valid = to_integer(DVI->getVariable()->getName(), VarNum, 10);
+ assert(Valid && "Unexpected name for DILocalVariable");
----------------
mgrang wrote:
> How about you wrap the "bool Valid" definition and the assert inside #ifndef NDEBUG ? You can then get rid of the (void) Valid.
I'm not sure how Valid would be set in the asserts-enabled case, then.
================
Comment at: test/Transforms/LoopStrengthReduce/debug-info.ll:1
+; XFAIL: *
+; RUN: opt < %s -debugify -loop-reduce -gvn -check-debugify -S 2>&1 | FileCheck %s
----------------
probinson wrote:
> This doesn't seem very useful.
Fair point. There's an easier way to add a negative test -- just run '-debugify -strip-debug -check-debugify' and check that it fails.
https://reviews.llvm.org/D40512
More information about the llvm-commits
mailing list