[PATCH] D98533: [M68k] Forward declare getMCInstrBeads in one place

Ricky Taylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 12:59:57 PDT 2021


ricky26 updated this revision to Diff 331074.
ricky26 added a comment.

Moved inc file include back


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98533/new/

https://reviews.llvm.org/D98533

Files:
  llvm/lib/Target/M68k/M68kInstrInfo.cpp
  llvm/lib/Target/M68k/M68kInstrInfo.h
  llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
  llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h


Index: llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.h
===================================================================
--- /dev/null
+++ 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 <cstdint>
+
+namespace llvm {
+namespace M68k {
+
+const uint8_t *getMCInstrBeads(unsigned);
+
+} // namespace M68k
+} // namespace llvm
+
+#endif
Index: llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
===================================================================
--- llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
+++ 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"
Index: llvm/lib/Target/M68k/M68kInstrInfo.h
===================================================================
--- llvm/lib/Target/M68k/M68kInstrInfo.h
+++ 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
Index: llvm/lib/Target/M68k/M68kInstrInfo.cpp
===================================================================
--- llvm/lib/Target/M68k/M68kInstrInfo.cpp
+++ 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98533.331074.patch
Type: text/x-patch
Size: 2824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210316/7a033d32/attachment.bin>


More information about the llvm-commits mailing list