Author: xgupta Date: 2021-01-25T19:46:02+05:30 New Revision: 7163aa999060f7c524a98024550c5c0cd99c2b4c
URL: https://github.com/llvm/llvm-project/commit/7163aa999060f7c524a98024550c5c0cd99c2b4c DIFF: https://github.com/llvm/llvm-project/commit/7163aa999060f7c524a98024550c5c0cd99c2b4c.diff LOG: [NFC] Fix title comment typo and provide description for LLJIT example. Added: Modified: llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp Removed: ################################################################################ diff --git a/llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp b/llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp index c71c4d9293ab..170a89913605 100644 --- a/llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp +++ b/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" _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits