mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 22:06:06 +00:00

There's a few relevant forward declarations in there that may require downstream adding explicit includes: llvm/MC/MCContext.h no longer includes llvm/BinaryFormat/ELF.h, llvm/MC/MCSubtargetInfo.h, llvm/MC/MCTargetOptions.h llvm/MC/MCObjectStreamer.h no longer include llvm/MC/MCAssembler.h llvm/MC/MCAssembler.h no longer includes llvm/MC/MCFixup.h, llvm/MC/MCFragment.h Counting preprocessed lines required to rebuild llvm-project on my setup: before: 1052436830 after: 1049293745 Which is significant and backs up the change in addition to the usual benefits of decreasing coupling between headers and compilation units. Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119244
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
//===- MCInstrAnalysis.cpp - InstrDesc target hooks -----------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCInstrAnalysis.h"
|
|
|
|
#include "llvm/ADT/APInt.h"
|
|
#include <cstdint>
|
|
|
|
namespace llvm {
|
|
class MCSubtargetInfo;
|
|
}
|
|
|
|
using namespace llvm;
|
|
|
|
bool MCInstrAnalysis::clearsSuperRegisters(const MCRegisterInfo &MRI,
|
|
const MCInst &Inst,
|
|
APInt &Writes) const {
|
|
Writes.clearAllBits();
|
|
return false;
|
|
}
|
|
|
|
bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
|
|
uint64_t /*Size*/,
|
|
uint64_t & /*Target*/) const {
|
|
return false;
|
|
}
|
|
|
|
Optional<uint64_t> MCInstrAnalysis::evaluateMemoryOperandAddress(
|
|
const MCInst &Inst, const MCSubtargetInfo *STI, uint64_t Addr,
|
|
uint64_t Size) const {
|
|
return None;
|
|
}
|
|
|
|
Optional<uint64_t>
|
|
MCInstrAnalysis::getMemoryOperandRelocationOffset(const MCInst &Inst,
|
|
uint64_t Size) const {
|
|
return None;
|
|
}
|