[unittest] Fix FrontendTests CanGenerateCC1CommandLineFlag when LLVM_DEFAULT_TARGET_T...
authorFangrui Song <maskray@google.com>
Wed, 24 Jun 2020 23:18:28 +0000 (16:18 -0700)
committerFangrui Song <maskray@google.com>
Wed, 24 Jun 2020 23:18:58 +0000 (16:18 -0700)
commit6330653547f492646c92553738dab6a99d7d9710
tree757a9eadd2871409d2e4e6e7aa3d0bd3187d2855
parent7f094f7f9d3e3c529afcfd553cee3b64419e72f2
[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`
clang/unittests/Frontend/CompilerInvocationTest.cpp