diff options
author | Petr Hosek <phosek@chromium.org> | 2018-08-08 22:23:57 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-08-08 22:23:57 +0000 |
commit | 2db0cb23ff81bc2cef0850287ab6fe1ceacf003b (patch) | |
tree | 8c3c313014a3a2b001b62a5e920410c30e8fdc64 /lib/Frontend/CompilerInvocation.cpp | |
parent | 10e00557b9354c77801f822cd675785318247031 (diff) | |
download | clang-2db0cb23ff81bc2cef0850287ab6fe1ceacf003b.tar.gz |
[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
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 78e6babd02..ed22c1a745 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1550,8 +1550,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Opts.OverrideRecordLayoutsFile = Args.getLastArgValue(OPT_foverride_record_layout_EQ); - Opts.AuxTriple = - llvm::Triple::normalize(Args.getLastArgValue(OPT_aux_triple)); + Opts.AuxTriple = Args.getLastArgValue(OPT_aux_triple); Opts.StatsFile = Args.getLastArgValue(OPT_stats_file); if (const Arg *A = Args.getLastArg(OPT_arcmt_check, |