diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 19:56:01 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-01-14 19:56:01 +0000 |
commit | 3b45b734b3f813151c402b84401eec3d5e3c2181 (patch) | |
tree | 6b62b64ec355266e109fb4bab6dbd7b739d5bdd3 /gnu/llvm/unittests | |
parent | 902f045b08ff3b7a3c5d9206afe173289e6ea823 (diff) |
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/unittests')
-rw-r--r-- | gnu/llvm/unittests/Analysis/UnrollAnalyzer.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gnu/llvm/unittests/Analysis/UnrollAnalyzer.cpp b/gnu/llvm/unittests/Analysis/UnrollAnalyzer.cpp index 937e69f0c25..6d11ab1f2f1 100644 --- a/gnu/llvm/unittests/Analysis/UnrollAnalyzer.cpp +++ b/gnu/llvm/unittests/Analysis/UnrollAnalyzer.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/LoopUnrollAnalyzer.h" #include "llvm/AsmParser/Parser.h" -#include "llvm/IR/Dominators.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/Support/SourceMgr.h" +#include "llvm/Analysis/LoopUnrollAnalyzer.h" +#include "llvm/IR/Dominators.h" #include "gtest/gtest.h" using namespace llvm; @@ -61,6 +61,7 @@ struct UnrollAnalyzerTest : public FunctionPass { char UnrollAnalyzerTest::ID = 0; std::unique_ptr<Module> makeLLVMModule(LLVMContext &Context, + UnrollAnalyzerTest *P, const char *ModuleStr) { SMDiagnostic Err; return parseAssemblyString(ModuleStr, Err, Context); @@ -86,7 +87,7 @@ TEST(UnrollAnalyzerTest, BasicSimplifications) { "}\n"; UnrollAnalyzerTest *P = new UnrollAnalyzerTest(); LLVMContext Context; - std::unique_ptr<Module> M = makeLLVMModule(Context, ModuleStr); + std::unique_ptr<Module> M = makeLLVMModule(Context, P, ModuleStr); legacy::PassManager Passes; Passes.add(P); Passes.run(*M); @@ -149,7 +150,7 @@ TEST(UnrollAnalyzerTest, OuterLoopSimplification) { UnrollAnalyzerTest *P = new UnrollAnalyzerTest(); LLVMContext Context; - std::unique_ptr<Module> M = makeLLVMModule(Context, ModuleStr); + std::unique_ptr<Module> M = makeLLVMModule(Context, P, ModuleStr); legacy::PassManager Passes; Passes.add(P); Passes.run(*M); @@ -194,7 +195,7 @@ TEST(UnrollAnalyzerTest, CmpSimplifications) { "}\n"; UnrollAnalyzerTest *P = new UnrollAnalyzerTest(); LLVMContext Context; - std::unique_ptr<Module> M = makeLLVMModule(Context, ModuleStr); + std::unique_ptr<Module> M = makeLLVMModule(Context, P, ModuleStr); legacy::PassManager Passes; Passes.add(P); Passes.run(*M); @@ -241,7 +242,7 @@ TEST(UnrollAnalyzerTest, PtrCmpSimplifications) { "}\n"; UnrollAnalyzerTest *P = new UnrollAnalyzerTest(); LLVMContext Context; - std::unique_ptr<Module> M = makeLLVMModule(Context, ModuleStr); + std::unique_ptr<Module> M = makeLLVMModule(Context, P, ModuleStr); legacy::PassManager Passes; Passes.add(P); Passes.run(*M); @@ -287,7 +288,7 @@ TEST(UnrollAnalyzerTest, CastSimplifications) { UnrollAnalyzerTest *P = new UnrollAnalyzerTest(); LLVMContext Context; - std::unique_ptr<Module> M = makeLLVMModule(Context, ModuleStr); + std::unique_ptr<Module> M = makeLLVMModule(Context, P, ModuleStr); legacy::PassManager Passes; Passes.add(P); Passes.run(*M); |