Skip to content

Commit 215160a

Browse files
committed
Update DIL interpreter to return an error message for type casting.
Will replace this with code to do actual casts in next PR.
1 parent eb27812 commit 215160a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lldb/source/ValueObject/DILEval.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,11 @@ Interpreter::Visit(const CastNode *node) {
748748

749749
lldb::ValueObjectSP operand = *operand_or_err;
750750
// Don't actually do the cast for now -- that code will be added later.
751-
// For now just return the original operand, unchanged.
752-
return operand;
751+
// For now just return an error message.
752+
return llvm::make_error<DILDiagnosticError>(
753+
m_expr,
754+
"Type casting is not supported here.",
755+
node->GetLocation());
753756
}
754757

755758
} // namespace lldb_private::dil

lldb/source/ValueObject/DILParser.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "lldb/Symbol/CompileUnit.h"
1616
#include "lldb/Target/ExecutionContextScope.h"
1717
#include "lldb/Target/LanguageRuntime.h"
18-
#include "lldb/Utility/DiagnosticsRendering.h"
1918
#include "lldb/Host/common/DiagnosticsRendering.h"
2019
#include "lldb/Target/ExecutionContextScope.h"
2120
#include "lldb/ValueObject/DILAST.h"

0 commit comments

Comments
 (0)