Error running clang++ generated bitcode in lli

I am trying to generate a bit code from a c++ source code and running through the just-in-time compiler. When I compile through the clang++ and generate binary executable it runs perfectly but when I generated the bitcode and tried running through the JIT with lli command it generates run-time error. Could you please help me understanding what’s going on.

For example: Let example.cpp contains the following code:

 #include <iostream>

 int main(){
    std::cout << "\nHello World!";
    return 0;
 }

I am using the following command to generate executable which runs perfectly fine.

clang++ example.cpp 

I am using the following command to generate the bitcode:

clang++ -S -emit-llvm example.cpp 

And then running through the JIT using the following command which generates run-time error:

lli example.ll 

I am getting the following access violation error:

Stack dump:
0.      Program arguments: lli example.ll
#0 0x00000000025fd9af llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/xpc/llvm/llvm-project1/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:0
#1 0x00000000025fda42 PrintStackTraceSignalHandler(void*) /home/xpc/llvm/llvm-project1/llvm-project/llvm/lib/Support/Unix/Signals.inc:625:0
#2 0x00000000025fb7ca llvm::sys::RunSignalHandlers() /home/xpc/llvm/llvm-project1/llvm-project/llvm/lib/Support/Signals.cpp:68:0
#3 0x00000000025fd329 SignalHandler(int) /home/xpc/llvm/llvm-project1/llvm-project/llvm/lib/Support/Unix/Signals.inc:406:0
#4 0x00007fa75dbdc390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
Segmentation fault (core dumped)

Outputs of
clang++ --version
lli --version
?

clang++ --version
clang version 10.0.1 (GitHub - llvm/llvm-project: The LLVM Project is a collection of modular and reusable compiler and tool ef32c611aa214dea855364efd7ba451ec5ec3f74)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

lli --version
LLVM (http://llvm.org/):
LLVM version 10.0.1
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: ivybridge