Fix bug generating code for void call instructions: don't call

getReg() on void value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2004-06-15 20:06:32 +00:00
parent 5eb64744d0
commit e14e338724
4 changed files with 8 additions and 8 deletions

View File

@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
.addReg (ArgReg);
}
unsigned DestReg = getReg (I);
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
if (I.getType () == Type::VoidTy)
return;
unsigned DestReg = getReg (I);
// Deal w/ return value
switch (getClass (I.getType ())) {
case cByte:

View File

@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
.addReg (ArgReg);
}
unsigned DestReg = getReg (I);
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
if (I.getType () == Type::VoidTy)
return;
unsigned DestReg = getReg (I);
// Deal w/ return value
switch (getClass (I.getType ())) {
case cByte:

View File

@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
.addReg (ArgReg);
}
unsigned DestReg = getReg (I);
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
if (I.getType () == Type::VoidTy)
return;
unsigned DestReg = getReg (I);
// Deal w/ return value
switch (getClass (I.getType ())) {
case cByte:

View File

@ -452,10 +452,10 @@ void V8ISel::visitCallInst(CallInst &I) {
.addReg (ArgReg);
}
unsigned DestReg = getReg (I);
BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0));
if (I.getType ()->getPrimitiveID () == Type::VoidTyID)
if (I.getType () == Type::VoidTy)
return;
unsigned DestReg = getReg (I);
// Deal w/ return value
switch (getClass (I.getType ())) {
case cByte: