Skip to content

Commit 7163aa9

Browse files
committed
[NFC] Fix title comment typo and provide description for LLJIT example.
1 parent 52e2552 commit 7163aa9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1-
//===-- examples/HowToUseJIT/HowToUseJIT.cpp - An example use of the JIT --===//
1+
//===------- HowToUseLLJIT.cpp - An example use of ORC-based LLJIT --------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
//
9+
// This small program provides an example of how to quickly build a small
10+
// module with a 'add1' function and use of IRBuilder to create add & return
11+
// instructions.
12+
//
13+
// Goal:
14+
// The goal of this snippet is to create in the memory
15+
// the LLVM module consisting of a function as follow:
16+
//
17+
// int add1(int x) {
18+
// return x+1;
19+
// }
20+
// add1(42);
21+
//
22+
// then compile the module via LLJIT, then execute the 'add1'
23+
// function and return result to a driver, i.e. to a "host program".
24+
//
25+
//===----------------------------------------------------------------------===//
826

927
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
1028
#include "llvm/IR/Function.h"

0 commit comments

Comments
 (0)