Skip to content

Commit 86cbd02

Browse files
jeayevgvassilev
authored andcommitted
Return pointer to non-const for getExecutionEngine
The `clang::Interpreter` wrapper previously returned a pointer to const, but the actual `clang::Interpreter` did not. This breaks code for anyone porting from `clang::Interpreter` to `Cpp::Interpreter`, especially since most operations on the execution engine are mutations of some sort. Yes, the user could static cast the wrapper to the inner interpreter, but, at that point, why both exposing the `getExecutionEngine` function at all?
1 parent c3384fb commit 86cbd02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Interpreter/CppInterOpInterpreter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class Interpreter {
167167
return inner->getCompilerInstance();
168168
}
169169

170-
const llvm::orc::LLJIT* getExecutionEngine() const {
170+
llvm::orc::LLJIT* getExecutionEngine() const {
171171
return compat::getExecutionEngine(*inner);
172172
}
173173

0 commit comments

Comments
 (0)