mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Implement the clock() function
llvm-svn: 1573
This commit is contained in:
parent
606fdfe109
commit
e77bf6231e
@ -363,6 +363,12 @@ GenericValue lle_X_printf(MethodType *M, const vector<GenericValue> &Args) {
|
||||
return GV;
|
||||
}
|
||||
|
||||
// int clock(void) - Profiling implementation
|
||||
GenericValue lle_i_clock(MethodType *M, const vector<GenericValue> &Args) {
|
||||
extern int clock(void);
|
||||
GenericValue GV; GV.IntVal = clock();
|
||||
return GV;
|
||||
}
|
||||
|
||||
} // End extern "C"
|
||||
|
||||
@ -401,4 +407,5 @@ void Interpreter::initializeExternalMethods() {
|
||||
FuncNames["lle_X_sqrt"] = lle_X_sqrt;
|
||||
FuncNames["lle_X_printf"] = lle_X_printf;
|
||||
FuncNames["lle_X_sprintf"] = lle_X_sprintf;
|
||||
FuncNames["lle_i_clock"] = lle_i_clock;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user