summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/IRMover.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2015-12-29 23:00:22 +0000
committerTeresa Johnson <tejohnson@google.com>2015-12-29 23:00:22 +0000
commit61b406ec755eb1e97a9abcaf7bf1d6416ba927a8 (patch)
treef483b7831665b7c99044e4efeaf2d34b9de11a82 /llvm/lib/Linker/IRMover.cpp
parent8de2f0cf01331620a2a3764eedc04b8a67781636 (diff)
downloadbcm5719-llvm-61b406ec755eb1e97a9abcaf7bf1d6416ba927a8.tar.gz
bcm5719-llvm-61b406ec755eb1e97a9abcaf7bf1d6416ba927a8.zip
Rename MDValue* to Metadata* (NFC)
Renamed MDValue* to Metadata*, and MDValueToValIDMap to MetadataToIDs, as per review for r255909. llvm-svn: 256593
Diffstat (limited to 'llvm/lib/Linker/IRMover.cpp')
-rw-r--r--llvm/lib/Linker/IRMover.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index 4a31c4a1a97..fa6e37517fc 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -415,7 +415,7 @@ class IRLinker {
/// the value id. Used to correlate temporary metadata created during
/// function importing with the final metadata parsed during the subsequent
/// metadata linking postpass.
- DenseMap<const Metadata *, unsigned> MDValueToValIDMap;
+ DenseMap<const Metadata *, unsigned> MetadataToIDs;
/// Association between metadata value id and temporary metadata that
/// remains unmapped after function importing. Saved during function
@@ -642,8 +642,8 @@ Metadata *IRLinker::mapTemporaryMetadata(Metadata *MD) {
return nullptr;
// If this temporary metadata has a value id recorded during function
// parsing, record that in the ValIDToTempMDMap if one was provided.
- if (MDValueToValIDMap.count(MD)) {
- unsigned Idx = MDValueToValIDMap[MD];
+ if (MetadataToIDs.count(MD)) {
+ unsigned Idx = MetadataToIDs[MD];
// Check if we created a temp MD when importing a different function from
// this module. If so, reuse it the same temporary metadata, otherwise
// add this temporary metadata to the map.
@@ -669,8 +669,8 @@ void IRLinker::replaceTemporaryMetadata(const Metadata *OrigMD,
// created during function importing was provided, and the source
// metadata has a value id recorded during metadata parsing, replace
// the temporary metadata with the final mapped metadata now.
- if (MDValueToValIDMap.count(OrigMD)) {
- unsigned Idx = MDValueToValIDMap[OrigMD];
+ if (MetadataToIDs.count(OrigMD)) {
+ unsigned Idx = MetadataToIDs[OrigMD];
// Nothing to do if we didn't need to create a temporary metadata during
// function importing.
if (!ValIDToTempMDMap->count(Idx))
@@ -1111,7 +1111,7 @@ bool IRLinker::linkFunctionBody(Function &Dst, Function &Src) {
// a function and before remapping metadata on instructions below
// in RemapInstruction, as the saved mapping is used to handle
// the temporary metadata hanging off instructions.
- SrcM.getMaterializer()->saveMDValueList(MDValueToValIDMap, true);
+ SrcM.getMaterializer()->saveMetadataList(MetadataToIDs, true);
// Link in the prefix data.
if (Src.hasPrefixData())
@@ -1210,7 +1210,7 @@ void IRLinker::findNeededSubprograms(ValueToValueMapTy &ValueMap) {
// importing), see which DISubprogram MD from the source has an associated
// temporary metadata node, which means the SP was needed by an imported
// function.
- for (auto MDI : MDValueToValIDMap) {
+ for (auto MDI : MetadataToIDs) {
const MDNode *Node = dyn_cast<MDNode>(MDI.first);
if (!Node)
continue;
@@ -1514,7 +1514,7 @@ bool IRLinker::run() {
// Ensure metadata materialized
if (SrcM.getMaterializer()->materializeMetadata())
return true;
- SrcM.getMaterializer()->saveMDValueList(MDValueToValIDMap, false);
+ SrcM.getMaterializer()->saveMetadataList(MetadataToIDs, false);
}
linkNamedMDNodes();
@@ -1523,10 +1523,10 @@ bool IRLinker::run() {
// Handle anything left in the ValIDToTempMDMap, such as metadata nodes
// not reached by the dbg.cu NamedMD (i.e. only reached from
// instructions).
- // Walk the MDValueToValIDMap once to find the set of new (imported) MD
+ // Walk the MetadataToIDs once to find the set of new (imported) MD
// that still has corresponding temporary metadata, and invoke metadata
// mapping on each one.
- for (auto MDI : MDValueToValIDMap) {
+ for (auto MDI : MetadataToIDs) {
if (!ValIDToTempMDMap->count(MDI.second))
continue;
MapMetadata(MDI.first, ValueMap, ValueMapperFlags, &TypeMap,
OpenPOWER on IntegriCloud