Commit 63306535 authored by Fangrui Song's avatar Fangrui Song
Browse files

[unittest] Fix FrontendTests CanGenerateCC1CommandLineFlag when...

[unittest] Fix FrontendTests CanGenerateCC1CommandLineFlag when LLVM_DEFAULT_TARGET_TRIPLE is not normalized after D79796

`TargetOpts->Triple` is initialized as llvm::sys::getDefaultTargetTriple() which may not be normalized.
If LLVM_DEFAULT_TARGET_TRIPLE is powerpc64le-linux-gnu, we should check
check `-triple powerpc64le-linux-gnu`, instead of (normalized) `-triple powerpc64le-unknown-linux-gnu`
parent 7f094f7f
......@@ -78,8 +78,7 @@ TEST_F(CC1CommandLineGenerationTest,
CanGenerateCC1CommandLineSeparateRequiredAbsent) {
const std::string DefaultTriple =
const std::string DefaultTriple = llvm::sys::getDefaultTargetTriple();
const char *Args[] = {"clang", "-xc++", "-"};
CompilerInvocation CInvok;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment