diff --git a/unittests/Passes/PassBuilderBindingsTest.cpp b/unittests/Passes/PassBuilderBindingsTest.cpp index 39c1b89f90e..c55c882e608 100644 --- a/unittests/Passes/PassBuilderBindingsTest.cpp +++ b/unittests/Passes/PassBuilderBindingsTest.cpp @@ -15,12 +15,13 @@ using namespace llvm; class PassBuilderCTest : public testing::Test { void SetUp() override { - LLVMInitializeNativeTarget(); + LLVMInitializeAllTargetInfos(); char *Triple = LLVMGetDefaultTargetTriple(); char *Err; LLVMTargetRef Target; if (LLVMGetTargetFromTriple(Triple, &Target, &Err)) { - FAIL() << "Failed to create target from default triple: " << Err; + FAIL() << "Failed to create target from default triple (" << Triple + << "): " << Err; } TM = LLVMCreateTargetMachine(Target, Triple, "generic", "", LLVMCodeGenLevelDefault, LLVMRelocDefault,