Skip to content

Commit 4b9539e

Browse files
committed
Refactor code and headers
1 parent 58d4109 commit 4b9539e

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

clang/include/clang/Interpreter/Value.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232

3333
#ifndef LLVM_CLANG_INTERPRETER_VALUE_H
3434
#define LLVM_CLANG_INTERPRETER_VALUE_H
35+
3536
#include "llvm/ADT/FunctionExtras.h"
3637
#include "llvm/Config/llvm-config.h" // for LLVM_BUILD_LLVM_DYLIB, LLVM_BUILD_SHARED_LIBS
37-
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
38-
#include "llvm/ExecutionEngine/Orc/MemoryAccess.h"
3938
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
4039
#include "llvm/Support/Compiler.h"
4140
#include <cassert>
@@ -48,7 +47,11 @@
4847

4948
namespace llvm {
5049
class raw_ostream;
51-
50+
namespace orc {
51+
class ExecutionSession;
52+
class LLJIT;
53+
class MemoryAccess;
54+
} // namespace orc
5255
} // namespace llvm
5356

5457
namespace clang {
@@ -393,6 +396,9 @@ class REPL_EXTERNAL_VISIBILITY Value final {
393396
assert(!Cleanup.has_value());
394397
Cleanup.emplace(std::move(VC));
395398
}
399+
400+
bool hasAttachedCleanup() const { return Cleanup.has_value(); }
401+
396402
void clear() {
397403
if (Cleanup.has_value())
398404
(*Cleanup)(*this);

clang/lib/Interpreter/InterpreterValuePrinter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "clang/Sema/Lookup.h"
2323
#include "clang/Sema/Sema.h"
2424

25+
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
2526
#include "llvm/Support/Error.h"
2627
#include "llvm/Support/raw_ostream.h"
2728

@@ -680,10 +681,6 @@ llvm::Expected<Expr *> Interpreter::convertExprToValue(Expr *E, bool isOOP) {
680681
if (llvm::Error Err = LookupInterface(ValuePrintingInfo[ClangSendResult],
681682
RunTimeFnTagName[ClangSendResult]))
682683
return std::move(Err);
683-
684-
if (llvm::Error Err = LookupInterface(ValuePrintingInfo[ClangDestroyObj],
685-
RunTimeFnTagName[ClangDestroyObj]))
686-
return std::move(Err);
687684
}
688685

689686
llvm::SmallVector<Expr *, 4> AdjustedArgs;

clang/lib/Interpreter/Value.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
#include "llvm/ADT/StringExtras.h"
2222

2323
#include "llvm/ExecutionEngine/Orc/Core.h"
24-
#include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h"
2524
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
26-
#include "llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h"
2725
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
2826
#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
2927

0 commit comments

Comments
 (0)