OSDN Git Service

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)
commit5c7a97c89b5a16d117aa252e8f77822ef69760d7
treeea18e5cb665e234a2602aa21d5d27d870e851256
parenta10355896bab41256bad5bba96640e57abeb4321
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265633 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/ValueMapper.h
lib/Transforms/Utils/ValueMapper.cpp
unittests/Transforms/Utils/ValueMapperTest.cpp