Sorry for just talking to myself here, just trying to keep people in the loop on my findings.<br>The problem seems to be a much larger issue with the Visual Studio 2010 C++ Compiler and not really related to clang/llvm. The following snippet of code does <b>NOT </b>compile in 2010..<br>
<br>#include <vector><br>int main(int argc, char* argv[])<br>{<br>    std::pair<int, void*> mypair(0, NULL);<br>    return 0;<br>}<br><br><br>Tom.<br><br><br><div class="gmail_quote">On Sat, May 1, 2010 at 8:57 PM, Tom van Dijck <span dir="ltr"><<a href="mailto:llvm@tomvandijck.com">llvm@tomvandijck.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hey,<br><br>So I tried to fix these errors, and have 
everything compiling now... not too difficult, just annoying.<div class="im"><div><br>error C2248: 'llvm::EquivalenceClasses<<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


ElemTy>::ECValue::ECValue'
 : cannot access private member declared in class 
'llvm::EquivalenceClasses<ElemTy>::ECValue'    C:\Program 
Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory    208</blockquote><br></div></div>I
 moved: <br><br>    // ECValue ctor - Start out with EndOfList pointing 
to this node, Next is Null, isLeader = true.<br>    ECValue(const ElemTy
 &Elt)<br>
      : Leader(this), Next((ECValue*)(intptr_t)1), Data(Elt) {}<br><br>into
 the public section of the ECValue class, seemed to solve that one..<br><br>------
 <br><br>the cast errors from below... pretty weird, but the Microsofts 
compiler seems to not like passing in 0 as a pointer into the 
pair<> template if that argument is in reality a pointer. seems 
weird since if (bla == 0) works fine, but pair<int, void*>(0,0); 
does not, anyway, the fix was to just cast that 0... so pair<int, 
void*>(0, (void*)0);<br>
<br>------<br><br>Last there is a gazillion errors around the fact that 
Microsoft for some crazy stupid reason has defined setjmp to _setjmp, 
and thus the generated intrinsics.gen goes completely insane everywhere.
 I'm sure this is a legacy thing in visual studios libraries, but wow...<br>
<br>Anyway, my solution to this was to make a 'intrinsics.gen.proxy', 
which undefs that macro and then includes the intrinsics.gen, and then 
all includes to intrinsics.gen, I modified to include the proxy. This 
guarantees that at least the Instrinsic namespace is always setup 
correctly... and you're left with a couple other files where it still 
seems to be defined, so I just undef'ed it for the whole file in those 
files as well... <br>
<br>Is there any interest in these changes applied to trunk? and if so 
how do I proceed... I'm fine keeping these changes local and integrate, 
but I figure there is more users out there wanting to move to VS2010 at 
some point.<br><font color="#888888"><font color="#888888">
<br>Tom.<br><br></font></font><div><div></div><div class="h5"><br><div class="gmail_quote">On Sat, May 1, 2010 at 7:59 PM, Tom van Dijck <span dir="ltr"><<a href="mailto:llvm@tomvandijck.com" target="_blank">llvm@tomvandijck.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hey, <br><br>Downloaded the release, used CMake to create solution... building mostly seems to be OK, except for a couple of compiler errors.<br><br><br>warning C4090: 'function' : different 'const' qualifiers    d:\companyone\external\llvm\source\llvm-2.7\lib\support\regengine.inc    188<br>


error C2248: 'llvm::EquivalenceClasses<ElemTy>::ECValue::ECValue' : cannot access private member declared in class 'llvm::EquivalenceClasses<ElemTy>::ECValue'    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory    208<br>


error C2668: 'llvm::next' : ambiguous call to overloaded function    D:\CompanyOne\External\LLVM\source\llvm-2.7\lib\Transforms\Scalar\LoopStrengthReduce.cpp    2820<br>error C2440: 'initializing' : cannot convert from 'int' to 'const llvm::TargetRegisterClass *'    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility    163<br>


error C2439: 'std::_Pair_base<_Ty1,_Ty2>::second' : member could not be initialized    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility    163<br><br>it totals to 15 build errors and 2 warnings, but most of them are repeats of the above 5..<br>


Are these known issues? Or did I fail to set some setting?<br><br>3 of the errors come from usage of templates, hence the file names end up somewhere in the VS SDK, I can provide more details if required though..<br><font color="#888888"><br>

Tom.<br>
<br><br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>