ValueMapper: Allow RF_IgnoreMissingLocals and RF_NullMapMissingGlobalValues
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 01:22:45 +0000 (01:22 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 01:22:45 +0000 (01:22 +0000)
commitfdccad925c91aa981c097f51e3790069dcd0a49a
tree817a6908fdd6c76bb2160fcbe83acdadfcdfe1f7
parent4775fcfa4ee817e061dcedcb4b47fa5d9e39e53d
ValueMapper: Allow RF_IgnoreMissingLocals and RF_NullMapMissingGlobalValues

Remove the assertion that disallowed the combination, since
RF_IgnoreMissingLocals should have no effect on globals.  As it happens,
RF_NullMapMissingGlobalValues asserted in MapValue(Constant*,...), so I
also changed a cast to a cast_or_null to get my test passing.

llvm-svn: 265633
llvm/include/llvm/Transforms/Utils/ValueMapper.h
llvm/lib/Transforms/Utils/ValueMapper.cpp
llvm/unittests/Transforms/Utils/ValueMapperTest.cpp