diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /examples/HowToUseJIT | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'examples/HowToUseJIT')
-rw-r--r-- | examples/HowToUseJIT/HowToUseJIT.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp index 0050d27b45d7..f141fa5a7f54 100644 --- a/examples/HowToUseJIT/HowToUseJIT.cpp +++ b/examples/HowToUseJIT/HowToUseJIT.cpp @@ -69,11 +69,9 @@ int main() { // Create the add1 function entry and insert this entry into module M. The // function will have a return type of "int" and take an argument of "int". - // The '0' terminates the list of argument types. Function *Add1F = cast<Function>(M->getOrInsertFunction("add1", Type::getInt32Ty(Context), - Type::getInt32Ty(Context), - nullptr)); + Type::getInt32Ty(Context))); // Add a basic block to the function. As before, it automatically inserts // because of the last argument. @@ -102,8 +100,7 @@ int main() { // Now we're going to create function `foo', which returns an int and takes no // arguments. Function *FooF = - cast<Function>(M->getOrInsertFunction("foo", Type::getInt32Ty(Context), - nullptr)); + cast<Function>(M->getOrInsertFunction("foo", Type::getInt32Ty(Context))); // Add a basic block to the FooF function. BB = BasicBlock::Create(Context, "EntryBlock", FooF); |