[PATCH] Refactor the code in clang to find a file in a PATH like environment variable into a helper function

Hans Wennborg hans at chromium.org
Thu Jun 19 09:35:55 PDT 2014


The code itself looks good, but I'm not sure this is the right place.

================
Comment at: include/llvm/Support/Program.h:156
@@ -149,1 +155,3 @@
+  Optional<std::string> FindInEnvPath(const std::string& EnvName,
+                                      const std::string& FileName);
   }
----------------
I'm not sure Program.h is the right place. This header seems mostly concerned with running programs.

Perhaps Process.h, next to GetEnv() is a better place? Or maybe FileSystem.h?

http://reviews.llvm.org/D4201






More information about the llvm-commits mailing list