diff options
| author | Devang Patel <dpatel@apple.com> | 2011-07-19 01:03:32 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2011-07-19 01:03:32 +0000 |
| commit | ac532dedf1fe89b8ded9920f202829f4dc20fade (patch) | |
| tree | c04880925e61b0994ebf6fcaed20417b7dc9676a /llvm/include | |
| parent | 206f5093e30d7287bcc421f4138b59bc992365ac (diff) | |
| download | bcm5719-llvm-ac532dedf1fe89b8ded9920f202829f4dc20fade.tar.gz bcm5719-llvm-ac532dedf1fe89b8ded9920f202829f4dc20fade.zip | |
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
llvm-svn: 135457
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Analysis/DebugInfo.h | 11 | ||||
| -rw-r--r-- | llvm/include/llvm/Support/Dwarf.h | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h index fbee5a6311e..77b95dbc2ee 100644 --- a/llvm/include/llvm/Analysis/DebugInfo.h +++ b/llvm/include/llvm/Analysis/DebugInfo.h @@ -628,7 +628,9 @@ namespace llvm { uint64_t getAddrElement(unsigned Idx) const { if (getVersion() <= llvm::LLVMDebugVersion8) return getUInt64Field(Idx+6); - return getUInt64Field(Idx+7); + if (getVersion() == llvm::LLVMDebugVersion9) + return getUInt64Field(Idx+7); + return getUInt64Field(Idx+8); } /// isBlockByrefVariable - Return true if the variable was declared as @@ -716,6 +718,13 @@ namespace llvm { /// suitable to hold function specific information. NamedMDNode *getFnSpecificMDNode(const Module &M, StringRef Name); + /// createInlinedVariable - Create a new inlined variable based on current + /// variable. + /// @param DV Current Variable. + /// @param InlinedScope Location at current variable is inlined. + DIVariable createInlinedVariable(MDNode *DV, MDNode *InlinedScope, + LLVMContext &VMContext); + class DebugInfoFinder { public: /// processModule - Process entire module and collect debug info diff --git a/llvm/include/llvm/Support/Dwarf.h b/llvm/include/llvm/Support/Dwarf.h index 70bac0c9fc8..3c76902c842 100644 --- a/llvm/include/llvm/Support/Dwarf.h +++ b/llvm/include/llvm/Support/Dwarf.h @@ -22,8 +22,9 @@ namespace llvm { // Debug info constants. enum { - LLVMDebugVersion = (9 << 16), // Current version of debug information. - LLVMDebugVersion8 = (8 << 16), // Cconstant for version 8. + LLVMDebugVersion = (10 << 16), // Current version of debug information. + LLVMDebugVersion9 = (9 << 16), // Constant for version 9. + LLVMDebugVersion8 = (8 << 16), // Constant for version 8. LLVMDebugVersion7 = (7 << 16), // Constant for version 7. LLVMDebugVersion6 = (6 << 16), // Constant for version 6. LLVMDebugVersion5 = (5 << 16), // Constant for version 5. |

