summaryrefslogtreecommitdiff
path: root/source/Expression/UtilityFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Expression/UtilityFunction.cpp')
-rw-r--r--source/Expression/UtilityFunction.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/source/Expression/UtilityFunction.cpp b/source/Expression/UtilityFunction.cpp
index a0a1e4edfb0b..eeaeca18da86 100644
--- a/source/Expression/UtilityFunction.cpp
+++ b/source/Expression/UtilityFunction.cpp
@@ -1,9 +1,8 @@
//===-- UtilityFunction.cpp -------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -16,7 +15,6 @@
#include "lldb/Core/Module.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Expression/DiagnosticManager.h"
-#include "lldb/Expression/ExpressionSourceCode.h"
#include "lldb/Expression/FunctionCaller.h"
#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Expression/UtilityFunction.h"
@@ -31,23 +29,20 @@
using namespace lldb_private;
using namespace lldb;
-//------------------------------------------------------------------
/// Constructor
///
-/// @param[in] text
+/// \param[in] text
/// The text of the function. Must be a full translation unit.
///
-/// @param[in] name
+/// \param[in] name
/// The name of the function, as used in the text.
-//------------------------------------------------------------------
UtilityFunction::UtilityFunction(ExecutionContextScope &exe_scope,
- const char *text, const char *name)
- : Expression(exe_scope), m_execution_unit_sp(), m_jit_module_wp(),
- m_function_text(ExpressionSourceCode::g_expression_prefix),
- m_function_name(name) {
- if (text && text[0])
- m_function_text.append(text);
-}
+ const char *text, const char *name,
+ ExpressionKind kind)
+ : Expression(exe_scope, kind),
+ m_execution_unit_sp(), m_jit_module_wp(),
+ m_function_text(),
+ m_function_name(name) {}
UtilityFunction::~UtilityFunction() {
lldb::ProcessSP process_sp(m_jit_process_wp.lock());