[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 12 17:14:01 PST 2004


Changes in directory llvm/lib/CWriter:

Writer.cpp updated: 1.154 -> 1.155

---
Log message:

Add support for memcpy and memmove intrinsics.  Why isn't the cwriter using
the intrinsiclowering code?? :(


---
Diffs of the changes:  (+18 -0)

Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.154 llvm/lib/CWriter/Writer.cpp:1.155
--- llvm/lib/CWriter/Writer.cpp:1.154	Sun Feb  8 22:37:29 2004
+++ llvm/lib/CWriter/Writer.cpp	Thu Feb 12 17:13:33 2004
@@ -1302,6 +1302,24 @@
         // exception throw.
         Out << "abort()";
         return;
+      case Intrinsic::memcpy:
+        Out << "memcpy(";
+        writeOperand(I.getOperand(1));
+        Out << ", ";
+        writeOperand(I.getOperand(2));
+        Out << ", ";
+        writeOperand(I.getOperand(3));
+        Out << ")";
+        return;
+      case Intrinsic::memmove:
+        Out << "memmove(";
+        writeOperand(I.getOperand(1));
+        Out << ", ";
+        writeOperand(I.getOperand(2));
+        Out << ", ";
+        writeOperand(I.getOperand(3));
+        Out << ")";
+        return;
       }
     }
   visitCallSite(&I);





More information about the llvm-commits mailing list