[llvm-commits] [llvm] r151313 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Thu Feb 23 16:20:08 PST 2012
Author: chapuni
Date: Thu Feb 23 18:20:08 2012
New Revision: 151313
URL: http://llvm.org/viewvc/llvm-project?rev=151313&view=rev
Log:
EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can be mapped in FuncNames[] at the initialization.
Modified:
llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=151313&r1=151312&r2=151313&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Thu Feb 23 18:20:08 2012
@@ -298,6 +298,7 @@
//
// void atexit(Function*)
+static
GenericValue lle_X_atexit(FunctionType *FT,
const std::vector<GenericValue> &Args) {
assert(Args.size() == 1);
@@ -308,6 +309,7 @@
}
// void exit(int)
+static
GenericValue lle_X_exit(FunctionType *FT,
const std::vector<GenericValue> &Args) {
TheInterpreter->exitCalled(Args[0]);
@@ -315,6 +317,7 @@
}
// void abort(void)
+static
GenericValue lle_X_abort(FunctionType *FT,
const std::vector<GenericValue> &Args) {
//FIXME: should we report or raise here?
@@ -325,6 +328,7 @@
// int sprintf(char *, const char *, ...) - a very rough implementation to make
// output useful.
+static
GenericValue lle_X_sprintf(FunctionType *FT,
const std::vector<GenericValue> &Args) {
char *OutputBuffer = (char *)GVTOP(Args[0]);
@@ -406,6 +410,7 @@
// int printf(const char *, ...) - a very rough implementation to make output
// useful.
+static
GenericValue lle_X_printf(FunctionType *FT,
const std::vector<GenericValue> &Args) {
char Buffer[10000];
@@ -418,6 +423,7 @@
}
// int sscanf(const char *format, ...);
+static
GenericValue lle_X_sscanf(FunctionType *FT,
const std::vector<GenericValue> &args) {
assert(args.size() < 10 && "Only handle up to 10 args to sscanf right now!");
@@ -433,6 +439,7 @@
}
// int scanf(const char *format, ...);
+static
GenericValue lle_X_scanf(FunctionType *FT,
const std::vector<GenericValue> &args) {
assert(args.size() < 10 && "Only handle up to 10 args to scanf right now!");
@@ -449,6 +456,7 @@
// int fprintf(FILE *, const char *, ...) - a very rough implementation to make
// output useful.
+static
GenericValue lle_X_fprintf(FunctionType *FT,
const std::vector<GenericValue> &Args) {
assert(Args.size() >= 2);
More information about the llvm-commits
mailing list