diff options
author | Stephane Sezer <sas@cd80.net> | 2018-05-25 20:23:42 +0000 |
---|---|---|
committer | Stephane Sezer <sas@cd80.net> | 2018-05-25 20:23:42 +0000 |
commit | b6f6192db109fd549ac7d5211fd8b692291bb989 (patch) | |
tree | 8dc440618fb8ac2e3f3d4c47991999160ee6f3ba /clang/examples/clang-interpreter/Invoke.cpp | |
parent | 0baba9e7287d5afc5bf163d954079bf2c4741fb3 (diff) | |
download | bcm5719-llvm-b6f6192db109fd549ac7d5211fd8b692291bb989.tar.gz bcm5719-llvm-b6f6192db109fd549ac7d5211fd8b692291bb989.zip |
Convert clang-interpreter to ORC JIT API
Summary: This mostly re-uses code from the KaleidoscopeJIT example.
Reviewers: ddunbar, lhames
Reviewed By: lhames
Subscribers: mgrang, alexshap, mgorny, xiaobai, cfe-commits
Differential Revision: https://reviews.llvm.org/D45897
llvm-svn: 333302
Diffstat (limited to 'clang/examples/clang-interpreter/Invoke.cpp')
-rw-r--r-- | clang/examples/clang-interpreter/Invoke.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/clang/examples/clang-interpreter/Invoke.cpp b/clang/examples/clang-interpreter/Invoke.cpp deleted file mode 100644 index 90afa0146b1..00000000000 --- a/clang/examples/clang-interpreter/Invoke.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//==-- examples/clang-interpreter/Invoke.cpp - Clang C Interpreter Example -==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "Invoke.h" - -#include <iostream> -#include <stdexcept> - -namespace interpreter { - -int TryIt(llvm::ExecutionEngine *EE, llvm::Function *EntryFn, - const std::vector<std::string> &Args, char *const *EnvP, - Invoker Invoke) { - int Res = -1; - try { - Res = Invoke(EE, EntryFn, Args, EnvP); - } catch (const std::exception &E) { - std::cout << "Caught '" << E.what() << "'\n"; - } catch (...) { - std::cout << "Unknown exception\n"; - } - return Res; -} - -} |