[lldb][NFC] Move LLVM RTTI implementation from enum to static ID variable

Summary:
swift-lldb currently has to patch the ExpressionKind enum to add support for Swift expressions. If we implement LLVM's RTTI
with a static ID variable instead of a centralised enum we can drop that patch.

Reviewers: labath, davide

Reviewed By: labath

Subscribers: JDevlieghere, lldb-commits

Tags: #upstreaming_lldb_s_downstream_patches, #lldb

Differential Revision: https://reviews.llvm.org/D70070
This commit is contained in:
Raphael Isemann
2019-11-12 10:04:32 +01:00
parent 6cc853b416
commit 52f3a2faf9
16 changed files with 83 additions and 78 deletions

View File

@@ -46,13 +46,14 @@
using namespace lldb_private;
char UserExpression::ID;
UserExpression::UserExpression(ExecutionContextScope &exe_scope,
llvm::StringRef expr, llvm::StringRef prefix,
lldb::LanguageType language,
ResultType desired_type,
const EvaluateExpressionOptions &options,
ExpressionKind kind)
: Expression(exe_scope, kind), m_expr_text(expr), m_expr_prefix(prefix),
const EvaluateExpressionOptions &options)
: Expression(exe_scope), m_expr_text(expr), m_expr_prefix(prefix),
m_language(language), m_desired_type(desired_type), m_options(options) {}
UserExpression::~UserExpression() {}