Revert 285087.
authorNico Weber <nicolasweber@gmx.de>
Tue, 25 Oct 2016 17:46:29 +0000 (17:46 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 25 Oct 2016 17:46:29 +0000 (17:46 +0000)
The sanitizer-windows bot turned red with:

FAILED: utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\cl.exe ... -c
    C:\...\llvm\utils\TableGen\IntrinsicEmitter.cpp
c:\...\llvm\utils\tablegen\intrinsicemitter.cpp(254) :
  fatal error C1001: An internal error has occurred in the compiler.
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/114/steps/build%20clang%20lld/logs/stdio

llvm-svn: 285089

llvm/utils/TableGen/IntrinsicEmitter.cpp

index 9b83696..60cd2da 100644 (file)
@@ -250,6 +250,10 @@ static void EncodeFixedValueType(MVT::SimpleValueType VT,
   }
 }
 
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma optimize("",off) // MSVC 2015 optimizer can't deal with this function.
+#endif
+
 static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
                             std::vector<unsigned char> &Sig) {
 
@@ -337,6 +341,10 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
   EncodeFixedValueType(VT, Sig);
 }
 
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma optimize("",on)
+#endif
+
 /// ComputeFixedEncoding - If we can encode the type signature for this
 /// intrinsic into 32 bits, return it.  If not, return ~0U.
 static void ComputeFixedEncoding(const CodeGenIntrinsic &Int,