Remvoe use of MO.isVirtualRegister(), turn an assertion into an assert()
authorChris Lattner <sabre@nondot.org>
Tue, 10 Feb 2004 20:47:24 +0000 (20:47 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 10 Feb 2004 20:47:24 +0000 (20:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11280 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9CodeEmitter.cpp

index 9af69c1cdba4c64001a03b2953176b81c38c61ff..01da2fdcf5c803cf2b23ab4fe27f6350a33990bb 100644 (file)
@@ -594,11 +594,9 @@ int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI,
                                               MachineOperand &MO) {
   int64_t rv = 0; // Return value; defaults to 0 for unhandled cases
                   // or things that get fixed up later by the JIT.
-
-  if (MO.isVirtualRegister()) {
-    std::cerr << "ERROR: virtual register found in machine code.\n";
-    abort();
-  } else if (MO.isPCRelativeDisp()) {
+  assert(MO.getType() != MachineOperand::MO_VirtualRegister &&
+         "ERROR: virtual register found in machine code.");
+  if (MO.isPCRelativeDisp()) {
     DEBUG(std::cerr << "PCRelativeDisp: ");
     Value *V = MO.getVRegValue();
     if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {