diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h index 1455ac417824..4c03bf79d04d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h @@ -20,9 +20,11 @@ #include "llvm/ADT/MapVector.h" #include "llvm/ADT/PointerUnion.h" #include "llvm/ADT/SetVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/DbgEntityHistoryCalculator.h" #include "llvm/CodeGen/DebugHandlerBase.h" +#include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/DebugInfo/CodeView/CodeView.h" #include "llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h" #include "llvm/DebugInfo/CodeView/TypeIndex.h" @@ -133,6 +135,15 @@ private: StringRef Name; }; + struct JumpTableInfo { + codeview::JumpTableEntrySize EntrySize; + const MCSymbol *Base; + uint64_t BaseOffset; + const MCSymbol *Branch; + const MCSymbol *Table; + size_t TableSize; + }; + // For each function, store a vector of labels to its instructions, as well as // to the end of the function. struct FunctionInfo { @@ -148,6 +159,9 @@ private: /// Ordered list of top-level inlined call sites. SmallVector<const DILocation *, 1> ChildSites; + /// Set of all functions directly inlined into this one. + SmallSet<codeview::TypeIndex, 1> Inlinees; + SmallVector<LocalVariable, 1> Locals; SmallVector<CVGlobalVariable, 1> Globals; @@ -160,6 +174,8 @@ private: std::vector<std::tuple<const MCSymbol *, const MCSymbol *, const DIType *>> HeapAllocSites; + std::vector<JumpTableInfo> JumpTables; + const MCSymbol *Begin = nullptr; const MCSymbol *End = nullptr; unsigned FuncId = 0; @@ -359,6 +375,8 @@ private: void emitInlinedCallSite(const FunctionInfo &FI, const DILocation *InlinedAt, const InlineSite &Site); + void emitInlinees(const SmallSet<codeview::TypeIndex, 1> &Inlinees); + using InlinedEntity = DbgValueHistoryMap::InlinedEntity; void collectGlobalVariableInfo(); @@ -478,6 +496,10 @@ private: unsigned getPointerSizeInBytes(); + void discoverJumpTableBranches(const MachineFunction *MF, bool isThumb); + void collectDebugInfoForJumpTables(const MachineFunction *MF, bool isThumb); + void emitDebugInfoForJumpTables(const FunctionInfo &FI); + protected: /// Gather pre-function debug information. void beginFunctionImpl(const MachineFunction *MF) override; |
