Skip to content
Snippets Groups Projects
Commit 2125da5a authored by Rui Ueyama's avatar Rui Ueyama
Browse files

[PECOFF] Fix use-after-free.

llvm-svn: 186771
parent 5afb04ab
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ bool PECOFFTargetInfo::validateImpl(raw_ostream &diagnostics) { ...@@ -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 /// Append the given file to the input file list. The file must be an object
/// file or an import library file. /// file or an import library file.
bool PECOFFTargetInfo::appendInputFileOrLibrary(std::string path) { 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 // This is an import library file. Look for the library file in the search
// paths, unless the path contains a directory name. // paths, unless the path contains a directory name.
if (ext == ".lib") { if (ext == ".lib") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment