[llvm-commits] CVS: llvm/tools/lli/Interpreter/ExternalFunctions.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 25 13:24:00 PDT 2003


Changes in directory llvm/tools/lli/Interpreter:

ExternalFunctions.cpp updated: 1.47 -> 1.48

---
Log message:

Add __strdup


---
Diffs of the changes:

Index: llvm/tools/lli/Interpreter/ExternalFunctions.cpp
diff -u llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.47 llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.48
--- llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.47	Wed Apr 23 15:23:16 2003
+++ llvm/tools/lli/Interpreter/ExternalFunctions.cpp	Fri Apr 25 13:23:38 2003
@@ -565,6 +565,12 @@
   return Ret;
 }
 
+// char *__strdup(const char *src);
+GenericValue lle_X___strdup(FunctionType *M, const vector<GenericValue> &Args) {
+  assert(Args.size() == 1);
+  return PTOGV(strdup((char*)GVTOP(Args[0])));
+}
+
 // void *memset(void *S, int C, size_t N)
 GenericValue lle_X_memset(FunctionType *M, const vector<GenericValue> &Args) {
   assert(Args.size() == 3);
@@ -803,6 +809,7 @@
   FuncNames["lle_X_strcat"]       = lle_X_strcat;
   FuncNames["lle_X_strcpy"]       = lle_X_strcpy;
   FuncNames["lle_X_strlen"]       = lle_X_strlen;
+  FuncNames["lle_X___strdup"]       = lle_X___strdup;
   FuncNames["lle_X_memset"]       = lle_X_memset;
   FuncNames["lle_X_memcpy"]       = lle_X_memcpy;
 





More information about the llvm-commits mailing list