constify a bunch of dwarf stuff now that the registerinfo method

is constified.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-26 23:18:02 +00:00
parent 30c6b75ac2
commit eec791afb1
7 changed files with 15 additions and 15 deletions

View File

@ -76,11 +76,11 @@ public:
/// BeginFunction - Gather pre-function debug information. Assumes being /// BeginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point. /// emitted immediately after the function entry point.
void BeginFunction(MachineFunction *MF); void BeginFunction(const MachineFunction *MF);
/// EndFunction - Gather and emit post-function debug information. /// EndFunction - Gather and emit post-function debug information.
/// ///
void EndFunction(MachineFunction *MF); void EndFunction(const MachineFunction *MF);
/// RecordSourceLine - Register a source line with debug info. Returns a /// RecordSourceLine - Register a source line with debug info. Returns a
/// unique label ID used to generate a label and provide correspondence to /// unique label ID used to generate a label and provide correspondence to

View File

@ -1992,7 +1992,7 @@ void DwarfDebug::createDbgScope(MDNode *Scope, MDNode *InlinedAt) {
/// extractScopeInformation - Scan machine instructions in this function /// extractScopeInformation - Scan machine instructions in this function
/// and collect DbgScopes. Return true, if atleast one scope was found. /// and collect DbgScopes. Return true, if atleast one scope was found.
bool DwarfDebug::extractScopeInformation(MachineFunction *MF) { bool DwarfDebug::extractScopeInformation() {
// If scope information was extracted using .dbg intrinsics then there is not // If scope information was extracted using .dbg intrinsics then there is not
// any need to extract these information by scanning each instruction. // any need to extract these information by scanning each instruction.
if (!DbgScopeMap.empty()) if (!DbgScopeMap.empty())
@ -2087,7 +2087,7 @@ bool DwarfDebug::extractScopeInformation(MachineFunction *MF) {
/// beginFunction - Gather pre-function debug information. Assumes being /// beginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point. /// emitted immediately after the function entry point.
void DwarfDebug::beginFunction(MachineFunction *MF) { void DwarfDebug::beginFunction(const MachineFunction *MF) {
this->MF = MF; this->MF = MF;
if (!ShouldEmitDwarfDebug()) return; if (!ShouldEmitDwarfDebug()) return;
@ -2095,13 +2095,13 @@ void DwarfDebug::beginFunction(MachineFunction *MF) {
if (TimePassesIsEnabled) if (TimePassesIsEnabled)
DebugTimer->startTimer(); DebugTimer->startTimer();
if (!extractScopeInformation(MF)) if (!extractScopeInformation())
return; return;
collectVariableInfo(); collectVariableInfo();
// Begin accumulating function debug information. // Begin accumulating function debug information.
MMI->BeginFunction(MF); MMI->BeginFunction((MachineFunction*)MF);
// Assumes in correct section after the entry point. // Assumes in correct section after the entry point.
EmitLabel("func_begin", ++SubprogramCount); EmitLabel("func_begin", ++SubprogramCount);
@ -2129,7 +2129,7 @@ void DwarfDebug::beginFunction(MachineFunction *MF) {
/// endFunction - Gather and emit post-function debug information. /// endFunction - Gather and emit post-function debug information.
/// ///
void DwarfDebug::endFunction(MachineFunction *MF) { void DwarfDebug::endFunction(const MachineFunction *MF) {
if (!ShouldEmitDwarfDebug()) return; if (!ShouldEmitDwarfDebug()) return;
if (TimePassesIsEnabled) if (TimePassesIsEnabled)

View File

@ -523,11 +523,11 @@ public:
/// beginFunction - Gather pre-function debug information. Assumes being /// beginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point. /// emitted immediately after the function entry point.
void beginFunction(MachineFunction *MF); void beginFunction(const MachineFunction *MF);
/// endFunction - Gather and emit post-function debug information. /// endFunction - Gather and emit post-function debug information.
/// ///
void endFunction(MachineFunction *MF); void endFunction(const MachineFunction *MF);
/// recordSourceLine - Records location information and associates it with a /// recordSourceLine - Records location information and associates it with a
/// label. Returns a unique label ID used to generate a label and provide /// label. Returns a unique label ID used to generate a label and provide
@ -550,7 +550,7 @@ public:
/// extractScopeInformation - Scan machine instructions in this function /// extractScopeInformation - Scan machine instructions in this function
/// and collect DbgScopes. Return true, if atleast one scope was found. /// and collect DbgScopes. Return true, if atleast one scope was found.
bool extractScopeInformation(MachineFunction *MF); bool extractScopeInformation();
/// collectVariableInfo - Populate DbgScope entries with variables' info. /// collectVariableInfo - Populate DbgScope entries with variables' info.
void collectVariableInfo(); void collectVariableInfo();

View File

@ -943,7 +943,7 @@ void DwarfException::EndModule() {
/// BeginFunction - Gather pre-function exception information. Assumes it's /// BeginFunction - Gather pre-function exception information. Assumes it's
/// being emitted immediately after the function entry point. /// being emitted immediately after the function entry point.
void DwarfException::BeginFunction(MachineFunction *MF) { void DwarfException::BeginFunction(const MachineFunction *MF) {
if (!MMI || !MAI->doesSupportExceptionHandling()) return; if (!MMI || !MAI->doesSupportExceptionHandling()) return;
if (TimePassesIsEnabled) if (TimePassesIsEnabled)

View File

@ -197,7 +197,7 @@ public:
/// BeginFunction - Gather pre-function exception information. Assumes being /// BeginFunction - Gather pre-function exception information. Assumes being
/// emitted immediately after the function entry point. /// emitted immediately after the function entry point.
void BeginFunction(MachineFunction *MF); void BeginFunction(const MachineFunction *MF);
/// EndFunction - Gather and emit post-function exception information. /// EndFunction - Gather and emit post-function exception information.
void EndFunction(); void EndFunction();

View File

@ -56,7 +56,7 @@ protected:
Module *M; Module *M;
/// MF - Current machine function. /// MF - Current machine function.
MachineFunction *MF; const MachineFunction *MF;
/// MMI - Collected machine module information. /// MMI - Collected machine module information.
MachineModuleInfo *MMI; MachineModuleInfo *MMI;

View File

@ -57,14 +57,14 @@ void DwarfWriter::EndModule() {
/// BeginFunction - Gather pre-function debug information. Assumes being /// BeginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point. /// emitted immediately after the function entry point.
void DwarfWriter::BeginFunction(MachineFunction *MF) { void DwarfWriter::BeginFunction(const MachineFunction *MF) {
DE->BeginFunction(MF); DE->BeginFunction(MF);
DD->beginFunction(MF); DD->beginFunction(MF);
} }
/// EndFunction - Gather and emit post-function debug information. /// EndFunction - Gather and emit post-function debug information.
/// ///
void DwarfWriter::EndFunction(MachineFunction *MF) { void DwarfWriter::EndFunction(const MachineFunction *MF) {
DD->endFunction(MF); DD->endFunction(MF);
DE->EndFunction(); DE->EndFunction();