[LLVMdev] Patch to compile LLVM with MSVC 2010
Sergiy Migdalskiy
migdalskiy at hotmail.com
Wed Apr 17 11:36:55 PDT 2013
In order to get llvm to compile on Windows with MSVC 10, I have to disable inline on utostr to avoid internal compiler failure, and disable _xgetbv call in OsSupportsAVX because it's only defined in MSVC 2012 compiler. The first patch (noinline) is known for many months now. I'm a casual llvm user, and don't know the proper channels to go through to submit a patch. Could someone tell me, where do I submit patches like this one below? Or maybe why I shouldn't try to do it.
Sincerely,Sergiy
Index: include/llvm/ADT/StringExtras.h===================================================================--- include/llvm/ADT/StringExtras.h (revision 179701)+++ include/llvm/ADT/StringExtras.h (working copy)@@ -84,7 +84,7 @@ return std::string(BufPtr, Buffer+11); } -static inline std::string utostr(uint64_t X, bool isNeg = false) {+static __declspec(noinline) inline std::string utostr(uint64_t X, bool isNeg = false) { char Buffer[21]; char *BufPtr = Buffer+21; Index: lib/Support/Host.cpp===================================================================--- lib/Support/Host.cpp (revision 179701)+++ lib/Support/Host.cpp (working copy)@@ -119,7 +119,7 @@ // there is no easy way to conditionally compile based on the assembler used. int rEAX, rEDX; __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a" (rEAX), "=d" (rEDX) : "c" (0));-#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219+#elif defined(_MSC_FULL_VER) && _MSC_FULL_VER > 160040219 unsigned long long rEAX = _xgetbv(_XCR_XFEATURE_ENABLED_MASK); #else int rEAX = 0; // Ensures we return false
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130417/6a8c8691/attachment.html>
More information about the llvm-dev
mailing list