diff options
author | Lang Hames <lhames@gmail.com> | 2015-04-20 20:41:45 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-04-20 20:41:45 +0000 |
commit | dc4260db2a8df312268771fdfb8e9db5cd522508 (patch) | |
tree | b819bdff87f9fd9548db9c63db5c65b08f7287c7 /llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp | |
parent | 1ff46f2060c7d4de3dde8851dbd9deba66232070 (diff) | |
download | bcm5719-llvm-dc4260db2a8df312268771fdfb8e9db5cd522508.tar.gz bcm5719-llvm-dc4260db2a8df312268771fdfb8e9db5cd522508.zip |
[Orc] Make the makeStub function propagate argument attributes onto the call to
the function body.
This is necessary for correctness when lazily compiling.
Also, flesh out the Orc unit test infrastructure slightly, and add a unit test
for this.
llvm-svn: 235347
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp new file mode 100644 index 00000000000..5fea3c89f86 --- /dev/null +++ b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.cpp @@ -0,0 +1,23 @@ +//===--------- OrcTestCommon.cpp - Utilities for Orc Unit Tests -----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Common utilities for Orc unit tests. +// +//===----------------------------------------------------------------------===// + +#include "OrcTestCommon.h" + +using namespace llvm; + +ModuleBuilder::ModuleBuilder(LLVMContext &Context, StringRef Triple, + StringRef Name) + : M(new Module(Name, Context)), + Builder(Context) { + M->setTargetTriple(Triple); +} |