diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /include/llvm/CodeGen/MachineModuleInfo.h | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 460c08c..28f4544 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -35,14 +35,14 @@ #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/IR/DebugLoc.h" #include "llvm/IR/Metadata.h" +#include "llvm/IR/ValueHandle.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MachineLocation.h" #include "llvm/Pass.h" #include "llvm/Support/DataTypes.h" -#include "llvm/Support/DebugLoc.h" #include "llvm/Support/Dwarf.h" -#include "llvm/Support/ValueHandle.h" namespace llvm { @@ -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. @@ -180,8 +183,8 @@ public: ~MachineModuleInfo(); // Initialization and Finalization - virtual bool doInitialization(Module &); - virtual bool doFinalization(Module &); + bool doInitialization(Module &) override; + bool doFinalization(Module &) override; /// EndFunction - Discard function meta information. /// @@ -238,8 +241,10 @@ public: return FrameInstructions; } - void addFrameInst(const MCCFIInstruction &Inst) { + unsigned LLVM_ATTRIBUTE_UNUSED_RESULT + addFrameInst(const MCCFIInstruction &Inst) { FrameInstructions.push_back(Inst); + return FrameInstructions.size() - 1; } /// getCompactUnwindEncoding - Returns the compact unwind encoding for a @@ -399,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 |