[all-commits] [llvm/llvm-project] 284702: [lldb][TypeSystemClang][NFC] Log failure to InitBu...

Michael Buch via All-commits all-commits at lists.llvm.org
Sun Aug 25 02:09:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2847020dbd9b8f932ee564651ec72ce15fa37d07
      https://github.com/llvm/llvm-project/commit/2847020dbd9b8f932ee564651ec72ce15fa37d07
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2024-08-25 (Sun, 25 Aug 2024)

  Changed paths:
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [lldb][TypeSystemClang][NFC] Log failure to InitBuiltinTypes

If we fail to initialize the ASTContext builtins, LLDB
may crash in non-obvious ways down-the-line, e.g., when
it tries to call `ASTContext::getTypeSize` on a builtin like
`ast.UnsignedCharTy`, which would derefernce a `null` `QualType`.

The initialization can fail if we either didn't set the
`TypeSystemClang` target triple, or if the embedded clang isn't
enabled for a certain target.

This patch attempts to help pin-point the failure case post-mortem
by adding a log message here that prints the triple.

rdar://134260837



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list