[Lldb-commits] [PATCH] D101237: [lldb] Fix [[no_unique_address]] and libstdc++ 11's std::unique_ptr

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Apr 24 09:47:36 PDT 2021


jankratochvil added inline comments.


================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp:103
+  // GCC 11 std::default_delete<...> has existing child with GetByteSize()==1.
+  if (tuple_sp->GetByteSize() > ptr_obj->GetByteSize()) {
+    ValueObjectSP del_obj = tuple_frontend->GetChildAtIndex(1);
----------------
This is in fact unrelated patch, it could be 3/3 in the series. It was failing on `TestDataFormatterStdUniquePtr.py` line 41:
```
        self.assertFalse(frame.GetValueForVariablePath("iup.deleter").IsValid())
```
But whole `TestDataFormatterStdUniquePtr.py` does not yet PASS even with this patch, there are some unrelated other issues on later testcases.


================
Comment at: lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp:47
 // CHECK: | |-FieldDecl {{.*}} A 'int'
-// CHECK: | | `-IntegerLiteral {{.*}} 'int' 5
+// CHECK: | | {{.}}-IntegerLiteral {{.*}} 'int' 5
 // CHECK: | |-FieldDecl {{.*}} B 'int'
----------------
There is now always a new leaf element:
```
 | | |-IntegerLiteral 0x260af78 <<invalid sloc>> 'int' 5 
 | | `-NoUniqueAddressAttr 0x260aff0 <<invalid sloc>> Implicit 
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101237



More information about the lldb-commits mailing list