[llvm] [DebugInfo][DwarfDebug] Separate creation and population of abstract subprogram DIEs (PR #159104)
    David Blaikie via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 16 14:03:00 PDT 2025
    
    
  
================
@@ -143,12 +143,19 @@ class LexicalScopes {
 public:
   LexicalScopes() = default;
 
-  /// initialize - Scan machine function and constuct lexical scope nest, resets
-  /// the instance if necessary.
-  LLVM_ABI void initialize(const MachineFunction &);
+  /// initialize - Scan module to build subprogram-to-function map.
+  LLVM_ABI void initialize(const Module &);
 
-  /// releaseMemory - release memory.
-  LLVM_ABI void reset();
+  /// scanFunction - Scan machine function and constuct lexical scope nest,
+  /// resets the instance if necessary.
+  LLVM_ABI void scanFunction(const MachineFunction &);
+
+  /// resetModule - Reset the instance so that it's prepared for another module.
+  LLVM_ABI void resetModule();
+
+  /// functionReset - Reset the instance so that it's prepared for another
----------------
dwblaikie wrote:
```suggestion
  /// resetFunction - Reset the instance so that it's prepared for another
```
Though, actually, the LLVM coding standards state that the function name should be omitted - perhaps partly for this sort of reason (it can't get out of sync if it's not written): https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
But I see the names are in other doc comments in this file, so it might look out of place for some to be present and some omitted.
Up to you how you want to go there - don't fix all the others in this patch, but idf you wanted to fix them before/after this patch, that'd be OK. Otherwise I don't mind if you prefer to be consistent with existing practice (with the naming correction here) or diverge and omit the name - I don't mind the inconsistency terribly much here.
https://github.com/llvm/llvm-project/pull/159104
    
    
More information about the llvm-commits
mailing list