summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2017-02-23 21:05:23 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2017-02-23 21:05:23 +0000
commit0cf8cfa1656fd064f454757c76cef724cd7a04fb (patch)
tree8bd05c92766ca2af778b34db53628f2c6488321f /llvm
parentce3ddd2de4c5dbd5a7a68b51ea38f96cf7fbf3aa (diff)
downloadbcm5719-llvm-0cf8cfa1656fd064f454757c76cef724cd7a04fb.tar.gz
bcm5719-llvm-0cf8cfa1656fd064f454757c76cef724cd7a04fb.zip
[CodeGen] Use const MBBs in the opt remark diagnostics. NFC.
llvm-svn: 296010
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
index fd48347d51a..345e70ecbf4 100644
--- a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
+++ b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
@@ -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) {}
@@ -42,7 +42,7 @@ public:
const MachineBasicBlock *getBlock() const { return MBB; }
private:
- MachineBasicBlock *MBB;
+ const MachineBasicBlock *MBB;
};
/// Diagnostic information for applied optimization remarks.
@@ -54,7 +54,7 @@ public:
/// 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) {}
@@ -77,7 +77,8 @@ public:
/// 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) {}
@@ -101,7 +102,7 @@ public:
/// optimization operates in.
MachineOptimizationRemarkAnalysis(const char *PassName, StringRef RemarkName,
const DebugLoc &DLoc,
- MachineBasicBlock *MBB)
+ const MachineBasicBlock *MBB)
: DiagnosticInfoMIROptimization(DK_MachineOptimizationRemarkAnalysis,
PassName, RemarkName, DLoc, MBB) {}
OpenPOWER on IntegriCloud