[llvm-commits] [llvm] r79418 - /llvm/trunk/tools/bugpoint/ToolRunner.cpp

Chris Lattner clattner at apple.com
Wed Aug 19 09:32:37 PDT 2009


On Aug 19, 2009, at 5:38 AM, Benjamin Kramer wrote:
> Author: d0k
> Date: Wed Aug 19 07:38:51 2009
> New Revision: 79418
>
> URL: http://llvm.org/viewvc/llvm-project?rev=79418&view=rev
> Log:
> Proper MSVC build fix (and remove my hack again). Patch by Yonggang  
> Luo.

Hi David,

I see that you wrote "IsARMArchitecture".  Would it make sense to pass  
the vector in by const reference instead of by copy?

-Chris

>
> Modified:
>    llvm/trunk/tools/bugpoint/ToolRunner.cpp
>
> Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=79418&r1=79417&r2=79418&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
> +++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Wed Aug 19 07:38:51 2009
> @@ -604,19 +604,14 @@
> // GCC abstraction
> //
>
> -#ifdef _MSC_VER
> -#define strcasecmp(s1, s2) _stricmp(s1, s2)
> -#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
> -#endif
> -
> static bool
> IsARMArchitecture(std::vector<std::string> Args)
> {
>   for (std::vector<std::string>::const_iterator
>          I = Args.begin(), E = Args.end(); I != E; ++I) {
> -    if (!strcasecmp(I->c_str(), "-arch")) {
> +    if (!StringsEqualNoCase(*I, "-arch")) {
>       ++I;
> -      if ((I != E) && !strncasecmp(I->c_str(), "arm",  
> strlen("arm"))) {
> +      if ((I != E) && !StringsEqualNoCase(I->c_str(), "arm",  
> strlen("arm"))) {
>         return true;
>       }
>     }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list