diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-17 22:06:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-17 22:06:46 +0000 |
commit | 8466b214328b162a0be648dd324db8b6a1cfe0df (patch) | |
tree | 626e49aded5d7158b8640655b6c97a765e39264f /include/llvm/CodeGen/MachineDebugInfo.h | |
parent | dc246715cbd062bcfc46a181440b0bdc93b46c6b (diff) |
Do not leak all of the SourceLineInfo objects. Do not bother mallocing each
one separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineDebugInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineDebugInfo.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineDebugInfo.h b/include/llvm/CodeGen/MachineDebugInfo.h index c559b6b66d..a031ad0c6f 100644 --- a/include/llvm/CodeGen/MachineDebugInfo.h +++ b/include/llvm/CodeGen/MachineDebugInfo.h @@ -967,7 +967,7 @@ private: 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 @@ public: /// 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); |