diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-06-16 02:56:40 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-06-16 02:56:40 +0000 |
commit | 3b9474ecd72660a354f3b559eb1238ed07de48b6 (patch) | |
tree | f80875af158180f6c4e985cfb1242a11ed6ca03a /llvm/lib/ExecutionEngine/Interpreter | |
parent | f6920d6f3488453d6e2606113f67ea36b3592d6a (diff) | |
download | bcm5719-llvm-3b9474ecd72660a354f3b559eb1238ed07de48b6.tar.gz bcm5719-llvm-3b9474ecd72660a354f3b559eb1238ed07de48b6.zip |
Add int ferror(FILE *)
llvm-svn: 14194
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 456b09f664e..2299874f532 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -636,6 +636,14 @@ GenericValue lle_X_ungetc(FunctionType *M, const vector<GenericValue> &Args) { return GV; } +// int ferror (FILE *stream); +GenericValue lle_X_ferror(FunctionType *M, const vector<GenericValue> &Args) { + assert(Args.size() == 1); + GenericValue GV; + GV.IntVal = ferror (getFILE(GVTOP(Args[0]))); + return GV; +} + // int fprintf(FILE *,sbyte *, ...) - a very rough implementation to make output // useful. GenericValue lle_X_fprintf(FunctionType *M, const vector<GenericValue> &Args) { |