[clang] e4e2d8e - Ensure that CompilerInvocationTest normalizes default target triples

Daniel Grumberg via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 02:42:19 PDT 2020


Author: Daniel Grumberg
Date: 2020-06-25T10:41:40+01:00
New Revision: e4e2d8e4c2d2d61a5baf7eeab69a3f539343eca6

URL: https://github.com/llvm/llvm-project/commit/e4e2d8e4c2d2d61a5baf7eeab69a3f539343eca6
DIFF: https://github.com/llvm/llvm-project/commit/e4e2d8e4c2d2d61a5baf7eeab69a3f539343eca6.diff

LOG: Ensure that CompilerInvocationTest normalizes default target triples

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

Added: 
    

Modified: 
    clang/unittests/Frontend/CompilerInvocationTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp
index 9cce66e41872..ed82d678462f 100644
--- a/clang/unittests/Frontend/CompilerInvocationTest.cpp
+++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp
@@ -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;


        


More information about the cfe-commits mailing list