[llvm-commits] CVS: llvm/tools/lli/ExternalFunctions.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 6 17:00:01 PST 2002
Changes in directory llvm/tools/lli:
ExternalFunctions.cpp updated: 1.34 -> 1.35
---
Log message:
Implement fputc and ungetc to allow burg to run in lli
---
Diffs of the changes:
Index: llvm/tools/lli/ExternalFunctions.cpp
diff -u llvm/tools/lli/ExternalFunctions.cpp:1.34 llvm/tools/lli/ExternalFunctions.cpp:1.35
--- llvm/tools/lli/ExternalFunctions.cpp:1.34 Wed Oct 2 16:12:13 2002
+++ llvm/tools/lli/ExternalFunctions.cpp Wed Nov 6 16:59:28 2002
@@ -549,6 +549,22 @@
return GV;
}
+// int fputc(int C, FILE *stream);
+GenericValue lle_X_fputc(FunctionType *M, const vector<GenericValue> &Args) {
+ assert(Args.size() == 2);
+ GenericValue GV;
+ GV.IntVal = fputc(Args[0].IntVal, getFILE(Args[1].PointerVal));
+ return GV;
+}
+
+// int ungetc(int C, FILE *stream);
+GenericValue lle_X_ungetc(FunctionType *M, const vector<GenericValue> &Args) {
+ assert(Args.size() == 2);
+ GenericValue GV;
+ GV.IntVal = ungetc(Args[0].IntVal, getFILE(Args[1].PointerVal));
+ return GV;
+}
+
} // End extern "C"
@@ -596,5 +612,8 @@
FuncNames["lle_X_fwrite"] = lle_X_fwrite;
FuncNames["lle_X_fgets"] = lle_X_fgets;
FuncNames["lle_X_fflush"] = lle_X_fflush;
+ FuncNames["lle_X_fgetc"] = lle_X_getc;
FuncNames["lle_X_getc"] = lle_X_getc;
+ FuncNames["lle_X_fputc"] = lle_X_fputc;
+ FuncNames["lle_X_ungetc"] = lle_X_ungetc;
}
More information about the llvm-commits
mailing list