summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-01-02 09:19:48 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-01-02 09:19:48 +0000
commite517273e50b3c0d76a55f4eccb45499d1a0e9816 (patch)
treebb99b6347f26d23479c52fca4825f8fd6c66cc46 /llvm
parent5bacb7e9e5f63907fa92fe69b0826a527ee4ad8e (diff)
downloadbcm5719-llvm-e517273e50b3c0d76a55f4eccb45499d1a0e9816.tar.gz
bcm5719-llvm-e517273e50b3c0d76a55f4eccb45499d1a0e9816.zip
Undo the hack in r147427 and move this unittest to a better home. This
is testing the bitcode reader's functionality, not VMCore's. Add the what is a hope sufficient build system mojo to build and run a new unittest. Also clean up some of the test's naming. The goal for the file should be to unittest the Bitcode Reader, and this is just one particular test among potentially many in the future. Also, reverse my position and relegate the PR# to a comment, but stash the comment on the same line as the test name so it doesn't get lost. This makes the code more self-documenting hopefully w/o losing track of the PR number. llvm-svn: 147431
Diffstat (limited to 'llvm')
-rw-r--r--llvm/unittests/Bitcode/BitReaderTest.cpp (renamed from llvm/unittests/VMCore/pr11677.cpp)5
-rw-r--r--llvm/unittests/Bitcode/Makefile15
-rw-r--r--llvm/unittests/CMakeLists.txt5
-rw-r--r--llvm/unittests/Makefile2
-rw-r--r--llvm/unittests/VMCore/Makefile2
5 files changed, 24 insertions, 5 deletions
diff --git a/llvm/unittests/VMCore/pr11677.cpp b/llvm/unittests/Bitcode/BitReaderTest.cpp
index 362eec77630..91e6c151558 100644
--- a/llvm/unittests/VMCore/pr11677.cpp
+++ b/llvm/unittests/Bitcode/BitReaderTest.cpp
@@ -1,4 +1,4 @@
-//===- llvm/unittest/VMCore/pr11677.cpp - Test for blockaddr --------------===//
+//===- llvm/unittest/Bitcode/BitReaderTest.cpp - Tests for BitReader ------===//
//
// The LLVM Compiler Infrastructure
//
@@ -49,7 +49,7 @@ static void writeModuleToBuffer(std::vector<unsigned char> &Buffer) {
WriteBitcodeToStream(Mod, Stream);
}
-TEST(PR11677, BlockAddr) {
+TEST(BitReaderTest, MaterializeFunctionsForBlockAddr) { // PR11677
std::vector<unsigned char> Mem;
writeModuleToBuffer(Mem);
StringRef Data((const char*)&Mem[0], Mem.size());
@@ -60,5 +60,6 @@ TEST(PR11677, BlockAddr) {
passes.add(createVerifierPass());
passes.run(*m);
}
+
}
}
diff --git a/llvm/unittests/Bitcode/Makefile b/llvm/unittests/Bitcode/Makefile
new file mode 100644
index 00000000000..aa437e7e2cc
--- /dev/null
+++ b/llvm/unittests/Bitcode/Makefile
@@ -0,0 +1,15 @@
+##===- unittests/Bitcode/Makefile --------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+TESTNAME = Bitcode
+LINK_COMPONENTS := core support bitreader bitwriter
+
+include $(LEVEL)/Makefile.config
+include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index 3cd7f2f051d..6724f2df83f 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -112,7 +112,6 @@ set(VMCoreSources
VMCore/PassManagerTest.cpp
VMCore/ValueMapTest.cpp
VMCore/VerifierTest.cpp
- VMCore/pr11677.cpp
)
# MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
@@ -123,6 +122,10 @@ endif()
add_llvm_unittest(VMCore ${VMCoreSources})
+add_llvm_unittest(Bitcode
+ Bitcode/BitReaderTest.cpp
+ )
+
set(LLVM_LINK_COMPONENTS
Support
Core
diff --git a/llvm/unittests/Makefile b/llvm/unittests/Makefile
index 0401cd1c673..27afccf02e3 100644
--- a/llvm/unittests/Makefile
+++ b/llvm/unittests/Makefile
@@ -9,7 +9,7 @@
LEVEL = ..
-PARALLEL_DIRS = ADT ExecutionEngine Support Transforms VMCore Analysis
+PARALLEL_DIRS = ADT ExecutionEngine Support Transforms VMCore Analysis Bitcode
include $(LEVEL)/Makefile.common
diff --git a/llvm/unittests/VMCore/Makefile b/llvm/unittests/VMCore/Makefile
index c6babe742cd..1b2b69c6d60 100644
--- a/llvm/unittests/VMCore/Makefile
+++ b/llvm/unittests/VMCore/Makefile
@@ -9,7 +9,7 @@
LEVEL = ../..
TESTNAME = VMCore
-LINK_COMPONENTS := core support bitreader bitwriter target ipa
+LINK_COMPONENTS := core support target ipa
include $(LEVEL)/Makefile.config
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
OpenPOWER on IntegriCloud