diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 58b69754af0cbff56b1cfce9be9392e4451f6628 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /unittests/Transforms | |
parent | 0378662f5bd3dbe8305a485b0282bceb8b52f465 (diff) |
Diffstat (limited to 'unittests/Transforms')
-rw-r--r-- | unittests/Transforms/CMakeLists.txt | 1 | ||||
-rw-r--r-- | unittests/Transforms/Utils/CMakeLists.txt | 8 | ||||
-rw-r--r-- | unittests/Transforms/Utils/Cloning.cpp | 4 | ||||
-rw-r--r-- | unittests/Transforms/Utils/Local.cpp | 5 | ||||
-rw-r--r-- | unittests/Transforms/Utils/Makefile | 2 |
5 files changed, 16 insertions, 4 deletions
diff --git a/unittests/Transforms/CMakeLists.txt b/unittests/Transforms/CMakeLists.txt new file mode 100644 index 000000000000..e3ce185e0d5b --- /dev/null +++ b/unittests/Transforms/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Utils) diff --git a/unittests/Transforms/Utils/CMakeLists.txt b/unittests/Transforms/Utils/CMakeLists.txt new file mode 100644 index 000000000000..365bfbb0bf03 --- /dev/null +++ b/unittests/Transforms/Utils/CMakeLists.txt @@ -0,0 +1,8 @@ +set(LLVM_LINK_COMPONENTS + TransformUtils + ) + +add_llvm_unittest(UtilsTests + Cloning.cpp + Local.cpp + ) diff --git a/unittests/Transforms/Utils/Cloning.cpp b/unittests/Transforms/Utils/Cloning.cpp index 4243b2d39de7..ea3d5bee78b9 100644 --- a/unittests/Transforms/Utils/Cloning.cpp +++ b/unittests/Transforms/Utils/Cloning.cpp @@ -18,6 +18,7 @@ using namespace llvm; namespace { + class CloneInstruction : public ::testing::Test { protected: virtual void SetUp() { @@ -48,7 +49,6 @@ protected: LLVMContext context; Value *V; }; -} TEST_F(CloneInstruction, OverflowBits) { V = new Argument(Type::getInt32Ty(context)); @@ -142,3 +142,5 @@ TEST_F(CloneInstruction, Exact) { SDiv->setIsExact(true); EXPECT_TRUE(this->clone(SDiv)->isExact()); } + +} diff --git a/unittests/Transforms/Utils/Local.cpp b/unittests/Transforms/Utils/Local.cpp index 3026b4bc3488..727f5ea525d4 100644 --- a/unittests/Transforms/Utils/Local.cpp +++ b/unittests/Transforms/Utils/Local.cpp @@ -7,13 +7,14 @@ // //===----------------------------------------------------------------------===// -#include "gtest/gtest.h" #include "llvm/BasicBlock.h" +#include "llvm/IRBuilder.h" #include "llvm/Instructions.h" #include "llvm/LLVMContext.h" -#include "llvm/Support/IRBuilder.h" #include "llvm/Transforms/Utils/Local.h" +#include "gtest/gtest.h" + using namespace llvm; TEST(Local, RecursivelyDeleteDeadPHINodes) { diff --git a/unittests/Transforms/Utils/Makefile b/unittests/Transforms/Utils/Makefile index fdf4be0e0efe..e6c2a2c133aa 100644 --- a/unittests/Transforms/Utils/Makefile +++ b/unittests/Transforms/Utils/Makefile @@ -9,7 +9,7 @@ LEVEL = ../../.. TESTNAME = Utils -LINK_COMPONENTS := core support transformutils +LINK_COMPONENTS := TransformUtils include $(LEVEL)/Makefile.config include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest |