summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-09 15:44:39 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-09 15:44:39 +0000
commit1ceef0ef50118a1a89f8752f7461fc759d84ce1c (patch)
tree19e505c7dda3afbb1ed1051b8f294ff6211377ab /include/llvm/CodeGen
parent4b484628f452dcd119ad855f114ca29d26829d90 (diff)
downloadllvm-1ceef0ef50118a1a89f8752f7461fc759d84ce1c.tar.gz
llvm-1ceef0ef50118a1a89f8752f7461fc759d84ce1c.tar.bz2
llvm-1ceef0ef50118a1a89f8752f7461fc759d84ce1c.tar.xz
MachineModuleInfo: Turn nested std::pairs into a proper struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 0cd24abde6..28f4544137 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -168,10 +168,13 @@ class MachineModuleInfo : public ImmutablePass {
public:
static char ID; // Pass identification, replacement for typeid
- typedef std::pair<unsigned, DebugLoc> UnsignedDebugLocPair;
- typedef SmallVector<std::pair<TrackingVH<MDNode>, UnsignedDebugLocPair>, 4>
- VariableDbgInfoMapTy;
- VariableDbgInfoMapTy VariableDbgInfo;
+ struct VariableDbgInfo {
+ TrackingVH<MDNode> Var;
+ unsigned Slot;
+ DebugLoc Loc;
+ };
+ typedef SmallVector<VariableDbgInfo, 4> VariableDbgInfoMapTy;
+ VariableDbgInfoMapTy VariableDbgInfos;
MachineModuleInfo(); // DUMMY CONSTRUCTOR, DO NOT CALL.
// Real constructor.
@@ -401,10 +404,11 @@ public:
/// setVariableDbgInfo - Collect information used to emit debugging
/// information of a variable.
void setVariableDbgInfo(MDNode *N, unsigned Slot, DebugLoc Loc) {
- VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc)));
+ VariableDbgInfo Info = { N, Slot, Loc };
+ VariableDbgInfos.push_back(std::move(Info));
}
- VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; }
+ VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfos; }
}; // End class MachineModuleInfo