[Lldb-commits] [PATCH] D101236: [ASTImporter] Import definitions required for layout of [[no_unique_address]] from LLDB

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 24 00:19:30 PDT 2021


jankratochvil added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:3684
+      return ToAttrOrErr.takeError();
+#if 0
+    RecordType *FromRT =
----------------
It is still not working. The testcase either PASSes despite this `#if 0` or it FAILs even if it is `#if 1`. Sure the goal is to reproduce the LLDB testcase behavior - PASS with `#if 1` and FAIL with `#if 0`.
With libstdc++11 and this form of patch it fails on:
```
  lldb-api :: commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
  lldb-api :: commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py
  lldb-api :: commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
  lldb-api :: functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
```
It also fails for this one but there are reasons not interesting for this patch:
```
  lldb-api :: functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
```
These two are too complex to debug IMO:
```
  lldb-api :: commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
  lldb-api :: functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
```
I tried to reproduce the first two, this one has [[ https://people.redhat.com/jkratoch/lldbbt1.txt | such backtrace ]]:
```
  lldb-api :: commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
```


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:6441
+  findFromTU(FromB)->Importer->Imported(FromB, ToB);
+  llvm::Error Err = findFromTU(FromB)->Importer->ImportDefinition(FromB);
+  EXPECT_FALSE((bool)Err);
----------------
This code is trying to mimic the LLDB behavior from the backtrace of LLDB testcase: https://people.redhat.com/jkratoch/lldbbt1.txt



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101236



More information about the lldb-commits mailing list