[llvm-commits] [llvm] r72148 - /llvm/trunk/include/llvm/System/Atomic.h

Howard Su howard0su at gmail.com
Tue May 19 22:18:26 PDT 2009


after run through the build, I found the suggested fix can not solve other
problem like:     1>..\..\..\llvm-ng\tools\llvm-ld\llvm-ld.cpp(414): error
C2039: 'CopyFileA' : is not a member of 'llvm::sys'
     1>..\..\..\llvm-ng\tools\llvm-ld\llvm-ld.cpp(414): error C2664:
'CopyFileA' : cannot convert parameter 1 from 'llvm::sys::Path' to 'LPCSTR'
In general, windows header will redefine CopyFile, FindExecutable, etc to a
unicode version and a non-unicode version. So the fix can be add a inline
method which implement MemoryBarrier instead of including windows.h.


On Wed, May 20, 2009 at 11:18 AM, Howard Su <howard0su at gmail.com> wrote:

> I got the following errors when compiling under vs2008:..\..\..\llvm-ng\lib\Support\Timer.cpp(178):
> error C2589: '(' : illegal token on right side of '::'
> ..\..\..\llvm-ng\lib\Support\Timer.cpp(178): error C2059: syntax error :
> '::'
>
> I think this is broken after rev:72087.
>
> Under VS, windows.h also defined a min,max macro which cause the conflict.
> I will suggest to fix as:
> #if defined(_MSC_VER)
> #define NOMINMAX
> #include <windows.h>
> #endif
>
> --
> -Howard
>



-- 
-Howard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090520/17d76356/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_under_windows.patch
Type: application/octet-stream
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090520/17d76356/attachment.obj>


More information about the llvm-commits mailing list