aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/DebugInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/DebugInfo.h')
-rw-r--r--include/llvm/IR/DebugInfo.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/llvm/IR/DebugInfo.h b/include/llvm/IR/DebugInfo.h
index 65e0a06..088eb9f 100644
--- a/include/llvm/IR/DebugInfo.h
+++ b/include/llvm/IR/DebugInfo.h
@@ -690,12 +690,17 @@ public:
/// HasComplexAddr - Return true if the variable has a complex address.
bool hasComplexAddress() const { return getNumAddrElements() > 0; }
- unsigned getNumAddrElements() const;
-
- uint64_t getAddrElement(unsigned Idx) const {
- return getUInt64Field(Idx + 8);
+ /// \brief Return the size of this variable's complex address or
+ /// zero if there is none.
+ unsigned getNumAddrElements() const {
+ if (DbgNode->getNumOperands() < 9)
+ return 0;
+ return getDescriptorField(8)->getNumOperands();
}
+ /// \brief return the Idx'th complex address element.
+ uint64_t getAddrElement(unsigned Idx) const;
+
/// isBlockByrefVariable - Return true if the variable was declared as
/// a "__block" variable (Apple Blocks).
bool isBlockByrefVariable(const DITypeIdentifierMap &Map) const {
@@ -929,6 +934,9 @@ private:
/// Specify if TypeIdentifierMap is initialized.
bool TypeMapInitialized;
};
+
+DenseMap<const Function *, DISubprogram> makeSubprogramMap(const Module &M);
+
} // end namespace llvm
#endif