OSDN Git Service

ValueMapper: Make LocalAsMetadata match function-local Values
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 01:08:39 +0000 (01:08 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 01:08:39 +0000 (01:08 +0000)
commita10355896bab41256bad5bba96640e57abeb4321
tree30a4f8c8de2d6babba09637e4710e32e9c31882f
parent718731772fb5833dc844297aac431db36cc70e74
ValueMapper: Make LocalAsMetadata match function-local Values

Start treating LocalAsMetadata similarly to function-local members of
the Value hierarchy in MapValue and MapMetadata.

  - Don't memoize them.
  - Return nullptr if they are missing.

This also cleans up ConstantAsMetadata to stop listening to the
RF_IgnoreMissingLocals flag.

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