OK thanks a lot Michael Spencer!<div><br></div><div>After getting your latest commit now everything compiles on Visual Studio 2012 RC. I'm just playing around to learn. </div><div><br></div><div>Maybe this is the funniest place to start assessing my possibilities of contributing to llvm in the free time:</div>
<div><br></div><div><div>Writer* createWriterPECOFF(const WriterOptionsPECOFF &options) {</div><div>  assert(0 && "PE/COFF support not implemented yet");</div><div>  return nullptr;</div><div>}</div>
</div><div><br></div><div>:-)</div><div><br></div><div>Best regards!</div><div>Mello</div><div><br><div><br><div class="gmail_quote">On Sat, Jun 16, 2012 at 10:22 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sat, Jun 16, 2012 at 4:15 PM, Cesar Mello <<a href="mailto:cmello@gmail.com">cmello@gmail.com</a>> wrote:<br>

> Hi!<br>
><br>
> I'm trying to build lld Microsoft Visual Studio 2012 RC, but it seems the<br>
> bzero function is not available.<br>
><br>
> Could memset be used instead of bzero? Or maybe define a bzero for msvc<br>
> using memset.<br>
><br>
> For example:<br>
><br>
>       // in-memory matches on-disk, so copy first fields followed by path<br>
>       ::memcpy(to, (uint8_t*)&cmd, 12);<br>
>       ::memcpy(&to[12], _name.data(), _name.size());<br>
>       ::bzero(&to[12+_name.size()], cmdsize-(12+_name.size()));<br>
><br>
> The bzero line could be changed to:<br>
><br>
>  ::memset(&to[12+_name.size()], 0, cmdsize-(12+_name.size()));<br>
><br>
> Thanks a lot for the attention and congratulations for the great work!!!<br>
><br>
> Best regards<br>
> Mello<br>
<br>
</div></div>While this will make it compile, the code is not valid to begin with.<br>
It is trying to do a raw memory copy of a non standard-layout type.<br>
nameoffset is not guaranteed to directly follow cmdsize.<br>
<br>
Fixing this will require quite a few changes, so for now I've<br>
committed your change.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Michael Spencer<br>
</font></span></blockquote></div><br></div></div>