summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 441f0eb8572..ee75bee9c53 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -20,20 +20,31 @@
//===----------------------------------------------------------------------===//
#include "Interpreter.h"
+#include "llvm/ADT/APInt.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/Config/config.h" // Detect libffi
+#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/Module.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Type.h"
+#include "llvm/Support/Casting.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/UniqueLock.h"
+#include <cassert>
#include <cmath>
#include <csignal>
+#include <cstdint>
#include <cstdio>
#include <cstring>
#include <map>
+#include <string>
+#include <utility>
+#include <vector>
#ifdef HAVE_FFI_CALL
#ifdef HAVE_FFI_H
@@ -290,7 +301,6 @@ GenericValue Interpreter::callExternalFunction(Function *F,
return GenericValue();
}
-
//===----------------------------------------------------------------------===//
// Functions "exported" to the running application...
//
@@ -331,7 +341,7 @@ static GenericValue lle_X_sprintf(FunctionType *FT,
// close enough for now.
GenericValue GV;
GV.IntVal = APInt(32, strlen(FmtStr));
- while (1) {
+ while (true) {
switch (*FmtStr) {
case 0: return GV; // Null terminator...
default: // Normal nonspecial character