[llvm] 5c29148 - [test] Speculative fix for bots
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 10:03:48 PDT 2021
Author: Arthur Eubanks
Date: 2021-05-18T10:01:38-07:00
New Revision: 5c291482ec8bcd686044ebc0d4cffe7bf769521c
URL: https://github.com/llvm/llvm-project/commit/5c291482ec8bcd686044ebc0d4cffe7bf769521c
DIFF: https://github.com/llvm/llvm-project/commit/5c291482ec8bcd686044ebc0d4cffe7bf769521c.diff
LOG: [test] Speculative fix for bots
Bot has error "Failed to create target from default triple: Unable to
find target for this triple (no targets are registered)", likely because
we only initialized the native target, not the registered target if it's
different.
https://lab.llvm.org/buildbot/#/builders/86/builds/13664
Added:
Modified:
llvm/unittests/Passes/PassBuilderBindingsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Passes/PassBuilderBindingsTest.cpp b/llvm/unittests/Passes/PassBuilderBindingsTest.cpp
index 39c1b89f90e13..c55c882e6083c 100644
--- a/llvm/unittests/Passes/PassBuilderBindingsTest.cpp
+++ b/llvm/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,
More information about the llvm-commits
mailing list