DebugInfo: Assert dbg.declare/value insts are valid
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 21 Apr 2015 18:24:23 +0000 (18:24 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 21 Apr 2015 18:24:23 +0000 (18:24 +0000)
commitd4a19a396d06ba327838d7ebd936c9d4829bca78
tree00954ac633758a0a490dcd6d14456851387e946d
parentd2a1a519965155c3509204498849126c59ce73de
DebugInfo: Assert dbg.declare/value insts are valid

Remove early returns for when `getVariable()` is null, and just assert
that it never happens.  The Verifier already confirms that there's a
valid variable on these intrinsics, so we should assume the debug info
isn't broken.  I also updated a check for a `!dbg` attachment, which the
Verifier similarly guarantees.

llvm-svn: 235400
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Transforms/Utils/Local.cpp