summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-03-01 19:15:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-03-01 19:15:06 +0000
commitebd9193b57750faabaeed0f28acc23fb38d1d06b (patch)
treec062fc745b317b2eab4a37aa543ea4ac0c5dc649 /llvm/unittests/MC
parent8a37a988e6644403dc6f0c297d2d653fed3ebdc3 (diff)
downloadbcm5719-llvm-ebd9193b57750faabaeed0f28acc23fb38d1d06b.tar.gz
bcm5719-llvm-ebd9193b57750faabaeed0f28acc23fb38d1d06b.zip
Move ObjectYAML code to a new library.
It is only ever used by obj2yaml and yaml2obj. No point in linking it everywhere. llvm-svn: 262368
Diffstat (limited to 'llvm/unittests/MC')
-rw-r--r--llvm/unittests/MC/CMakeLists.txt1
-rw-r--r--llvm/unittests/MC/YAMLTest.cpp38
2 files changed, 0 insertions, 39 deletions
diff --git a/llvm/unittests/MC/CMakeLists.txt b/llvm/unittests/MC/CMakeLists.txt
index 7c39f439823..c760c0267a9 100644
--- a/llvm/unittests/MC/CMakeLists.txt
+++ b/llvm/unittests/MC/CMakeLists.txt
@@ -10,5 +10,4 @@ add_llvm_unittest(MCTests
DwarfLineTables.cpp
StringTableBuilderTest.cpp
TargetRegistry.cpp
- YAMLTest.cpp
)
diff --git a/llvm/unittests/MC/YAMLTest.cpp b/llvm/unittests/MC/YAMLTest.cpp
deleted file mode 100644
index 09709ad73fc..00000000000
--- a/llvm/unittests/MC/YAMLTest.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//===- llvm/unittest/Object/YAMLTest.cpp - Tests for Object YAML ----------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/MC/YAML.h"
-#include "llvm/Support/YAMLTraits.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-
-struct BinaryHolder {
- yaml::BinaryRef Binary;
-};
-
-namespace llvm {
-namespace yaml {
-template <>
-struct MappingTraits<BinaryHolder> {
- static void mapping(IO &IO, BinaryHolder &BH) {
- IO.mapRequired("Binary", BH.Binary);
- }
-};
-} // end namespace yaml
-} // end namespace llvm
-
-TEST(ObjectYAML, BinaryRef) {
- BinaryHolder BH;
- SmallVector<char, 32> Buf;
- llvm::raw_svector_ostream OS(Buf);
- yaml::Output YOut(OS);
- YOut << BH;
- EXPECT_NE(OS.str().find("''"), StringRef::npos);
-}
OpenPOWER on IntegriCloud