diff options
Diffstat (limited to 'llvm/lib/IR/IntrinsicInst.cpp')
| -rw-r--r-- | llvm/lib/IR/IntrinsicInst.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp index 9ffcae1f8f8..787889934d8 100644 --- a/llvm/lib/IR/IntrinsicInst.cpp +++ b/llvm/lib/IR/IntrinsicInst.cpp @@ -45,7 +45,10 @@ Value *DbgInfoIntrinsic::getVariableLocation(bool AllowNullOp) const { return V->getValue(); // When the value goes to null, it gets replaced by an empty MDNode. - assert(!cast<MDNode>(MD)->getNumOperands() && "Expected an empty MDNode"); + assert((isa<DbgLabelInst>(this) + || !cast<MDNode>(MD)->getNumOperands()) + && "DbgValueInst Expected an empty MDNode"); + return nullptr; } |

