[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Dec 4 11:16:03 PST 2002


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.47 -> 1.48

---
Log message:

Avoid crashing on Arguments, just silently miscompile


---
Diffs of the changes:

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.47 llvm/lib/Target/X86/InstSelectSimple.cpp:1.48
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.47	Wed Dec  4 00:56:56 2002
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Wed Dec  4 11:15:34 2002
@@ -138,6 +138,8 @@
       } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
         // Move the address of the global into the register
         BuildMI(BB, X86::MOVir32, 1, Reg).addReg(GV);
+      } else if (Argument *A = dyn_cast<Argument>(V)) {
+        std::cerr << "ERROR: Arguments not implemented in SimpleInstSel\n";
       } else {
         assert(0 && "Don't know how to handle a value of this type!");
       }





More information about the llvm-commits mailing list