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 /llvm/lib/CodeGen/CommandFlags.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 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CommandFlags.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp index c58547d..6dafe23 100644 --- a/llvm/lib/CodeGen/CommandFlags.cpp +++ b/llvm/lib/CodeGen/CommandFlags.cpp @@ -88,7 +88,7 @@ CGOPT(bool, IgnoreXCOFFVisibility) CGOPT(bool, XCOFFTracebackTable) CGOPT(std::string, BBSections) CGOPT(unsigned, TLSSize) -CGOPT(bool, EmulatedTLS) +CGOPT_EXP(bool, EmulatedTLS) CGOPT(bool, UniqueSectionNames) CGOPT(bool, UniqueBasicBlockSectionNames) CGOPT(EABI, EABIVersion) @@ -549,8 +549,8 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) { Options.UniqueSectionNames = getUniqueSectionNames(); Options.UniqueBasicBlockSectionNames = getUniqueBasicBlockSectionNames(); Options.TLSSize = getTLSSize(); - Options.EmulatedTLS = getEmulatedTLS(); - Options.ExplicitEmulatedTLS = EmulatedTLSView->getNumOccurrences() > 0; + Options.EmulatedTLS = + getExplicitEmulatedTLS().value_or(TheTriple.hasDefaultEmulatedTLS()); Options.ExceptionModel = getExceptionModel(); Options.EmitStackSizeSection = getEnableStackSizeSection(); Options.EnableMachineFunctionSplitter = getEnableMachineFunctionSplitter(); |