[llvm] [libDebugInfo] Prevent infinite recursion in DWARFDie::getTypeSize() (PR #74681)

Cyndy Ishida via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 16:44:18 PST 2023


================
@@ -284,7 +285,9 @@ class DWARFDie {
   /// \param PointerSize the pointer size of the containing CU.
   /// \returns if this is a type DIE, or this DIE contains a DW_AT_type, returns
   /// the size of the type.
-  std::optional<uint64_t> getTypeSize(uint64_t PointerSize);
+  std::optional<uint64_t>
+  getTypeSize(uint64_t PointerSize,
+              llvm::SmallPtrSetImpl<const DWARFDebugInfoEntry *> &visited);
----------------
cyndyishida wrote:

Assuming this should follow llvm style guidelines 
nit: s/visited/Visited

https://github.com/llvm/llvm-project/pull/74681


More information about the llvm-commits mailing list