Ensure that CompilerInvocationTest normalizes default target triples
authorDaniel Grumberg <dany.grumberg@gmail.com>
Thu, 25 Jun 2020 09:36:12 +0000 (10:36 +0100)
committerDaniel Grumberg <dany.grumberg@gmail.com>
Thu, 25 Jun 2020 09:41:40 +0000 (10:41 +0100)
This fixes a build failure. More details at http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/78/steps/test-check-clang/logs/FAIL%3A%20Clang-Unit%3A%3ACC1CommandLineGenerationTest.CanGenerateCC1CommandLineSeparateRequiredAbsent

clang/unittests/Frontend/CompilerInvocationTest.cpp

index 9cce66e..ed82d67 100644 (file)
@@ -78,7 +78,8 @@ TEST_F(CC1CommandLineGenerationTest,
 
 TEST_F(CC1CommandLineGenerationTest,
        CanGenerateCC1CommandLineSeparateRequiredAbsent) {
-  const std::string DefaultTriple = llvm::sys::getDefaultTargetTriple();
+  const std::string DefaultTriple =
+      llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple());
   const char *Args[] = {"clang", "-xc++", "-"};
 
   CompilerInvocation CInvok;