[Lldb-commits] [PATCH] D71237: [FormatEntity] Add mangled function name support

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 11 14:00:54 PST 2019


JDevlieghere added inline comments.


================
Comment at: lldb/source/Core/FormatEntity.cpp:1763
+      return false;
+    else {
+      s.PutCString(name);
----------------
No else after return


================
Comment at: lldb/source/Core/FormatEntity.cpp:1768
+        Block *inline_block = sc->block->GetContainingInlinedBlock();
+        if (inline_block) {
+          const InlineFunctionInfo *inline_info =
----------------
You can write this as 
```if(Block *inline_block = sc->block->GetContainingInlinedBlock()) {```


================
Comment at: lldb/source/Core/FormatEntity.cpp:1771
+              sc->block->GetInlinedFunctionInfo();
+          if (inline_info) {
+            s.PutCString(" [inlined] ");
----------------
Same here


================
Comment at: lldb/test/Shell/Settings/Inputs/main.cpp:1
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
----------------
labath wrote:
> This file is about 70 lines longer than necessary to test this functionality, and it contains a #include statement in the middle of the file which is completely bogus
Tests don't need the license header


================
Comment at: lldb/test/Shell/Settings/Inputs/main.cpp:13
+
+  static const int GetValue();
+
----------------
This tests seems way to complex for what you are testing. Unless another test is reusing this please make it as simple as possible. 


================
Comment at: lldb/test/Shell/Settings/TestFrameFormatMangling.test:10
+frame info
+# CHECK: frame #0: {{.*}}_ZN9Increment8GetValueEv
+c
----------------
If you're going to regex match the frame PC, why not remove it from the frame format?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71237/new/

https://reviews.llvm.org/D71237





More information about the lldb-commits mailing list