projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8356b3
)
new ReturnInst(BB) does not "do the right thing". Add an assert to catch it
author
Chris Lattner
<sabre@nondot.org>
Fri, 25 Jun 2004 23:06:57 +0000
(23:06 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 25 Jun 2004 23:06:57 +0000
(23:06 +0000)
sooner rather than later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14421
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/iTerminators.h
patch
|
blob
|
history
diff --git
a/include/llvm/iTerminators.h
b/include/llvm/iTerminators.h
index ddced52697e81d1a4121af91b5f375202f4dc00c..b1c69c28192d264f496895ff9b9c7087830701eb 100644
(file)
--- a/
include/llvm/iTerminators.h
+++ b/
include/llvm/iTerminators.h
@@
-35,6
+35,8
@@
class ReturnInst : public TerminatorInst {
void init(Value *RetVal) {
if (RetVal) {
+ assert(!isa<BasicBlock>(RetVal) &&
+ "Cannot return basic block. Probably using the incorrect ctor");
Operands.reserve(1);
Operands.push_back(Use(RetVal, this));
}