1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[M68k] Forward declare getMCInstrBeads in one place

At the moment `getMCInstrBeads` is forward-declared in a few places,
bring this together into a single header file.

This was done as part of the disassembler work, since the disassembler
would otherwise add one more forward declaration.

Differential Revision: https://reviews.llvm.org/D98533
This commit is contained in:
Ricky Taylor 2021-03-17 13:30:39 -07:00 committed by Min-Yih Hsu
parent 762c21ab09
commit 7965564c8e
4 changed files with 30 additions and 10 deletions

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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 <cstdint>
namespace llvm {
namespace M68k {
const uint8_t *getMCInstrBeads(unsigned);
} // namespace M68k
} // namespace llvm
#endif