diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /unittests/Transforms | |
parent | 2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff) | |
download | FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz |
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
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 0000000..e3ce185 --- /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 0000000..365bfbb --- /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 4243b2d..ea3d5be 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 3026b4b..727f5ea 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 fdf4be0..e6c2a2c 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 |