diff options
author | Fangrui Song <i@maskray.me> | 2023-04-23 11:55:12 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-04-23 11:55:12 -0700 |
commit | 0d333bf0e3aa37e2e6ae211e3aa80631c3e01b85 (patch) | |
tree | 2cc4960f9eb21525c499d1a7d655482c61b31ac7 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8d163e5045073a5ac570225cc8e14cc9f6d72f09 (diff) | |
download | llvm-0d333bf0e3aa37e2e6ae211e3aa80631c3e01b85.zip llvm-0d333bf0e3aa37e2e6ae211e3aa80631c3e01b85.tar.gz llvm-0d333bf0e3aa37e2e6ae211e3aa80631c3e01b85.tar.bz2 |
Remove ExplicitEmulatedTLS and simplify -femulated-tls handling
Currently clangDriver passes -femulated-tls and -fno-emulated-tls to cc1.
cc1 forwards the option to LLVMCodeGen and ExplicitEmulatedTLS is used
to decide the value. Simplify this by moving the Clang decision to
clangDriver and moving the LLVM decision to InitTargetOptionsFromCodeGenFlags.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 1ecf116..cb29049 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1536,8 +1536,8 @@ void CompilerInvocation::GenerateCodeGenArgs( F.Filename, SA); } - GenerateArg( - Args, Opts.EmulatedTLS ? OPT_femulated_tls : OPT_fno_emulated_tls, SA); + if (Opts.EmulatedTLS) + GenerateArg(Args, OPT_femulated_tls, SA); if (Opts.FPDenormalMode != llvm::DenormalMode::getIEEE()) GenerateArg(Args, OPT_fdenormal_fp_math_EQ, Opts.FPDenormalMode.str(), SA); @@ -1890,11 +1890,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.LinkBitcodeFiles.push_back(F); } - if (!Args.getLastArg(OPT_femulated_tls) && - !Args.getLastArg(OPT_fno_emulated_tls)) { - Opts.EmulatedTLS = T.hasDefaultEmulatedTLS(); - } - if (Arg *A = Args.getLastArg(OPT_ftlsmodel_EQ)) { if (T.isOSAIX()) { StringRef Name = A->getValue(); |