summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2014-11-13 03:20:23 +0000
committerFrederic Riss <friss@apple.com>2014-11-13 03:20:23 +0000
commit0f7abef2cf335a5b3e752440dd05607d9859c0ed (patch)
tree9de5dae053acf2eb86ca6509279418bb9071f4e0 /llvm/lib/CodeGen
parent904cf593c1a3b372cf7d3ccb425d704faf35c7ab (diff)
downloadbcm5719-llvm-0f7abef2cf335a5b3e752440dd05607d9859c0ed.tar.gz
bcm5719-llvm-0f7abef2cf335a5b3e752440dd05607d9859c0ed.zip
Add an assert and a test that verify r221709's fix.
llvm-svn: 221854
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 4a83a3f00b5..33620e76c33 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -6152,9 +6152,11 @@ unsigned SelectionDAG::AssignTopologicalOrder() {
/// AddDbgValue - Add a dbg_value SDNode. If SD is non-null that means the
/// value is produced by SD.
void SelectionDAG::AddDbgValue(SDDbgValue *DB, SDNode *SD, bool isParameter) {
- DbgInfo->add(DB, SD, isParameter);
- if (SD)
+ if (SD) {
+ assert(DbgInfo->getSDDbgValues(SD).empty() || SD->getHasDebugValue());
SD->setHasDebugValue(true);
+ }
+ DbgInfo->add(DB, SD, isParameter);
}
/// TransferDbgValues - Transfer SDDbgValues.
OpenPOWER on IntegriCloud