aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/Transforms/Utils
diff options
context:
space:
mode:
authorShih-wei Liao <sliao@google.com>2012-08-03 00:11:18 -0700
committerShih-wei Liao <sliao@google.com>2012-08-03 00:11:18 -0700
commit7744acd1ab73b3eec6f1449f47083abe3fb1b527 (patch)
tree17ef28b6d1034fdea7f42a19bebe7ad834901d62 /unittests/Transforms/Utils
parent4a05ed708aed4c7a099d924ed3feb604d3e44074 (diff)
parenta94d6e87c4c49f2e81b01d66d8bfb591277f8f96 (diff)
downloadexternal_llvm-7744acd1ab73b3eec6f1449f47083abe3fb1b527.zip
external_llvm-7744acd1ab73b3eec6f1449f47083abe3fb1b527.tar.gz
external_llvm-7744acd1ab73b3eec6f1449f47083abe3fb1b527.tar.bz2
Merge with LLVM upstream r160668 (Jul 24th 2012)
Conflicts: include/llvm/Support/ELF.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Support/Memory.cpp lib/Transforms/Instrumentation/AddressSanitizer.cpp Change-Id: Iddd658cf2eadc7165b2805b446d31af2c5c9917f
Diffstat (limited to 'unittests/Transforms/Utils')
-rw-r--r--unittests/Transforms/Utils/CMakeLists.txt8
-rw-r--r--unittests/Transforms/Utils/Cloning.cpp4
-rw-r--r--unittests/Transforms/Utils/Local.cpp5
-rw-r--r--unittests/Transforms/Utils/Makefile2
4 files changed, 15 insertions, 4 deletions
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