From 8ee9a827e7010529280b97fd0b594e1e17ece2b7 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 8 Apr 2007 20:10:14 +0000 Subject: Make sure temporary data is not used past its life span. llvm-svn: 35773 --- llvm/lib/Debugger/ProgramInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Debugger/ProgramInfo.cpp') diff --git a/llvm/lib/Debugger/ProgramInfo.cpp b/llvm/lib/Debugger/ProgramInfo.cpp index 833fe7ca167..9d987ea4ad6 100644 --- a/llvm/lib/Debugger/ProgramInfo.cpp +++ b/llvm/lib/Debugger/ProgramInfo.cpp @@ -194,8 +194,8 @@ void SourceFunctionInfo::getSourceLocation(unsigned &RetLineNo, ProgramInfo::ProgramInfo(Module *m) : M(m), ProgramTimeStamp(0,0) { assert(M && "Cannot create program information with a null module!"); - const sys::FileStatus *Stat; - Stat = sys::PathWithStatus(M->getModuleIdentifier()).getFileStatus(); + sys::PathWithStatus ModPath(M->getModuleIdentifier()); + const sys::FileStatus *Stat = ModPath.getFileStatus(); if (Stat) ProgramTimeStamp = Stat->getTimestamp(); -- cgit v1.2.3