summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/CMakeLists.txt2
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp2
-rw-r--r--llvm/lib/MC/LLVMBuild.txt2
-rw-r--r--llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp4
-rw-r--r--llvm/lib/MC/StringTableBuilder.cpp (renamed from llvm/lib/Object/StringTableBuilder.cpp)2
-rw-r--r--llvm/lib/MC/YAML.cpp (renamed from llvm/lib/Object/YAML.cpp)17
-rw-r--r--llvm/lib/Object/CMakeLists.txt2
-rw-r--r--llvm/lib/Object/LLVMBuild.txt2
8 files changed, 16 insertions, 17 deletions
diff --git a/llvm/lib/MC/CMakeLists.txt b/llvm/lib/MC/CMakeLists.txt
index f62894cab39..330519ece00 100644
--- a/llvm/lib/MC/CMakeLists.txt
+++ b/llvm/lib/MC/CMakeLists.txt
@@ -43,9 +43,11 @@ add_llvm_library(LLVMMC
MCValue.cpp
MCWin64EH.cpp
MachObjectWriter.cpp
+ StringTableBuilder.cpp
SubtargetFeature.cpp
WinCOFFObjectWriter.cpp
WinCOFFStreamer.cpp
+ YAML.cpp
)
add_subdirectory(MCAnalysis)
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 87f6ec0f3d1..ead05351458 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -28,7 +28,7 @@
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCValue.h"
-#include "llvm/Object/StringTableBuilder.h"
+#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Endian.h"
diff --git a/llvm/lib/MC/LLVMBuild.txt b/llvm/lib/MC/LLVMBuild.txt
index da9995d6c57..3fcb50b97c6 100644
--- a/llvm/lib/MC/LLVMBuild.txt
+++ b/llvm/lib/MC/LLVMBuild.txt
@@ -22,4 +22,4 @@ subdirectories = MCAnalysis MCDisassembler MCParser
type = Library
name = MC
parent = Libraries
-required_libraries = Object Support
+required_libraries = Support
diff --git a/llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp b/llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp
index c51c62e928d..876b06de9c9 100644
--- a/llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp
+++ b/llvm/lib/MC/MCAnalysis/MCModuleYAML.cpp
@@ -17,7 +17,7 @@
#include "llvm/MC/MCAnalysis/MCFunction.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
-#include "llvm/Object/YAML.h"
+#include "llvm/MC/YAML.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/MathExtras.h"
@@ -102,7 +102,7 @@ struct Atom {
uint64_t Size;
std::vector<Inst> Insts;
- object::yaml::BinaryRef Data;
+ yaml::BinaryRef Data;
};
struct BasicBlock {
diff --git a/llvm/lib/Object/StringTableBuilder.cpp b/llvm/lib/MC/StringTableBuilder.cpp
index 9152834a296..db58ece5c86 100644
--- a/llvm/lib/Object/StringTableBuilder.cpp
+++ b/llvm/lib/MC/StringTableBuilder.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/MC/StringTableBuilder.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/Object/StringTableBuilder.h"
using namespace llvm;
diff --git a/llvm/lib/Object/YAML.cpp b/llvm/lib/MC/YAML.cpp
index 61e9da30395..067e91a26d3 100644
--- a/llvm/lib/Object/YAML.cpp
+++ b/llvm/lib/MC/YAML.cpp
@@ -12,21 +12,20 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Object/YAML.h"
+#include "llvm/MC/YAML.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cctype>
using namespace llvm;
-using namespace object::yaml;
-void yaml::ScalarTraits<object::yaml::BinaryRef>::output(
- const object::yaml::BinaryRef &Val, void *, llvm::raw_ostream &Out) {
+void yaml::ScalarTraits<yaml::BinaryRef>::output(
+ const yaml::BinaryRef &Val, void *, llvm::raw_ostream &Out) {
Val.writeAsHex(Out);
}
-StringRef yaml::ScalarTraits<object::yaml::BinaryRef>::input(
- StringRef Scalar, void *, object::yaml::BinaryRef &Val) {
+StringRef yaml::ScalarTraits<yaml::BinaryRef>::input(StringRef Scalar, void *,
+ yaml::BinaryRef &Val) {
if (Scalar.size() % 2 != 0)
return "BinaryRef hex string must contain an even number of nybbles.";
// TODO: Can we improve YAMLIO to permit a more accurate diagnostic here?
@@ -34,11 +33,11 @@ StringRef yaml::ScalarTraits<object::yaml::BinaryRef>::input(
for (unsigned I = 0, N = Scalar.size(); I != N; ++I)
if (!isxdigit(Scalar[I]))
return "BinaryRef hex string must contain only hex digits.";
- Val = object::yaml::BinaryRef(Scalar);
+ Val = yaml::BinaryRef(Scalar);
return StringRef();
}
-void BinaryRef::writeAsBinary(raw_ostream &OS) const {
+void yaml::BinaryRef::writeAsBinary(raw_ostream &OS) const {
if (!DataIsHexString) {
OS.write((const char *)Data.data(), Data.size());
return;
@@ -50,7 +49,7 @@ void BinaryRef::writeAsBinary(raw_ostream &OS) const {
}
}
-void BinaryRef::writeAsHex(raw_ostream &OS) const {
+void yaml::BinaryRef::writeAsHex(raw_ostream &OS) const {
if (binary_size() == 0)
return;
if (DataIsHexString) {
diff --git a/llvm/lib/Object/CMakeLists.txt b/llvm/lib/Object/CMakeLists.txt
index cd8c9efe7b0..00bf1e30c21 100644
--- a/llvm/lib/Object/CMakeLists.txt
+++ b/llvm/lib/Object/CMakeLists.txt
@@ -12,7 +12,5 @@ add_llvm_library(LLVMObject
MachOUniversal.cpp
Object.cpp
ObjectFile.cpp
- StringTableBuilder.cpp
SymbolicFile.cpp
- YAML.cpp
)
diff --git a/llvm/lib/Object/LLVMBuild.txt b/llvm/lib/Object/LLVMBuild.txt
index 7813832ef7e..d64ac8722f5 100644
--- a/llvm/lib/Object/LLVMBuild.txt
+++ b/llvm/lib/Object/LLVMBuild.txt
@@ -19,4 +19,4 @@
type = Library
name = Object
parent = Libraries
-required_libraries = BitReader Core Support
+required_libraries = BitReader Core Support MC
OpenPOWER on IntegriCloud