mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
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
This commit is contained in:
parent
97d933d122
commit
12fd371a27
@ -11,11 +11,11 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_OBJECT_COFFYAML_H
|
#ifndef LLVM_OBJECTYAML_COFFYAML_H
|
||||||
#define LLVM_OBJECT_COFFYAML_H
|
#define LLVM_OBJECTYAML_COFFYAML_H
|
||||||
|
|
||||||
#include "llvm/ADT/Optional.h"
|
#include "llvm/ADT/Optional.h"
|
||||||
#include "llvm/MC/YAML.h"
|
#include "llvm/ObjectYAML/YAML.h"
|
||||||
#include "llvm/Support/COFF.h"
|
#include "llvm/Support/COFF.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
@ -13,10 +13,10 @@
|
|||||||
///
|
///
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_OBJECT_ELFYAML_H
|
#ifndef LLVM_OBJECTYAML_ELFYAML_H
|
||||||
#define LLVM_OBJECT_ELFYAML_H
|
#define LLVM_OBJECTYAML_ELFYAML_H
|
||||||
|
|
||||||
#include "llvm/MC/YAML.h"
|
#include "llvm/ObjectYAML/YAML.h"
|
||||||
#include "llvm/Support/ELF.h"
|
#include "llvm/Support/ELF.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
@ -1,5 +1,14 @@
|
|||||||
#ifndef LLVM_MC_YAML_H
|
//===- YAML.h ---------------------------------------------------*- C++ -*-===//
|
||||||
#define LLVM_MC_YAML_H
|
//
|
||||||
|
// The LLVM Compiler Infrastructure
|
||||||
|
//
|
||||||
|
// This file is distributed under the University of Illinois Open Source
|
||||||
|
// License. See LICENSE.TXT for details.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#ifndef LLVM_OBJECTYAML_YAML_H
|
||||||
|
#define LLVM_OBJECTYAML_YAML_H
|
||||||
|
|
||||||
#include "llvm/Support/YAMLTraits.h"
|
#include "llvm/Support/YAMLTraits.h"
|
||||||
|
|
@ -10,6 +10,7 @@ add_subdirectory(Analysis)
|
|||||||
add_subdirectory(LTO)
|
add_subdirectory(LTO)
|
||||||
add_subdirectory(MC)
|
add_subdirectory(MC)
|
||||||
add_subdirectory(Object)
|
add_subdirectory(Object)
|
||||||
|
add_subdirectory(ObjectYAML)
|
||||||
add_subdirectory(Option)
|
add_subdirectory(Option)
|
||||||
add_subdirectory(DebugInfo)
|
add_subdirectory(DebugInfo)
|
||||||
add_subdirectory(ExecutionEngine)
|
add_subdirectory(ExecutionEngine)
|
||||||
|
@ -48,7 +48,6 @@ add_llvm_library(LLVMMC
|
|||||||
SubtargetFeature.cpp
|
SubtargetFeature.cpp
|
||||||
WinCOFFObjectWriter.cpp
|
WinCOFFObjectWriter.cpp
|
||||||
WinCOFFStreamer.cpp
|
WinCOFFStreamer.cpp
|
||||||
YAML.cpp
|
|
||||||
|
|
||||||
ADDITIONAL_HEADER_DIRS
|
ADDITIONAL_HEADER_DIRS
|
||||||
${LLVM_MAIN_INCLUDE_DIR}/llvm/MC
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/MC
|
||||||
|
@ -3,10 +3,8 @@ add_llvm_library(LLVMObject
|
|||||||
ArchiveWriter.cpp
|
ArchiveWriter.cpp
|
||||||
Binary.cpp
|
Binary.cpp
|
||||||
COFFObjectFile.cpp
|
COFFObjectFile.cpp
|
||||||
COFFYAML.cpp
|
|
||||||
ELF.cpp
|
ELF.cpp
|
||||||
ELFObjectFile.cpp
|
ELFObjectFile.cpp
|
||||||
ELFYAML.cpp
|
|
||||||
Error.cpp
|
Error.cpp
|
||||||
IRObjectFile.cpp
|
IRObjectFile.cpp
|
||||||
MachOObjectFile.cpp
|
MachOObjectFile.cpp
|
||||||
|
5
lib/ObjectYAML/CMakeLists.txt
Normal file
5
lib/ObjectYAML/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
add_llvm_library(LLVMObjectYAML
|
||||||
|
YAML.cpp
|
||||||
|
COFFYAML.cpp
|
||||||
|
ELFYAML.cpp
|
||||||
|
)
|
@ -11,7 +11,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Object/COFFYAML.h"
|
#include "llvm/ObjectYAML/COFFYAML.h"
|
||||||
|
|
||||||
#define ECase(X) IO.enumCase(Value, #X, COFF::X);
|
#define ECase(X) IO.enumCase(Value, #X, COFF::X);
|
||||||
namespace llvm {
|
namespace llvm {
|
@ -11,7 +11,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Object/ELFYAML.h"
|
#include "llvm/ObjectYAML/ELFYAML.h"
|
||||||
#include "llvm/Support/Casting.h"
|
#include "llvm/Support/Casting.h"
|
||||||
#include "llvm/Support/MipsABIFlags.h"
|
#include "llvm/Support/MipsABIFlags.h"
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/YAML.h"
|
#include "llvm/ObjectYAML/YAML.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
@ -1,5 +1,6 @@
|
|||||||
set(LLVM_LINK_COMPONENTS
|
set(LLVM_LINK_COMPONENTS
|
||||||
Object
|
Object
|
||||||
|
ObjectYAML
|
||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "obj2yaml.h"
|
#include "obj2yaml.h"
|
||||||
#include "llvm/Object/COFF.h"
|
#include "llvm/Object/COFF.h"
|
||||||
#include "llvm/Object/COFFYAML.h"
|
#include "llvm/ObjectYAML/COFFYAML.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/YAMLTraits.h"
|
#include "llvm/Support/YAMLTraits.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "obj2yaml.h"
|
#include "obj2yaml.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Object/ELFObjectFile.h"
|
#include "llvm/Object/ELFObjectFile.h"
|
||||||
#include "llvm/Object/ELFYAML.h"
|
#include "llvm/ObjectYAML/ELFYAML.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/YAMLTraits.h"
|
#include "llvm/Support/YAMLTraits.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
set(LLVM_LINK_COMPONENTS
|
set(LLVM_LINK_COMPONENTS
|
||||||
MC
|
MC
|
||||||
Object
|
Object
|
||||||
|
ObjectYAML
|
||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/ADT/StringSwitch.h"
|
#include "llvm/ADT/StringSwitch.h"
|
||||||
#include "llvm/Object/COFF.h"
|
#include "llvm/Object/COFF.h"
|
||||||
#include "llvm/Object/COFFYAML.h"
|
#include "llvm/ObjectYAML/COFFYAML.h"
|
||||||
#include "llvm/Support/Endian.h"
|
#include "llvm/Support/Endian.h"
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/SourceMgr.h"
|
#include "llvm/Support/SourceMgr.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "llvm/ADT/ArrayRef.h"
|
#include "llvm/ADT/ArrayRef.h"
|
||||||
#include "llvm/MC/StringTableBuilder.h"
|
#include "llvm/MC/StringTableBuilder.h"
|
||||||
#include "llvm/Object/ELFObjectFile.h"
|
#include "llvm/Object/ELFObjectFile.h"
|
||||||
#include "llvm/Object/ELFYAML.h"
|
#include "llvm/ObjectYAML/ELFYAML.h"
|
||||||
#include "llvm/Support/ELF.h"
|
#include "llvm/Support/ELF.h"
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/YAMLTraits.h"
|
#include "llvm/Support/YAMLTraits.h"
|
||||||
|
@ -23,6 +23,7 @@ add_subdirectory(LineEditor)
|
|||||||
add_subdirectory(Linker)
|
add_subdirectory(Linker)
|
||||||
add_subdirectory(MC)
|
add_subdirectory(MC)
|
||||||
add_subdirectory(MI)
|
add_subdirectory(MI)
|
||||||
|
add_subdirectory(ObjectYAML)
|
||||||
add_subdirectory(Option)
|
add_subdirectory(Option)
|
||||||
add_subdirectory(ProfileData)
|
add_subdirectory(ProfileData)
|
||||||
add_subdirectory(Support)
|
add_subdirectory(Support)
|
||||||
|
@ -10,5 +10,4 @@ add_llvm_unittest(MCTests
|
|||||||
DwarfLineTables.cpp
|
DwarfLineTables.cpp
|
||||||
StringTableBuilderTest.cpp
|
StringTableBuilderTest.cpp
|
||||||
TargetRegistry.cpp
|
TargetRegistry.cpp
|
||||||
YAMLTest.cpp
|
|
||||||
)
|
)
|
||||||
|
8
unittests/ObjectYAML/CMakeLists.txt
Normal file
8
unittests/ObjectYAML/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
set(LLVM_LINK_COMPONENTS
|
||||||
|
ObjectYAML
|
||||||
|
)
|
||||||
|
|
||||||
|
add_llvm_unittest(ObjectYAMLTests
|
||||||
|
YAMLTest.cpp
|
||||||
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
//===- llvm/unittest/Object/YAMLTest.cpp - Tests for Object YAML ----------===//
|
//===- YAMLTest.cpp - Tests for Object YAML -------------------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/MC/YAML.h"
|
#include "llvm/ObjectYAML/YAML.h"
|
||||||
#include "llvm/Support/YAMLTraits.h"
|
#include "llvm/Support/YAMLTraits.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user