mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
new ReturnInst(BB) does not "do the right thing". Add an assert to catch it
sooner rather than later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14421 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8356b3ce2
commit
e056f5c8e2
@ -35,6 +35,8 @@ class ReturnInst : public TerminatorInst {
|
|||||||
|
|
||||||
void init(Value *RetVal) {
|
void init(Value *RetVal) {
|
||||||
if (RetVal) {
|
if (RetVal) {
|
||||||
|
assert(!isa<BasicBlock>(RetVal) &&
|
||||||
|
"Cannot return basic block. Probably using the incorrect ctor");
|
||||||
Operands.reserve(1);
|
Operands.reserve(1);
|
||||||
Operands.push_back(Use(RetVal, this));
|
Operands.push_back(Use(RetVal, this));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user