diff options
author | Kaelyn Takata <rikka@google.com> | 2014-12-09 23:32:46 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2014-12-09 23:32:46 +0000 |
commit | 22324f378ad38a1ad4fca9b4f210400e0f6aa634 (patch) | |
tree | 21e528114995873b1d82d5ea41e5fbfcda3de06d /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
parent | b511603281a394c74c6cfcd33835c18d8f57649c (diff) | |
download | bcm5719-llvm-22324f378ad38a1ad4fca9b4f210400e0f6aa634.tar.gz bcm5719-llvm-22324f378ad38a1ad4fca9b4f210400e0f6aa634.zip |
Rename static functiom "map" to be more descriptive and to avoid
potential confusion with the std::map type.
llvm-svn: 223853
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index d735e279d08..7e60b1c18ff 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -144,14 +144,14 @@ Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM, RemapFlags Flags, return VM[V] = ConstantPointerNull::get(cast<PointerType>(NewTy)); } -static Metadata *map(ValueToValueMapTy &VM, const Metadata *Key, +static Metadata *mapToMetadata(ValueToValueMapTy &VM, const Metadata *Key, Metadata *Val) { VM.MD()[Key].reset(Val); return Val; } static Metadata *mapToSelf(ValueToValueMapTy &VM, const Metadata *MD) { - return map(VM, MD, const_cast<Metadata *>(MD)); + return mapToMetadata(VM, MD, const_cast<Metadata *>(MD)); } static Metadata *MapValueImpl(const Metadata *MD, ValueToValueMapTy &VM, @@ -182,7 +182,7 @@ static Metadata *MapValueImpl(const Metadata *MD, ValueToValueMapTy &VM, // // assert(MappedV && "Referenced metadata not in value map!"); if (MappedV) - return map(VM, MD, ValueAsMetadata::get(MappedV)); + return mapToMetadata(VM, MD, ValueAsMetadata::get(MappedV)); return nullptr; } @@ -214,7 +214,7 @@ static Metadata *MapValueImpl(const Metadata *MD, ValueToValueMapTy &VM, // Create a dummy node in case we have a metadata cycle. MDNodeFwdDecl *Dummy = MDNode::getTemporary(Node->getContext(), None); - map(VM, Node, Dummy); + mapToMetadata(VM, Node, Dummy); // Check all operands to see if any need to be remapped. for (unsigned I = 0, E = Node->getNumOperands(); I != E; ++I) { @@ -232,7 +232,7 @@ static Metadata *MapValueImpl(const Metadata *MD, ValueToValueMapTy &VM, MDNode *NewMD = MDNode::get(Node->getContext(), Elts); Dummy->replaceAllUsesWith(NewMD); MDNode::deleteTemporary(Dummy); - return map(VM, Node, NewMD); + return mapToMetadata(VM, Node, NewMD); } // No operands needed remapping. Use an identity mapping. |