From 33d7b762d009f52000984804bbbe01ab02b30f66 Mon Sep 17 00:00:00 2001 From: Eugene Zelenko Date: Tue, 23 Aug 2016 17:14:32 +0000 Subject: Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D23789 llvm-svn: 279535 --- .../ExecutionEngine/Interpreter/ExternalFunctions.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'llvm/lib/ExecutionEngine/Interpreter') diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 441f0eb8572..ee75bee9c53 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/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 #include #include +#include #include #include #include +#include +#include +#include #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 -- cgit v1.2.3