From b48ba4e6bc33028d7c2167d9fd4bf5c9fb8a83c9 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 23 Mar 2018 23:58:27 +0000 Subject: [PATCH] Fix layering of CodeGen/TargetOpcodes.def by moving it to Support It's also used by utils/TableGen so needs to reside somewhere common to TableGen and CodeGen. llvm-svn: 328396 --- llvm/include/llvm/CodeGen/TargetOpcodes.h | 2 +- llvm/include/llvm/{CodeGen => Support}/TargetOpcodes.def | 2 +- llvm/include/llvm/module.modulemap | 2 +- llvm/utils/TableGen/CodeGenTarget.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename llvm/include/llvm/{CodeGen => Support}/TargetOpcodes.def (99%) diff --git a/llvm/include/llvm/CodeGen/TargetOpcodes.h b/llvm/include/llvm/CodeGen/TargetOpcodes.h index 3ca31a970944..d0d959c4ae11 100644 --- a/llvm/include/llvm/CodeGen/TargetOpcodes.h +++ b/llvm/include/llvm/CodeGen/TargetOpcodes.h @@ -22,7 +22,7 @@ namespace TargetOpcode { enum { #define HANDLE_TARGET_OPCODE(OPC) OPC, #define HANDLE_TARGET_OPCODE_MARKER(IDENT, OPC) IDENT = OPC, -#include "llvm/CodeGen/TargetOpcodes.def" +#include "llvm/Support/TargetOpcodes.def" }; } // end namespace TargetOpcode diff --git a/llvm/include/llvm/CodeGen/TargetOpcodes.def b/llvm/include/llvm/Support/TargetOpcodes.def similarity index 99% rename from llvm/include/llvm/CodeGen/TargetOpcodes.def rename to llvm/include/llvm/Support/TargetOpcodes.def index 00bfbee8e33d..0614a0032523 100644 --- a/llvm/include/llvm/CodeGen/TargetOpcodes.def +++ b/llvm/include/llvm/Support/TargetOpcodes.def @@ -1,4 +1,4 @@ -//===-- llvm/CodeGen/TargetOpcodes.def - Target Indep Opcodes ---*- C++ -*-===// +//===-- llvm/Support/TargetOpcodes.def - Target Indep Opcodes ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // diff --git a/llvm/include/llvm/module.modulemap b/llvm/include/llvm/module.modulemap index 20c85167593e..0836dba1d878 100644 --- a/llvm/include/llvm/module.modulemap +++ b/llvm/include/llvm/module.modulemap @@ -28,7 +28,6 @@ module LLVM_Backend { textual header "CodeGen/CommandFlags.def" textual header "CodeGen/DIEValue.def" textual header "CodeGen/RuntimeLibcalls.def" - textual header "CodeGen/TargetOpcodes.def" } module Target { @@ -303,6 +302,7 @@ module LLVM_Utils { // These are intended for textual inclusion. textual header "Support/ARMTargetParser.def" textual header "Support/AArch64TargetParser.def" + textual header "Support/TargetOpcodes.def" textual header "Support/X86TargetParser.def" } diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 41f0e04c28fb..32dd8d5fc656 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -351,7 +351,7 @@ GetInstByName(const char *Name, static const char *const FixedInstrs[] = { #define HANDLE_TARGET_OPCODE(OPC) #OPC, -#include "llvm/CodeGen/TargetOpcodes.def" +#include "llvm/Support/TargetOpcodes.def" nullptr}; unsigned CodeGenTarget::getNumFixedInstructions() {