Skip to content

Commit

Permalink
[CodeGen] Use const MBBs in the opt remark diagnostics. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296010 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ahmedbougacha committed Feb 23, 2017
1 parent 0bf4d71 commit d9e9828
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DiagnosticInfoMIROptimization : public DiagnosticInfoOptimizationBase {
public:
DiagnosticInfoMIROptimization(enum DiagnosticKind Kind, const char *PassName,
StringRef RemarkName, const DebugLoc &DLoc,
MachineBasicBlock *MBB)
const MachineBasicBlock *MBB)
: DiagnosticInfoOptimizationBase(Kind, DS_Remark, PassName, RemarkName,
*MBB->getParent()->getFunction(), DLoc),
MBB(MBB) {}
Expand All @@ -42,7 +42,7 @@ class DiagnosticInfoMIROptimization : public DiagnosticInfoOptimizationBase {
const MachineBasicBlock *getBlock() const { return MBB; }

private:
MachineBasicBlock *MBB;
const MachineBasicBlock *MBB;
};

/// Diagnostic information for applied optimization remarks.
Expand All @@ -54,7 +54,7 @@ class MachineOptimizationRemark : public DiagnosticInfoMIROptimization {
/// DLoc is the debug location and \p MBB is the block that the optimization
/// operates in.
MachineOptimizationRemark(const char *PassName, StringRef RemarkName,
const DebugLoc &DLoc, MachineBasicBlock *MBB)
const DebugLoc &DLoc, const MachineBasicBlock *MBB)
: DiagnosticInfoMIROptimization(DK_MachineOptimizationRemark, PassName,
RemarkName, DLoc, MBB) {}

Expand All @@ -77,7 +77,8 @@ class MachineOptimizationRemarkMissed : public DiagnosticInfoMIROptimization {
/// remark. \p DLoc is the debug location and \p MBB is the block that the
/// optimization operates in.
MachineOptimizationRemarkMissed(const char *PassName, StringRef RemarkName,
const DebugLoc &DLoc, MachineBasicBlock *MBB)
const DebugLoc &DLoc,
const MachineBasicBlock *MBB)
: DiagnosticInfoMIROptimization(DK_MachineOptimizationRemarkMissed,
PassName, RemarkName, DLoc, MBB) {}

Expand All @@ -101,7 +102,7 @@ class MachineOptimizationRemarkAnalysis : public DiagnosticInfoMIROptimization {
/// optimization operates in.
MachineOptimizationRemarkAnalysis(const char *PassName, StringRef RemarkName,
const DebugLoc &DLoc,
MachineBasicBlock *MBB)
const MachineBasicBlock *MBB)
: DiagnosticInfoMIROptimization(DK_MachineOptimizationRemarkAnalysis,
PassName, RemarkName, DLoc, MBB) {}

Expand Down

0 comments on commit d9e9828

Please sign in to comment.