Re: [swift-dev] [Compiler] Help IR gen in targetting MSVC

2016-04-26 Thread John McCall via swift-dev
> On Apr 26, 2016, at 1:03 PM, Sangjin Han wrote: > The problem can be solved by modifying that code. Thanks you. I thought that > code will affect only to the CLong type not Int. It changes what 'long' gets imported as. If there's a Windows API defined using 'long' (rather than some more mean

Re: [swift-dev] [Compiler] Help IR gen in targetting MSVC

2016-04-26 Thread Sangjin Han via swift-dev
The problem can be solved by modifying that code. Thanks you. I thought that code will affect only to the CLong type not Int. But I meet another problem to fix it. I couldn't find the conditional method to distinct x86_64-*-windows-msvc with x86_64-*-windows-cygnus in Swift source. "#if os(Window

Re: [swift-dev] [Compiler] Help IR gen in targetting MSVC

2016-04-25 Thread John McCall via swift-dev
> On Apr 25, 2016, at 7:54 PM, Sangjin Han via swift-dev > wrote: > Hi all, > > I found a bug in my port for MSVC and Cygwin. > > The C function swift_stdlib_readLine_stdin() is mapped to 'Int' type in > Swift, but it generates i32 in LLVM if I specify the target as MSVC. If I > give the targ

[swift-dev] [Compiler] Help IR gen in targetting MSVC

2016-04-25 Thread Sangjin Han via swift-dev
Hi all, I found a bug in my port for MSVC and Cygwin. The C function swift_stdlib_readLine_stdin() is mapped to 'Int' type in Swift, but it generates i32 in LLVM if I specify the target as MSVC. If I give the target as Cygwin, it generates i64. With the target options, the Cygwin ported swiftc.e