summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/MC
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2014-09-02 22:32:20 +0000
committerSean Silva <chisophugis@gmail.com>2014-09-02 22:32:20 +0000
commit888320e9fa5eb33194c066f68d50f1e73c5fff5e (patch)
treeb8f80b8ddec0931f35da1db7f83ea4aaf6889e77 /llvm/unittests/MC
parent79cc1e3ae7bc224fa948495ba2f1c02f4c0c84ea (diff)
downloadbcm5719-llvm-888320e9fa5eb33194c066f68d50f1e73c5fff5e.tar.gz
bcm5719-llvm-888320e9fa5eb33194c066f68d50f1e73c5fff5e.zip
Nuke MCAnalysis.
The code is buggy and barely tested. It is also mostly boilerplate. (This includes MCObjectDisassembler, which is the interface to that functionality) Following an IRC discussion with Jim Grosbach, it seems sensible to just nuke the whole lot of functionality, and dig it up from VCS if necessary (I hope not!). All of this stuff appears to have been added in a huge patch dump (look at the timeframe surrounding e.g. r182628) where almost every patch seemed to be untested and not reviewed before being committed. Post-review responses to the patches were never addressed. I don't think any of it would have passed pre-commit review. I doubt anyone is depending on this, since this code appears to be extremely buggy. In limited testing that Michael Spencer and I did, we couldn't find a single real-world object file that wouldn't crash the CFG reconstruction stuff. The symbolizer stuff has O(n^2) behavior and so is not much use to anyone anyway. It seemed simpler to remove them as a whole. Most of this code is boilerplate, which is the only way it was able to scrape by 60% coverage. HEADSUP: Modules folks, some files I nuked were referenced from include/llvm/module.modulemap; I just deleted the references. Hopefully that is the right fix (one was a FIXME though!). llvm-svn: 216983
Diffstat (limited to 'llvm/unittests/MC')
-rw-r--r--llvm/unittests/MC/CMakeLists.txt2
-rw-r--r--llvm/unittests/MC/MCAtomTest.cpp31
-rw-r--r--llvm/unittests/MC/Makefile2
3 files changed, 1 insertions, 34 deletions
diff --git a/llvm/unittests/MC/CMakeLists.txt b/llvm/unittests/MC/CMakeLists.txt
index 37543f48bce..271309c0859 100644
--- a/llvm/unittests/MC/CMakeLists.txt
+++ b/llvm/unittests/MC/CMakeLists.txt
@@ -1,11 +1,9 @@
set(LLVM_LINK_COMPONENTS
MC
- MCAnalysis
Support
)
add_llvm_unittest(MCTests
- MCAtomTest.cpp
StringTableBuilderTest.cpp
YAMLTest.cpp
)
diff --git a/llvm/unittests/MC/MCAtomTest.cpp b/llvm/unittests/MC/MCAtomTest.cpp
deleted file mode 100644
index 16228b521f4..00000000000
--- a/llvm/unittests/MC/MCAtomTest.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//===- llvm/unittest/MC/MCAtomTest.cpp - Instructions unit tests ----------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/MC/MCAnalysis/MCAtom.h"
-#include "llvm/MC/MCAnalysis/MCModule.h"
-#include "gtest/gtest.h"
-
-namespace llvm {
-namespace {
-
-TEST(MCAtomTest, MCDataSize) {
- MCModule M;
- MCDataAtom *Atom = M.createDataAtom(0, 0);
- EXPECT_EQ(uint64_t(0), Atom->getEndAddr());
- Atom->addData(0);
- EXPECT_EQ(uint64_t(0), Atom->getEndAddr());
- Atom->addData(1);
- EXPECT_EQ(uint64_t(1), Atom->getEndAddr());
- Atom->addData(2);
- EXPECT_EQ(uint64_t(2), Atom->getEndAddr());
- EXPECT_EQ(size_t(3), Atom->getData().size());
-}
-
-} // end anonymous namespace
-} // end namespace llvm
diff --git a/llvm/unittests/MC/Makefile b/llvm/unittests/MC/Makefile
index 07a608e65a3..775116dc4f6 100644
--- a/llvm/unittests/MC/Makefile
+++ b/llvm/unittests/MC/Makefile
@@ -9,7 +9,7 @@
LEVEL = ../..
TESTNAME = MC
-LINK_COMPONENTS := MCAnalysis
+LINK_COMPONENTS := Object
include $(LEVEL)/Makefile.config
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
OpenPOWER on IntegriCloud