Add support for hashing location information for CU level hashes.
Add a testcase based on sret.cpp where we can now hash the entire
compile unit.
llvm-svn: 203319
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 0dadb73..b8cfdd3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -588,9 +588,6 @@
/// \brief Emit visible names into a debug str section.
void emitDebugStr();
- /// \brief Emit an entry for the debug loc section.
- void emitDebugLocEntry(ByteStreamer &Streamer, const DotDebugLocEntry &Entry);
-
/// \brief Emit visible names into a debug loc section.
void emitDebugLoc();
@@ -761,6 +758,15 @@
/// Returns the section symbol for the .debug_loc section.
MCSymbol *getDebugLocSym() const { return DwarfDebugLocSectionSym; }
+ /// Returns the entries for the .debug_loc section.
+ const SmallVectorImpl<DotDebugLocEntry> &getDebugLocEntries() const {
+ return DotDebugLocEntries;
+ }
+
+ /// \brief Emit an entry for the debug loc section. This can be used to
+ /// handle an entry that's going to be emitted into the debug loc section.
+ void emitDebugLocEntry(ByteStreamer &Streamer, const DotDebugLocEntry &Entry);
+
/// Find the MDNode for the given reference.
template <typename T> T resolve(DIRef<T> Ref) const {
return Ref.resolve(TypeIdentifierMap);