[PATCH] D92288: [NFC] Fix title comment typo and provide description for LLJIT example.

Shivam Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 29 14:28:41 PST 2020

xgupta created this revision.
xgupta added a reviewer: lhames.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
xgupta requested review of this revision.

A typo fix of JIT -> ORC's LLJIT and add a description for the HowToUseLLJIT example program.

  rG LLVM Github Monorepo



Index: llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp
--- llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp
+++ llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp
@@ -1,10 +1,28 @@
-//===-- examples/HowToUseJIT/HowToUseJIT.cpp - An example use of the JIT --===//
+//===------- HowToUseLLJIT.cpp - An example use of ORC-based LLJIT --------===//
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//  This small program provides an example of how to quickly build a small
+//  module with a 'add1' function and use of IRBuilder to create add & return 
+//  instructions.
+// Goal:
+//  The goal of this snippet is to create in the memory
+//  the LLVM module consisting of a function as follow:
+// int add1(int x) {
+//   return x+1;
+// }
+//  add1(42);
+// then compile the module via LLJIT, then execute the 'add1'
+// function and return result to a driver, i.e. to a "host program".
 #include "llvm/ExecutionEngine/Orc/LLJIT.h"
 #include "llvm/IR/Function.h"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92288.308233.patch
Type: text/x-patch
Size: 1370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201129/c5f31ce6/attachment.bin>

More information about the llvm-commits mailing list