mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1170,7 +1170,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// SourceLineInfo - This class is used to record source line correspondence.
|
/// SrcLineInfo - This class is used to record source line correspondence.
|
||||||
///
|
///
|
||||||
class SrcLineInfo {
|
class SrcLineInfo {
|
||||||
unsigned Line; // Source line number.
|
unsigned Line; // Source line number.
|
||||||
@ -1327,7 +1327,7 @@ private:
|
|||||||
|
|
||||||
/// SectionSourceLines - Tracks line numbers per text section.
|
/// SectionSourceLines - Tracks line numbers per text section.
|
||||||
///
|
///
|
||||||
std::vector<std::vector<SourceLineInfo> > SectionSourceLines;
|
std::vector<std::vector<SrcLineInfo> > SectionSourceLines;
|
||||||
|
|
||||||
/// didInitial - Flag to indicate if initial emission has been done.
|
/// didInitial - Flag to indicate if initial emission has been done.
|
||||||
///
|
///
|
||||||
@ -3126,7 +3126,7 @@ private:
|
|||||||
|
|
||||||
for (unsigned j = 0; j < SecSrcLinesSize; ++j) {
|
for (unsigned j = 0; j < SecSrcLinesSize; ++j) {
|
||||||
// Isolate current sections line info.
|
// Isolate current sections line info.
|
||||||
const std::vector<SourceLineInfo> &LineInfos = SectionSourceLines[j];
|
const std::vector<SrcLineInfo> &LineInfos = SectionSourceLines[j];
|
||||||
|
|
||||||
if (VerboseAsm) {
|
if (VerboseAsm) {
|
||||||
const Section* S = SectionMap[j + 1];
|
const Section* S = SectionMap[j + 1];
|
||||||
@ -3140,7 +3140,7 @@ private:
|
|||||||
|
|
||||||
// Construct rows of the address, source, line, column matrix.
|
// Construct rows of the address, source, line, column matrix.
|
||||||
for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
|
for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
|
||||||
const SourceLineInfo &LineInfo = LineInfos[i];
|
const SrcLineInfo &LineInfo = LineInfos[i];
|
||||||
unsigned LabelID = MMI->MappedLabel(LineInfo.getLabelID());
|
unsigned LabelID = MMI->MappedLabel(LineInfo.getLabelID());
|
||||||
if (!LabelID) continue;
|
if (!LabelID) continue;
|
||||||
|
|
||||||
@ -3735,9 +3735,8 @@ public:
|
|||||||
|
|
||||||
// Emit label for the implicitly defined dbg.stoppoint at the start of
|
// Emit label for the implicitly defined dbg.stoppoint at the start of
|
||||||
// the function.
|
// the function.
|
||||||
const std::vector<SourceLineInfo> &LineInfos = MMI->getSourceLines();
|
if (!Lines.empty()) {
|
||||||
if (!LineInfos.empty()) {
|
const SrcLineInfo &LineInfo = Lines[0];
|
||||||
const SourceLineInfo &LineInfo = LineInfos[0];
|
|
||||||
Asm->printLabel(LineInfo.getLabelID());
|
Asm->printLabel(LineInfo.getLabelID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3751,16 +3750,14 @@ public:
|
|||||||
EmitLabel("func_end", SubprogramCount);
|
EmitLabel("func_end", SubprogramCount);
|
||||||
|
|
||||||
// Get function line info.
|
// Get function line info.
|
||||||
const std::vector<SourceLineInfo> &LineInfos = MMI->getSourceLines();
|
if (!Lines.empty()) {
|
||||||
|
|
||||||
if (!LineInfos.empty()) {
|
|
||||||
// Get section line info.
|
// Get section line info.
|
||||||
unsigned ID = SectionMap.insert(Asm->CurrentSection_);
|
unsigned ID = SectionMap.insert(Asm->CurrentSection_);
|
||||||
if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID);
|
if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID);
|
||||||
std::vector<SourceLineInfo> &SectionLineInfos = SectionSourceLines[ID-1];
|
std::vector<SrcLineInfo> &SectionLineInfos = SectionSourceLines[ID-1];
|
||||||
// Append the function info to section info.
|
// Append the function info to section info.
|
||||||
SectionLineInfos.insert(SectionLineInfos.end(),
|
SectionLineInfos.insert(SectionLineInfos.end(),
|
||||||
LineInfos.begin(), LineInfos.end());
|
Lines.begin(), Lines.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct scopes for subprogram.
|
// Construct scopes for subprogram.
|
||||||
|
Reference in New Issue
Block a user