Sink MachineFunction private method out of line

This method is private and only called from this file and doesn't need
to be inline. Saves a TargetMachine.h include in MachineFunction.h, a
popular header. The include was introduced in 98603a8153 despite the
forward decl of LLVMTargetMachine.
This commit is contained in:
Reid Kleckner 2019-11-13 15:33:12 -08:00
parent 188d92b947
commit 364d1785a6
2 changed files with 10 additions and 9 deletions

View File

@ -36,7 +36,6 @@
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Recycler.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cstdint>
#include <memory>
@ -403,14 +402,7 @@ private:
/// A helper function that returns call site info for a give call
/// instruction if debug entry value support is enabled.
CallSiteInfoMap::iterator getCallSiteInfo(const MachineInstr *MI) {
assert(MI->isCall() &&
"Call site info refers only to call instructions!");
if (!Target.Options.EnableDebugEntryValues)
return CallSitesInfo.end();
return CallSitesInfo.find(MI);
}
CallSiteInfoMap::iterator getCallSiteInfo(const MachineInstr *MI);
// Callbacks for insertion and removal.
void handleInsertion(MachineInstr &MI);

View File

@ -830,6 +830,15 @@ try_next:;
return FilterID;
}
MachineFunction::CallSiteInfoMap::iterator
MachineFunction::getCallSiteInfo(const MachineInstr *MI) {
assert(MI->isCall() && "Call site info refers only to call instructions!");
if (!Target.Options.EnableDebugEntryValues)
return CallSitesInfo.end();
return CallSitesInfo.find(MI);
}
void MachineFunction::moveCallSiteInfo(const MachineInstr *Old,
const MachineInstr *New) {
assert(New->isCall() && "Call site info refers only to call instructions!");