diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2005-05-03 06:10:51 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2005-05-03 06:10:51 +0000 |
commit | 3a98ff8d3abe670c716f4a3b8d87c3583c61f505 (patch) | |
tree | 5d789ae4fc8b28d34762ffec7d8df8602e5513a1 /tools/llvmc | |
parent | 38bacf29e8716d1ca2f10c6e92fe7a12f358502c (diff) | |
download | external_llvm-3a98ff8d3abe670c716f4a3b8d87c3583c61f505.zip external_llvm-3a98ff8d3abe670c716f4a3b8d87c3583c61f505.tar.gz external_llvm-3a98ff8d3abe670c716f4a3b8d87c3583c61f505.tar.bz2 |
std::string(NULL) does not a proper constructor make
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc')
-rw-r--r-- | tools/llvmc/llvmc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp index d6409af..4f325e6 100644 --- a/tools/llvmc/llvmc.cpp +++ b/tools/llvmc/llvmc.cpp @@ -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; |