summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-08-08 22:23:57 +0000
committerPetr Hosek <phosek@chromium.org>2018-08-08 22:23:57 +0000
commit7b2745447783faa5f94b6f31377fba9284b2e321 (patch)
tree2c8132ec5bd8ff83b9bd368fa91331e3f20ec8fd /clang/lib/Frontend/CompilerInvocation.cpp
parentf8937c8406987341411b2399de91b718d546a230 (diff)
downloadbcm5719-llvm-7b2745447783faa5f94b6f31377fba9284b2e321.tar.gz
bcm5719-llvm-7b2745447783faa5f94b6f31377fba9284b2e321.zip
[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 llvm-svn: 339294
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 78e6babd025..ed22c1a745c 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud