[ORC] Fix argv handling in runAsMain / lli.
authorLang Hames <lhames@gmail.com>
Sat, 11 Jan 2020 20:58:38 +0000 (12:58 -0800)
committerLang Hames <lhames@gmail.com>
Sat, 11 Jan 2020 21:03:38 +0000 (13:03 -0800)
commit2cdb18afda841392002feafda21af31854c195b3
treea3282082b1a69db4838dfdf4333b171dcfbd0a2a
parenta1f16998f371870ca4da8b3c00a093c607a36ddd
[ORC] Fix argv handling in runAsMain / lli.

This fixes an off-by-one error in the argc value computed by runAsMain, and
switches lli back to using the input bitcode (rather than the string "lli") as
the effective program name.

Thanks to Stefan Graenitz for spotting the bug.
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
llvm/test/ExecutionEngine/OrcLazy/printargv.ll [new file with mode: 0644]
llvm/tools/lli/lli.cpp