summaryrefslogtreecommitdiff
path: root/examples/Fibonacci
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-05-25 01:18:36 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-05-25 01:18:36 +0000
commit578a1d21a0acbb778426cdc31a4d31b4f7d0e86a (patch)
treed97af55e6d10f7b9c88094f1e849ceaebaa36fb6 /examples/Fibonacci
parent20c7e3368601b619abbb49bd04c96bf10f287897 (diff)
downloadllvm-578a1d21a0acbb778426cdc31a4d31b4f7d0e86a.tar.gz
Fix some Include What You Use warnings in examples; other minor fixes.
Differential revision: http://reviews.llvm.org/D20607 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/Fibonacci')
-rw-r--r--examples/Fibonacci/fibonacci.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index ecb49eb92e1a..01f6d01fb192 100644
--- a/examples/Fibonacci/fibonacci.cpp
+++ b/examples/Fibonacci/fibonacci.cpp
@@ -23,16 +23,28 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/APInt.h"
#include "llvm/IR/Verifier.h"
+#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
-#include "llvm/ExecutionEngine/Interpreter.h"
+#include "llvm/IR/Argument.h"
+#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
+#include "llvm/IR/Type.h"
+#include "llvm/Support/Casting.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"
+#include <algorithm>
+#include <cstdlib>
+#include <memory>
+#include <string>
+#include <vector>
using namespace llvm;
@@ -77,7 +89,6 @@ static Function *CreateFibFunction(Module *M, LLVMContext &Context) {
CallInst *CallFibX2 = CallInst::Create(FibF, Sub, "fibx2", RecurseBB);
CallFibX2->setTailCall();
-
// fib(x-1)+fib(x-2)
Value *Sum = BinaryOperator::CreateAdd(CallFibX1, CallFibX2,
"addresult", RecurseBB);