[all-commits] [llvm/llvm-project] 38f8fc: [lldb][ClangExpressionParser] Don't by default ena...
Michael Buch via All-commits
all-commits at lists.llvm.org
Thu Apr 11 11:31:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 38f8fcea3455ef1d77faf9746579f52b4e18dacc
https://github.com/llvm/llvm-project/commit/38f8fcea3455ef1d77faf9746579f52b4e18dacc
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2024-04-11 (Thu, 11 Apr 2024)
Changed paths:
M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
M lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
M lldb/test/API/commands/expression/options/TestExprOptions.py
M lldb/test/API/lang/objcxx/objc-builtin-types/TestObjCBuiltinTypes.py
A lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/Makefile
A lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/TestObjCFromCppFramesWithoutDebugInfo.py
A lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/main.cpp
Log Message:
-----------
[lldb][ClangExpressionParser] Don't by default enable Objecitve-C support when evaluating C++ expressions (#87767)
This patch attempts to decouple C++ expression evaluation from
Objective-C support. We've previously enabled it by default (if a
runtime existed), but that meant we're opting into extra work we only
need to do for Objective-C, which complicates/slows down C++ expression
evaluation. Of course there's a valid use-case for this, which is
calling Objective-C APIs when stopped in C++ frames (which Objective-C++
developers might want to do). In those cases we should really prompt the
user to add the `expr --language objc++` flag. To accomodate a likely
frequent use-case where a user breaks in a system C++ library (without
debug-symbols) but their application is actually an Objective-C app, we
allow Objective-C support in C++ expressions if the current frame
doesn't have debug-info.
This fixes https://github.com/llvm/llvm-project/issues/75443 and allows
us to add more `LangOpts.ObjC` guards around the expression evaluator in
the future (e.g., we could avoid looking into the Objective-C runtime
during C++ expression evaluation, which we currently do
unconditionally).
Depends on https://github.com/llvm/llvm-project/pull/87657
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