[llvm] 6670f5d - MachineStableHash.h - remove MachineInstr.h include. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 05:34:01 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-07T13:33:48+01:00
New Revision: 6670f5d1e66563ad482576d9db4b8393539ab53b
URL: https://github.com/llvm/llvm-project/commit/6670f5d1e66563ad482576d9db4b8393539ab53b
DIFF: https://github.com/llvm/llvm-project/commit/6670f5d1e66563ad482576d9db4b8393539ab53b.diff
LOG: MachineStableHash.h - remove MachineInstr.h include. NFC.
Use forward declarations and move the include to MachineStableHash.cpp
Added:
Modified:
llvm/include/llvm/CodeGen/MachineStableHash.h
llvm/lib/CodeGen/MachineStableHash.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineStableHash.h b/llvm/include/llvm/CodeGen/MachineStableHash.h
index 19bd28a79477..a5e85aef099d 100644
--- a/llvm/include/llvm/CodeGen/MachineStableHash.h
+++ b/llvm/include/llvm/CodeGen/MachineStableHash.h
@@ -14,10 +14,12 @@
#ifndef LLVM_CODEGEN_MACHINESTABLEHASH_H
#define LLVM_CODEGEN_MACHINESTABLEHASH_H
-#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/StableHashing.h"
namespace llvm {
+class MachineInstr;
+class MachineOperand;
+
stable_hash stableHashValue(const MachineOperand &MO);
stable_hash stableHashValue(const MachineInstr &MI, bool HashVRegs = false,
bool HashConstantPoolIndices = false,
diff --git a/llvm/lib/CodeGen/MachineStableHash.cpp b/llvm/lib/CodeGen/MachineStableHash.cpp
index 7106d4172ce0..fb14f0a33209 100644
--- a/llvm/lib/CodeGen/MachineStableHash.cpp
+++ b/llvm/lib/CodeGen/MachineStableHash.cpp
@@ -20,6 +20,7 @@
#include "llvm/CodeGen/MIRFormatter.h"
#include "llvm/CodeGen/MIRPrinter.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
More information about the llvm-commits
mailing list