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)
commit43eab6bce02309f470e486667e45d21f09884f51
tree7c4544d51ed7cbbb8b8c3eb1e47b9c47f5ef0195
parent405cc64eace384f436e7ea7cf6a3e1491cdc4093
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235400 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Transforms/Utils/Local.cpp