[PATCH] D38964: [TableGen] Workaround for VS 2015 Update 3 RelWithDebInfo build

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 10:47:40 PDT 2017


andrewng created this revision.
Herald added a subscriber: mehdi_amini.

Commit r315884 introduced a build issue for VS 2015 Update 3 in the
RelWithDebInfo build. The issue is a fatal internal error in the CL
compiler caused by the following line of code in the function
OperandMatcher::addTypeCheckPredicate:

  addPredicate<LLTOperandMatcher>(*OpTyOrNone);

The workaround is to replace *OpTyOrNone with a local variable of type
const LLTCodeGen & referring to *OpTyOrNone.


https://reviews.llvm.org/D38964

Files:
  utils/TableGen/GlobalISelEmitter.cpp


Index: utils/TableGen/GlobalISelEmitter.cpp
===================================================================
--- utils/TableGen/GlobalISelEmitter.cpp
+++ utils/TableGen/GlobalISelEmitter.cpp
@@ -994,8 +994,12 @@
     if (OperandIsAPointer)
       addPredicate<PointerToAnyOperandMatcher>(
           OpTyOrNone->get().getSizeInBits());
-    else
-      addPredicate<LLTOperandMatcher>(*OpTyOrNone);
+    else {
+      // The following local variable is not needed but is a workaround for a VS
+      // 2015 Update 3 CL internal error when building RelWithDebInfo.
+      const LLTCodeGen &OpTy = *OpTyOrNone;
+      addPredicate<LLTOperandMatcher>(OpTy);
+    }
     return Error::success();
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38964.119176.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171016/e1f5bdd8/attachment.bin>


More information about the llvm-commits mailing list