summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c39088)
raw | patch | inline | side by side (parent: 9c39088)
author | Adrian Prantl <aprantl@apple.com> | |
Fri, 21 Nov 2014 00:39:43 +0000 (00:39 +0000) | ||
committer | Adrian Prantl <aprantl@apple.com> | |
Fri, 21 Nov 2014 00:39:43 +0000 (00:39 +0000) |
correctly. This helps with catching problems caused by IRBuilder abuse
such as the one fixed in CFE r222487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222488 91177308-0d34-0410-b5e6-96231b3b80d8
such as the one fixed in CFE r222487.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp | patch | blob | history |
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index d42ca31b5aa7795043ee0175ce49248ba4a65e2b..05600155a8c390aaebb528de305d77e063b07701 100644 (file)
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
}
}
}
+
+ // Check that all instructions have their parent pointers set up correctly.
+ for (auto &I: BB)
+ Assert(I.getParent() == &BB, "Instruction has bogus parent pointer!");
}
void Verifier::visitTerminatorInst(TerminatorInst &I) {