diff --git a/lib/Target/M68k/M68kInstrInfo.cpp b/lib/Target/M68k/M68kInstrInfo.cpp index 94b003f873f..67b3a9f12c9 100644 --- a/lib/Target/M68k/M68kInstrInfo.cpp +++ b/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/lib/Target/M68k/M68kInstrInfo.h b/lib/Target/M68k/M68kInstrInfo.h index e15b0a1181b..a503b02c5a8 100644 --- a/lib/Target/M68k/M68kInstrInfo.h +++ b/lib/Target/M68k/M68kInstrInfo.h @@ -30,9 +30,6 @@ namespace llvm { 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/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp b/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp index 59c49e85331..b8579227be1 100644 --- a/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp +++ b/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" diff --git a/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h b/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h new file mode 100644 index 00000000000..242a1297206 --- /dev/null +++ b/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