[llvm-commits] CVS: llvm/tools/jello/Callback.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Dec 5 21:54:01 PST 2002


Changes in directory llvm/tools/jello:

Callback.cpp updated: 1.1 -> 1.2

---
Log message:

Fix to make jello compile on Sparc even though it won't run.


---
Diffs of the changes:

Index: llvm/tools/jello/Callback.cpp
diff -u llvm/tools/jello/Callback.cpp:1.1 llvm/tools/jello/Callback.cpp:1.2
--- llvm/tools/jello/Callback.cpp:1.1	Tue Dec  3 23:05:26 2002
+++ llvm/tools/jello/Callback.cpp	Thu Dec  5 21:52:51 2002
@@ -15,6 +15,7 @@
 static void TrapHandler(int TN, siginfo_t *SI, ucontext_t *ucp) {
   assert(TN == SIGSEGV && "Should be SIGSEGV!");
 
+#ifdef REG_EIP   /* this code does not compile on Sparc! */
   if (SI->si_code != SEGV_MAPERR || SI->si_addr != 0 ||
       ucp->uc_mcontext.gregs[REG_EIP] != 0) {
     std::cerr << "Bad SEGV encountered!\n";
@@ -41,6 +42,8 @@
 
   // Change the instruction pointer to be the real target of the call...
   ucp->uc_mcontext.gregs[REG_EIP] = NewVal;
+
+#endif
 }
 
 





More information about the llvm-commits mailing list