summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2015-11-04 22:32:32 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2015-11-04 22:32:32 +0000
commitffec81ca0095fc22a2544f3cd42320a80899c15d (patch)
tree4a8de783b53d24ee3952af65645d949ef2c83904 /llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
parentdd23974a5d860188e8c4a114788458929de039d3 (diff)
downloadbcm5719-llvm-ffec81ca0095fc22a2544f3cd42320a80899c15d.tar.gz
bcm5719-llvm-ffec81ca0095fc22a2544f3cd42320a80899c15d.zip
Fix some Clang-tidy modernize warnings, other minor fixes.
Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg. Differential revision: http://reviews.llvm.org/D14312 llvm-svn: 252087
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
index 84b9d8d9407..07707c91cd9 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
@@ -23,7 +23,6 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(TargetMachine, LLVMTargetMachineRef)
class OrcCAPIExecutionTest : public testing::Test, public OrcExecutionTest {
protected:
-
std::unique_ptr<Module> createTestModule(const Triple &TT) {
ModuleBuilder MB(getGlobalContext(), TT.str(), "");
Function *TestFunc = MB.createFunctionDecl<int()>("testFunc");
@@ -37,9 +36,9 @@ protected:
return MB.takeModule();
}
- typedef int (*MainFnTy)(void);
+ typedef int (*MainFnTy)();
- static int myTestFuncImpl(void) {
+ static int myTestFuncImpl() {
return 42;
}
@@ -66,16 +65,15 @@ protected:
auto *ET = CCtx->APIExecTest;
CCtx->M = ET->createTestModule(ET->TM->getTargetTriple());
CCtx->H = LLVMOrcAddEagerlyCompiledIR(JITStack, wrap(CCtx->M.get()),
- myResolver, 0);
+ myResolver, nullptr);
CCtx->Compiled = true;
LLVMOrcTargetAddress MainAddr = LLVMOrcGetSymbolAddress(JITStack, "main");
LLVMOrcSetIndirectStubPointer(JITStack, "foo", MainAddr);
return MainAddr;
}
-
};
-char *OrcCAPIExecutionTest::testFuncName = 0;
+char *OrcCAPIExecutionTest::testFuncName = nullptr;
TEST_F(OrcCAPIExecutionTest, TestEagerIRCompilation) {
if (!TM)
@@ -89,7 +87,7 @@ TEST_F(OrcCAPIExecutionTest, TestEagerIRCompilation) {
LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc");
LLVMOrcModuleHandle H =
- LLVMOrcAddEagerlyCompiledIR(JIT, wrap(M.get()), myResolver, 0);
+ LLVMOrcAddEagerlyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr);
MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main");
int Result = MainFn();
EXPECT_EQ(Result, 42)
@@ -113,7 +111,7 @@ TEST_F(OrcCAPIExecutionTest, TestLazyIRCompilation) {
LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc");
LLVMOrcModuleHandle H =
- LLVMOrcAddLazilyCompiledIR(JIT, wrap(M.get()), myResolver, 0);
+ LLVMOrcAddLazilyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr);
MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main");
int Result = MainFn();
EXPECT_EQ(Result, 42)
@@ -158,4 +156,4 @@ TEST_F(OrcCAPIExecutionTest, TestDirectCallbacksAPI) {
LLVMOrcDisposeInstance(JIT);
}
-}
+} // namespace llvm
OpenPOWER on IntegriCloud