]> granicus.if.org Git - clang/commit
[ADT] Normalize empty triple components
authorPetr Hosek <phosek@chromium.org>
Wed, 8 Aug 2018 22:23:57 +0000 (22:23 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 8 Aug 2018 22:23:57 +0000 (22:23 +0000)
commit2db0cb23ff81bc2cef0850287ab6fe1ceacf003b
tree8c3c313014a3a2b001b62a5e920410c30e8fdc64
parent10e00557b9354c77801f822cd675785318247031
[ADT] Normalize empty triple components

LLVM triple normalization is handling "unknown" and empty components
differently; for example given "x86_64-unknown-linux-gnu" and
"x86_64-linux-gnu" which should be equivalent, triple normalization
returns "x86_64-unknown-linux-gnu" and "x86_64--linux-gnu". autoconf's
config.sub returns "x86_64-unknown-linux-gnu" for both
"x86_64-linux-gnu" and "x86_64-unknown-linux-gnu". This changes the
triple normalization to behave the same way, replacing empty triple
components with "unknown".

This addresses PR37129.

Differential Revision: https://reviews.llvm.org/D50219

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339294 91177308-0d34-0410-b5e6-96231b3b80d8
28 files changed:
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/coff-aarch64-type-sizes.c
test/Driver/arm-ias-Wa.s
test/Driver/arm-target-as-mthumb.s
test/Driver/baremetal.cpp
test/Driver/biarch.c
test/Driver/clang-translation.c
test/Driver/cuda-detect.cu
test/Driver/cuda-no-pgo-or-coverage.cu
test/Driver/cuda-no-sanitizers.cu
test/Driver/cuda-no-stack-protector.cu
test/Driver/cuda-options.cu
test/Driver/cuda-output-asm.cu
test/Driver/fsanitize.c
test/Driver/hip-binding.hip
test/Driver/hip-toolchain.hip
test/Driver/miamcu-opt.c
test/Driver/nacl-direct.c
test/Driver/netbsd.c
test/Driver/netbsd.cpp
test/Driver/nios2-cpu.c
test/Driver/offloading-interoperability.c
test/Driver/openmp-offload.c
test/Driver/parse-progname.c
test/Driver/ropi-rwpi.c
test/Driver/windows-arm-minimal-arch.c
test/Frontend/windows-exceptions.cpp