]> granicus.if.org Git - llvm/commitdiff
Fix warnings from test added in r301562 on Windows (when built without exceptions).
authorFrederich Munch <colsebas@hotmail.com>
Thu, 27 Apr 2017 17:33:50 +0000 (17:33 +0000)
committerFrederich Munch <colsebas@hotmail.com>
Thu, 27 Apr 2017 17:33:50 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301571 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/DynamicLibrary/PipSqueak.cxx

index 1de85236a889a38bf116d169f84d36cd5dfca6cb..c54de6759dc37fe1d8837d6d3d995cb724220edd 100644 (file)
@@ -8,7 +8,17 @@
 //===----------------------------------------------------------------------===//
 
 #include "PipSqueak.h"
+
+#ifdef _WIN32
+// Disable warnings from inclusion of xlocale & exception
+#pragma warning(push)
+#pragma warning(disable: 4530)
+#pragma warning(disable: 4577)
+#include <string>
+#pragma warning(pop)
+#else
 #include <string>
+#endif
 
 struct Global {
   std::string *Str;