1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[LLVM][Alignment] Fix MSVC potential division by 0 warning (PR42911)

Original Patch by @gchatelet (Guillaume Chatelet)

Differential Revision: https://reviews.llvm.org/D65859

llvm-svn: 369016
This commit is contained in:
Simon Pilgrim 2019-08-15 16:34:23 +00:00
parent c2a5b4b260
commit 6274984500

View File

@ -11,6 +11,12 @@
#include <vector>
#ifdef _MSC_VER
// Disable warnings about potential divide by 0.
#pragma warning(push)
#pragma warning(disable : 4723)
#endif
using namespace llvm;
namespace {
@ -298,3 +304,7 @@ TEST(AlignmentDeathTest, CompareAlignToUndefMaybeAlign) {
#endif // NDEBUG
} // end anonymous namespace
#ifdef _MSC_VER
#pragma warning(pop)
#endif