Avoid passing nullptr to std::equal.
authorYaron Keren <yaron.keren@gmail.com>
Tue, 4 Aug 2015 15:57:04 +0000 (15:57 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Tue, 4 Aug 2015 15:57:04 +0000 (15:57 +0000)
commita639e155a28014a7b5af8198f775dc2a1e368450
tree276d126888b650d7461097ce0bac683b3985e06c
parent0d2030d07ecd6fe7662a988e7fafacf43a2e8185
Avoid passing nullptr to std::equal.
As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts
on this in Debug mode. This happens when building clang with Visual C++ and
-triple i686-pc-windows-gnu on these clang regression tests:

 clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c
 clang/test/CodeGen/empty-union-init.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Type.cpp