std::string(NULL) does not a proper constructor make

llvm-svn: 21666
This commit is contained in:
Misha Brukman 2005-05-03 06:10:51 +00:00
parent 8298120f17
commit 18aa1d6438
1 changed files with 3 additions and 3 deletions

View File

@ -281,9 +281,9 @@ int main(int argc, char **argv) {
// If the LLVM_LIB_SEARCH_PATH environment variable is
// set, append it to the list of places to search for libraries
std::string srchPath = getenv("LLVM_LIB_SEARCH_PATH");
if (!srchPath.empty())
LibPaths.push_back(srchPath);
char *srchPath = getenv("LLVM_LIB_SEARCH_PATH");
if (srchPath != NULL && strlen(srchPath) != 0)
LibPaths.push_back(std::string(srchPath));
// Set the driver flags based on command line options
unsigned flags = 0;