Author: shafik
Date: 2020-01-24T14:01:15-08:00
New Revision: 118efa5cda868604f3507760ca061f69b0050b19

URL: 
https://github.com/llvm/llvm-project/commit/118efa5cda868604f3507760ca061f69b0050b19
DIFF: 
https://github.com/llvm/llvm-project/commit/118efa5cda868604f3507760ca061f69b0050b19.diff

LOG: [LLDB][NFC] Adding clarifying comment in 
SymbolFileDWARFDebugMap::DumpClangAST(...)

It is not obvious that the code was correct since it would seem as if we want 
to perform the dump for
each symbol file.

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 5b0f46aefbf1..add05d1a3a9d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -1225,6 +1225,9 @@ CompilerDeclContext 
SymbolFileDWARFDebugMap::FindNamespace(
 void SymbolFileDWARFDebugMap::DumpClangAST(Stream &s) {
   ForEachSymbolFile([&s](SymbolFileDWARF *oso_dwarf) -> bool {
     oso_dwarf->DumpClangAST(s);
+    // The underlying assumption is that DumpClangAST(...) will obtain the
+    // AST from the underlying TypeSystem and therefore we only need to do
+    // this once and can stop after the first iteration hence we return true.
     return true;
   });
 }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to