[llvm-commits] CVS: llvm/tools/llvmc/llvmc.cpp

Misha Brukman brukman at cs.uiuc.edu
Mon May 2 23:11:02 PDT 2005



Changes in directory llvm/tools/llvmc:

llvmc.cpp updated: 1.25 -> 1.26
---
Log message:

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


---
Diffs of the changes:  (+3 -3)

 llvmc.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/tools/llvmc/llvmc.cpp
diff -u llvm/tools/llvmc/llvmc.cpp:1.25 llvm/tools/llvmc/llvmc.cpp:1.26
--- llvm/tools/llvmc/llvmc.cpp:1.25	Tue May  3 00:36:14 2005
+++ llvm/tools/llvmc/llvmc.cpp	Tue May  3 01:10:51 2005
@@ -281,9 +281,9 @@
 
     // 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;






More information about the llvm-commits mailing list