summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
committerpatrick <patrick@openbsd.org>2017-01-24 08:32:59 +0000
commit53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch)
tree7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
parentIn preparation of compiling our kernels with -ffreestanding, explicitly map (diff)
downloadwireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz
wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r--gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 441f0eb8572..ee75bee9c53 100644
--- a/gnu/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/gnu/llvm/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