summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-09-27 19:27:19 +0000
committerLang Hames <lhames@gmail.com>2018-09-27 19:27:19 +0000
commit94fe9d4bd9d166995231e16b3134638f8b1cc86a (patch)
tree94fd9254ddd5007f6c473b2d16698b997a30ce98 /llvm/tools
parent7d424aae138f5c238516b391849ad970d14b1bbc (diff)
downloadbcm5719-llvm-94fe9d4bd9d166995231e16b3134638f8b1cc86a.tar.gz
bcm5719-llvm-94fe9d4bd9d166995231e16b3134638f8b1cc86a.zip
[lli] Fix ArgV setup bug when running in -jit-kind=orc-lazy mode.
ArgV[ArgC] should be null. llvm-svn: 343255
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/lli/lli.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 49d5db13326..4977cccabda 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -851,9 +851,12 @@ int runOrcLazyJIT(const char *ProgName) {
std::vector<const char *> ArgV;
for (auto &Arg : Args)
ArgV.push_back(Arg.c_str());
+ ArgV.push_back(nullptr);
+
+ int ArgC = ArgV.size() - 1;
auto Main =
reinterpret_cast<MainFnPtr>(static_cast<uintptr_t>(MainSym.getAddress()));
- auto Result = Main(ArgV.size(), (const char **)ArgV.data());
+ auto Result = Main(ArgC, (const char **)ArgV.data());
// Wait for -entry-point threads.
for (auto &AltEntryThread : AltEntryThreads)
OpenPOWER on IntegriCloud