diff options
| author | Stephen Hines <srhines@google.com> | 2013-03-18 17:36:31 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2013-03-18 17:36:31 -0700 |
| commit | 2d4629c5d7dcc6582fa7b85a517744f1a3654eba (patch) | |
| tree | 90c0395880593bf195fb818c2af1139cb7e846df /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
| parent | cd4c0bff77a9b5617896982e99dc80f469e26e4f (diff) | |
| parent | 242cec5be3b3a715de0535d1a074bb4dff94772f (diff) | |
| download | external_llvm-2d4629c5d7dcc6582fa7b85a517744f1a3654eba.zip external_llvm-2d4629c5d7dcc6582fa7b85a517744f1a3654eba.tar.gz external_llvm-2d4629c5d7dcc6582fa7b85a517744f1a3654eba.tar.bz2 | |
Merge branch 'upstream' into merge_2013_03_18
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 7b56815..81e345e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -274,6 +274,10 @@ public: /// \brief Returns the address pool. AddrPool *getAddrPool() { return &AddressPool; } + + /// \brief for a given compile unit DIE, returns offset from beginning of + /// debug info. + unsigned getCUOffset(DIE *Die); }; /// \brief Collects and handles dwarf debug information. @@ -305,7 +309,9 @@ class DwarfDebug { // A list of all the unique abbreviations in use. std::vector<DIEAbbrev *> Abbreviations; - // Source id map, i.e. pair of source filename and directory, + // Stores the current file ID for a given compile unit. + DenseMap <unsigned, unsigned> FileIDCUMap; + // Source id map, i.e. CUID, source filename and directory, // separated by a zero byte, mapped to a unique id. StringMap<unsigned, BumpPtrAllocator&> SourceIdMap; @@ -596,14 +602,6 @@ public: DwarfDebug(AsmPrinter *A, Module *M); ~DwarfDebug(); - /// \brief Collect debug info from named mdnodes such as llvm.dbg.enum - /// and llvm.dbg.ty - void collectInfoFromNamedMDNodes(const Module *M); - - /// \brief Collect debug info using DebugInfoFinder. - /// FIXME - Remove this when DragonEgg switches to DIBuilder. - bool collectLegacyDebugInfo(const Module *M); - /// \brief Emit all Dwarf sections that should come prior to the /// content. void beginModule(); @@ -626,7 +624,8 @@ public: /// \brief Look up the source id with the given directory and source file /// names. If none currently exists, create a new id and insert it in the /// SourceIds map. - unsigned getOrCreateSourceID(StringRef DirName, StringRef FullName); + unsigned getOrCreateSourceID(StringRef DirName, StringRef FullName, + unsigned CUID); /// \brief Recursively Emits a debug information entry. void emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs); |
