<div class="gmail_quote">2009/7/30 Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Author: ddunbar<br>Date: Wed Jul 29 23:20:37 2009<br>New Revision: 77579<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=77579&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=77579&view=rev</a><br>

Log:<br>Switch obvious clients to Twine instead of utostr (when they were already using<br>a Twine, e.g., for names).<br> - I am a little ambivalent about this; we don't want the string conversion of<br>  utostr, but using overload '+' mixed with string and integer arguments is<br>

  sketchy. On the other hand, this particular usage is something of an idiom.</blockquote>
<div> </div>
<div>Daniel, </div>
<div> </div>
<div>I am getting the following error on Cygwin using GCC 4.2.2 :-</div>
<div> </div>
<div>~~~~~~~~~~~~~~~~~</div>
<div>llvm[3]: Compiling PromoteMemoryToRegister.cpp for Debug build<br>/home/ang/svn/llvm-coff/lib/Transforms/Utils/PromoteMemoryToRegister.cpp: In mem<br>ber function 'bool<unnamed>::PromoteMem2Reg::QueuePhiNode(llvm::BasicBlock*, uns<br>

igned int, unsigned int&, llvm::SmallPtrSet<llvm::PHINode*, 16u>&)':<br>/home/ang/svn/llvm-coff/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:870: er<br>ror: conversion from 'unsigned int' to 'const llvm::Twine' is ambiguous<br>

/home/ang/svn/llvm-coff/include/llvm/ADT/Twine.h:270: note: candidates are: llvm<br>::Twine::Twine(const int64_t&)<br>/home/ang/svn/llvm-coff/include/llvm/ADT/Twine.h:265: note:  llvm::Twine::Twine(<br>const uint64_t&)<br>

/home/ang/svn/llvm-coff/include/llvm/ADT/Twine.h:260: note:  llvm::Twine::Twine(<br>const int32_t&)<br>/home/ang/svn/llvm-coff/include/llvm/ADT/Twine.h:255: note:  llvm::Twine::Twine(<br>const uint32_t&)<br>make[3]: *** [/home/ang/build/llvm-coff/lib/Transforms/Utils/Debug/PromoteMemory<br>

ToRegister.o] Error 1<br>make[3]: Leaving directory `/home/ang/build/llvm-coff/lib/Transforms/Utils'<br>make[2]: *** [Utils/.makeall] Error 2<br>make[2]: Leaving directory `/home/ang/build/llvm-coff/lib/Transforms'<br>

make[1]: *** [Transforms/.makeall] Error 2<br>make[1]: Leaving directory `/home/ang/build/llvm-coff/lib'<br>make: *** [all] Error 1</div>
<div>~~~~~~~~~~~~~~~~~~</div>
<div> </div>
<div>Its working fine on MSVC 2008, but Cygwin GCC 4.2.2 is failing to resolve the typing here.</div>
<div> </div>
<div>Transforms/Utils/PromoteMemoryToRegister.cpp </div>
<div> </div>
<div>I had to hack it with :-</div>
<div> </div>
<div>  PN = PHINode::Create(Allocas[AllocaNo]->getAllocatedType(),<br>                       Allocas[AllocaNo]->getName() + "." + Twine((uint32_t)Version++),<br>                       BB->begin());<br>

</div>
<div>  
<div>    To get it to compile on Cygwin, maybe 'Version' should be a uint32_t ?</div></div>
<div> </div>
<div>Transforms/Scalar/ScalarReplAggregates.cpp </div>
<div>Transforms/IPO/ArgumentPromotion.cpp</div>
<div>Transforms/IPO/GlobalOpt.cpp</div>
<div>    Twine constructors and uint32_t types or casts.</div>
<div> </div>
<div>I have done a patch but its a bit insane tab wise it seems to be removing all tabs from blank lines.</div>
<div> </div>
<div>Also the actual logic I have used is a "just get it working logic", so beware :)</div>
<div> </div>
<div>Aaron</div>
<div> </div></div>