[llvm-commits] CVS: llvm/include/llvm/CodeGen/DwarfWriter.h MachineDebugInfo.h
Chris Lattner
sabre at nondot.org
Tue Oct 17 15:07:01 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
DwarfWriter.h updated: 1.40 -> 1.41
MachineDebugInfo.h updated: 1.40 -> 1.41
---
Log message:
Do not leak all of the SourceLineInfo objects. Do not bother mallocing each
one separately.
---
Diffs of the changes: (+8 -3)
DwarfWriter.h | 2 +-
MachineDebugInfo.h | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.40 llvm/include/llvm/CodeGen/DwarfWriter.h:1.41
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.40 Thu Sep 7 17:06:40 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Tue Oct 17 17:06:46 2006
@@ -151,7 +151,7 @@
/// SectionSourceLines - Tracks line numbers per text section.
///
- std::vector<std::vector<SourceLineInfo *> > SectionSourceLines;
+ std::vector<std::vector<SourceLineInfo> > SectionSourceLines;
public:
Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.40 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.41
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.40 Tue Oct 17 16:51:44 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h Tue Oct 17 17:06:46 2006
@@ -967,7 +967,7 @@
UniqueVector<SourceFileInfo> SourceFiles;
// Lines - List of of source line correspondence.
- std::vector<SourceLineInfo *> Lines;
+ std::vector<SourceLineInfo> Lines;
// LabelID - Current number assigned to unique label numbers.
unsigned LabelID;
@@ -1049,10 +1049,15 @@
/// getSourceLines - Return a vector of source lines.
///
- std::vector<SourceLineInfo *> &getSourceLines() {
+ const std::vector<SourceLineInfo> &getSourceLines() const {
return Lines;
}
+ // FIXME: nuke this.
+ void ClearLineInfo() {
+ Lines.clear();
+ }
+
/// SetupCompileUnits - Set up the unique vector of compile units.
///
void SetupCompileUnits(Module &M);
More information about the llvm-commits
mailing list