[cfe-commits] [Patch] Support multiple path of COMPILER_PATH env on windows platform

NAKAMURA Takumi geek4civic at gmail.com
Tue Dec 11 01:38:17 PST 2012


Hello, Kim.

Thank you to work on Win32.

Could you use llvm::sys::PathSeparator there? Please confirm in your
environment.

FYI, I heard llvm::sys might be deprecated in future. That said, I am not
sure when it done.
We may use llvm::sys for now.

--- lib/Driver/Driver.cpp (revision 169719)
+++ lib/Driver/Driver.cpp (working copy)
@@ -238,7 +238,11 @@
   if (char *env = ::getenv("COMPILER_PATH")) {
     StringRef CompilerPath = env;
     while (!CompilerPath.empty()) {
-      std::pair<StringRef, StringRef> Split = CompilerPath.split(':');
+#ifdef LLVM_ON_WIN32
+    std::pair<StringRef, StringRef> Split = CompilerPath.split(';');
+#else
+    std::pair<StringRef, StringRef> Split = CompilerPath.split(':');
+#endif

Please be aware of indentation. We prefer to follow the style in existing
code.
http://llvm.org/docs/CodingStandards.html#golden-rule

...Takumi



2012/12/11 김보곤 <bogon82.kim at samsung.com>

>  Hello, everyone.
>
>
>
> The COMPILER_PATH environment seperator is semicolon on windows as colon
> on linux
>
>
>
> To support multiple path of COMPILER_PATH env, change the seperator to
> semicolon for windows platform
>
>
>
> P.S
>
> This is my first contribution. Please let me know if there is any mistakes
>
>
>
> **
>
> *김 보 곤 (Bogon Kim)*
>
>
>
> *Platform R&D Group*
>
> *Mobile Communication Division*
>
> *Samsung Electronics.Co.,LTD*
>
> *TEL       82 - 31 - 301 - 2814*
>
> *Mobile  82 - 11 - 881 - 8458*
>
> *E-mail  bogon82.kim at samsung.com*
>
> *With passion and confidence(WPAC)*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121211/8b2563c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 201212111516385_LP7KBSL8.gif
Type: image/gif
Size: 14036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121211/8b2563c2/attachment.gif>


More information about the cfe-commits mailing list