[TextAPI] move source code files out of subdirectory, NFC

TextAPI/ELF has moved out into InterfaceStubs, so theres no longer a
need to seperate out TextAPI between formats.

Reviewed By: ributzka, int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D99811
This commit is contained in:
Cyndy Ishida 2021-04-05 09:59:50 -07:00
parent 5abc725012
commit 0116d04d04
40 changed files with 89 additions and 91 deletions

View File

@ -3854,7 +3854,7 @@ tree in terms of conformance to :doc:`ClangFormat` as of: December 04, 2020 17:5
- `2`
- `1`
- :part:`66%`
* - llvm/include/llvm/TextAPI/MachO
* - llvm/include/llvm/TextAPI
- `9`
- `8`
- `1`
@ -4749,7 +4749,7 @@ tree in terms of conformance to :doc:`ClangFormat` as of: December 04, 2020 17:5
- `3`
- `0`
- :good:`100%`
* - llvm/lib/TextAPI/MachO
* - llvm/lib/TextAPI
- `11`
- `8`
- `3`

View File

@ -16,9 +16,9 @@
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/GlobPattern.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/Platform.h"
#include "llvm/TextAPI/MachO/Target.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/Platform.h"
#include "llvm/TextAPI/Target.h"
#include <vector>

View File

@ -43,7 +43,7 @@
#include "llvm/Support/TarWriter.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/TextAPI/MachO/PackedVersion.h"
#include "llvm/TextAPI/PackedVersion.h"
#include <algorithm>

View File

@ -26,8 +26,8 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
using namespace llvm;
using namespace llvm::MachO;

View File

@ -66,8 +66,8 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TarWriter.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/InterfaceFile.h"
using namespace llvm;
using namespace llvm::MachO;

View File

@ -19,7 +19,7 @@
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Object/Archive.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include <map>
#include <vector>

View File

@ -17,8 +17,8 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Format.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include <unordered_map>
namespace lld {

View File

@ -18,7 +18,7 @@
#include "llvm/Object/SymbolicFile.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/InterfaceFile.h"
namespace llvm {
namespace object {

View File

@ -17,8 +17,8 @@
#include "llvm/Object/TapiFile.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/InterfaceFile.h"
namespace llvm {
namespace object {

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/Architecture.def - Architecture -----------------===//
//===- llvm/TextAPI/Architecture.def - Architecture -----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/Architecture.h - Architecture ---------*- C++ -*-===//
//===- llvm/TextAPI/Architecture.h - Architecture ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@ -26,7 +26,7 @@ namespace MachO {
/// Defines the architecture slices that are supported by Text-based Stub files.
enum Architecture : uint8_t {
#define ARCHINFO(Arch, Type, SubType, NumBits) AK_##Arch,
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
AK_unknown, // this has to go last.
};

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/ArchitectureSet.h - ArchitectureSet ---*- C++ -*-===//
//===- llvm/TextAPI/ArchitectureSet.h - ArchitectureSet ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@ -13,7 +13,7 @@
#ifndef LLVM_TEXTAPI_MACHO_ARCHITECTURESET_H
#define LLVM_TEXTAPI_MACHO_ARCHITECTURESET_H
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/Architecture.h"
#include <cstddef>
#include <iterator>
#include <limits>

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/IntefaceFile.h - TAPI Interface File --*- C++ -*-===//
//===- llvm/TextAPI/InterfaceFile.h - TAPI Interface File -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@ -23,12 +23,12 @@
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Error.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/MachO/PackedVersion.h"
#include "llvm/TextAPI/MachO/Platform.h"
#include "llvm/TextAPI/MachO/Symbol.h"
#include "llvm/TextAPI/MachO/Target.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/TextAPI/PackedVersion.h"
#include "llvm/TextAPI/Platform.h"
#include "llvm/TextAPI/Symbol.h"
#include "llvm/TextAPI/Target.h"
namespace llvm {
namespace MachO {

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/PackedVersion.h - PackedVersion -------*- C++ -*-===//
//===- llvm/TextAPI/PackedVersion.h - PackedVersion -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/Platform.h - Platform -----------------*- C++ -*-===//
//===- llvm/TextAPI/Platform.h - Platform -----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.

View File

@ -13,8 +13,8 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/MachO/Target.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/TextAPI/Target.h"
namespace llvm {
namespace MachO {

View File

@ -11,9 +11,9 @@
#include "llvm/ADT/Triple.h"
#include "llvm/Support/Error.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/MachO/Platform.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/TextAPI/Platform.h"
namespace llvm {
namespace MachO {

View File

@ -14,7 +14,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIReader.h"
using namespace llvm;
using namespace MachO;

View File

@ -10,12 +10,12 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/ArchitectureSet.h"
namespace llvm {
namespace MachO {
@ -25,7 +25,7 @@ Architecture getArchitectureFromCpuType(uint32_t CPUType, uint32_t CPUSubType) {
if (CPUType == (Type) && \
(CPUSubType & ~MachO::CPU_SUBTYPE_MASK) == (Subtype)) \
return AK_##Arch;
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
return AK_unknown;
@ -34,7 +34,7 @@ Architecture getArchitectureFromCpuType(uint32_t CPUType, uint32_t CPUSubType) {
Architecture getArchitectureFromName(StringRef Name) {
return StringSwitch<Architecture>(Name)
#define ARCHINFO(Arch, Type, Subtype, NumBits) .Case(#Arch, AK_##Arch)
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
.Default(AK_unknown);
}
@ -44,7 +44,7 @@ StringRef getArchitectureName(Architecture Arch) {
#define ARCHINFO(Arch, Type, Subtype, NumBits) \
case AK_##Arch: \
return #Arch;
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
case AK_unknown:
return "unknown";
@ -60,7 +60,7 @@ std::pair<uint32_t, uint32_t> getCPUTypeFromArchitecture(Architecture Arch) {
#define ARCHINFO(Arch, Type, Subtype, NumBits) \
case AK_##Arch: \
return std::make_pair(Type, Subtype);
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
case AK_unknown:
return std::make_pair(0, 0);
@ -80,7 +80,7 @@ bool is64Bit(Architecture Arch) {
#define ARCHINFO(Arch, Type, Subtype, NumBits) \
case AK_##Arch: \
return NumBits == 64;
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
case AK_unknown:
return false;

View File

@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {

View File

@ -1,18 +1,16 @@
add_llvm_component_library(LLVMTextAPI
MachO/Architecture.cpp
MachO/ArchitectureSet.cpp
MachO/InterfaceFile.cpp
MachO/PackedVersion.cpp
MachO/Platform.cpp
MachO/Symbol.cpp
MachO/Target.cpp
MachO/TextStub.cpp
MachO/TextStubCommon.cpp
Architecture.cpp
ArchitectureSet.cpp
InterfaceFile.cpp
PackedVersion.cpp
Platform.cpp
Symbol.cpp
Target.cpp
TextStub.cpp
TextStubCommon.cpp
ADDITIONAL_HEADER_DIRS
"${LLVM_MAIN_INCLUDE_DIR}/llvm/TextAPI"
"${LLVM_MAIN_INCLUDE_DIR}/llvm/TextAPI/Elf"
"${LLVM_MAIN_INCLUDE_DIR}/llvm/TextAPI/MachO"
LINK_COMPONENTS
Support

View File

@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include <iomanip>
#include <sstream>

View File

@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/MachO/PackedVersion.h"
#include "llvm/TextAPI/PackedVersion.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"

View File

@ -1,4 +1,4 @@
//===- llvm/TextAPI/MachO/Platform.cpp - Platform ---------------*- C++ -*-===//
//===- llvm/TextAPI/Platform.cpp - Platform ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@ -10,9 +10,9 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/Platform.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/TextAPI/MachO/Platform.h"
namespace llvm {
namespace MachO {

View File

@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/MachO/Symbol.h"
#include "llvm/TextAPI/Symbol.h"
#include <string>
namespace llvm {

View File

@ -1,4 +1,4 @@
//===- tapi/Core/Target.cpp - Target ----------------------------*- C++ -*-===//
//===- Target.cpp -----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/TextAPI/Target.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/MachO/Target.h"
namespace llvm {
namespace MachO {

View File

@ -19,12 +19,12 @@
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/PackedVersion.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/PackedVersion.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include <algorithm>
#include <set>

View File

@ -134,7 +134,7 @@ void ScalarBitSetTraits<ArchitectureSet>::bitset(IO &IO,
ArchitectureSet &Archs) {
#define ARCHINFO(arch, type, subtype, numbits) \
IO.bitSetCase(Archs, #arch, 1U << static_cast<int>(AK_##arch));
#include "llvm/TextAPI/MachO/Architecture.def"
#include "llvm/TextAPI/Architecture.def"
#undef ARCHINFO
}

View File

@ -15,10 +15,10 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/MachO/ArchitectureSet.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/PackedVersion.h"
#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/ArchitectureSet.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/PackedVersion.h"
using UUID = std::pair<llvm::MachO::Target, std::string>;

View File

@ -22,9 +22,9 @@
#include "llvm/Support/WithColor.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include <set>
#include <string>
#include <vector>

View File

@ -22,7 +22,7 @@
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/WithColor.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/Architecture.h"
#include <map>
using namespace llvm;

View File

@ -28,7 +28,7 @@
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/WithColor.h"
#include "llvm/TextAPI/MachO/Architecture.h"
#include "llvm/TextAPI/Architecture.h"
using namespace llvm;
using namespace llvm::object;

View File

@ -7,7 +7,7 @@
//===-----------------------------------------------------------------------===/
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include <algorithm>
#include <string>

View File

@ -7,9 +7,9 @@
//===-----------------------------------------------------------------------===/
#include "TextStubHelpers.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>

View File

@ -6,9 +6,9 @@
//
//===-----------------------------------------------------------------------===/
#include "TextStubHelpers.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>

View File

@ -6,9 +6,9 @@
//
//===-----------------------------------------------------------------------===/
#include "TextStubHelpers.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>

View File

@ -7,9 +7,9 @@
//===-----------------------------------------------------------------------===/
#include "TextStubHelpers.h"
#include "llvm/TextAPI/MachO/InterfaceFile.h"
#include "llvm/TextAPI/MachO/TextAPIReader.h"
#include "llvm/TextAPI/MachO/TextAPIWriter.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>