davide added inline comments.

================
Comment at: 
source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp:213-229
+  // Handle variables with incomplete array types.
+  auto *type = in_value.GetCompilerType().GetOpaqueQualType();
+  auto qual_type = clang::QualType::getFromOpaquePtr(type).getCanonicalType();
+  if (qual_type->getTypeClass() == clang::Type::IncompleteArray) {
+    if (auto variable = in_value.GetVariable()) {
+      auto *lldb_type = variable->GetType();
+      auto *symbol_file = lldb_type->GetSymbolFile();
----------------
clayborg wrote:
> We must abstract this via the TypeSystem stuff and make this happen via the 
> CompilerType interface. What happens when "in_value" is a swift type or other 
> type from the type system? Crash
My understanding is that it is not possible today to get here with a swift 
type. In fact, `GetDynamicTypeAndAddress` in swift will be always called on a 
`SwiftLanguageRuntime`. 

That said, I'm not necessarily advocating against the abstraction, just 
pointing out that this is just a theoretical concern, and given this is an 
internal API in the debugger, it could be possibly enforced by an assertion to 
make sure people don't change the status quo accidentally.


https://reviews.llvm.org/D53530



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

Reply via email to