[PECOFF] Fix use-after-free.

llvm-svn: 186771
This commit is contained in:
Rui Ueyama 2013-07-20 21:00:47 +00:00
parent 5afb04abaf
commit 2125da5a0f
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ bool PECOFFTargetInfo::validateImpl(raw_ostream &diagnostics) {
/// Append the given file to the input file list. The file must be an object
/// file or an import library file.
bool PECOFFTargetInfo::appendInputFileOrLibrary(std::string path) {
StringRef ext = llvm::sys::path::extension(path).lower();
std::string ext = llvm::sys::path::extension(path).lower();
// This is an import library file. Look for the library file in the search
// paths, unless the path contains a directory name.
if (ext == ".lib") {