diff --git a/llvm/lib/Target/M68k/M68kInstrInfo.h b/llvm/lib/Target/M68k/M68kInstrInfo.h --- a/llvm/lib/Target/M68k/M68kInstrInfo.h +++ b/llvm/lib/Target/M68k/M68kInstrInfo.h @@ -30,9 +30,6 @@ class M68kSubtarget; namespace M68k { -// Forward declaration -const uint8_t *getMCInstrBeads(unsigned Opcode); - // These MUST be kept in sync with codes definitions in M68kInstrInfo.td enum CondCode { COND_T = 0, // True diff --git a/llvm/lib/Target/M68k/M68kInstrInfo.cpp b/llvm/lib/Target/M68k/M68kInstrInfo.cpp --- a/llvm/lib/Target/M68k/M68kInstrInfo.cpp +++ b/llvm/lib/Target/M68k/M68kInstrInfo.cpp @@ -16,6 +16,7 @@ #include "M68kInstrBuilder.h" #include "M68kMachineFunction.h" #include "M68kTargetMachine.h" +#include "MCTargetDesc/M68kMCCodeEmitter.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" diff --git a/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h b/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h new file mode 100644 --- /dev/null +++ b/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h @@ -0,0 +1,28 @@ +//===-- M68kMCCodeEmitter.h - M68k Code Emitter ----------------*- C++ -*--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file contains the declarations for the code emitter which are useful +/// outside of the emitter itself. +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_M68K_MCTARGETDESC_M68KMCCODEEMITTER_H +#define LLVM_LIB_TARGET_M68K_MCTARGETDESC_M68KMCCODEEMITTER_H + +#include + +namespace llvm { +namespace M68k { + +const uint8_t *getMCInstrBeads(unsigned); + +} // namespace M68k +} // namespace llvm + +#endif diff --git a/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp b/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp --- a/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp +++ b/llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp @@ -11,6 +11,7 @@ /// //===----------------------------------------------------------------------===// +#include "MCTargetDesc/M68kMCCodeEmitter.h" #include "MCTargetDesc/M68kBaseInfo.h" #include "MCTargetDesc/M68kFixupKinds.h" #include "MCTargetDesc/M68kMCTargetDesc.h" @@ -27,13 +28,6 @@ #include "llvm/Support/EndianStream.h" #include "llvm/Support/raw_ostream.h" -namespace llvm { -namespace M68k { -// Forward declarations -const uint8_t *getMCInstrBeads(unsigned); -} // end namespace M68k -} // end namespace llvm - using namespace llvm; #define DEBUG_TYPE "m68k-mccodeemitter"