aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-09-26 09:44:31 -0700
committerGitHub <noreply@github.com>2023-09-26 09:44:31 -0700
commita42787d10854fe2fdaca019634aed03adebcb864 (patch)
treed13a35ce8f30b474139ca22ce3477caea7f14103 /clang/lib/Frontend/CompilerInvocation.cpp
parentc1afed9f48c2d4ebb21ac1672948e82d23c69174 (diff)
downloadllvm-a42787d10854fe2fdaca019634aed03adebcb864.zip
llvm-a42787d10854fe2fdaca019634aed03adebcb864.tar.gz
llvm-a42787d10854fe2fdaca019634aed03adebcb864.tar.bz2
[clang] Add -mlarge-data-threshold for x86_64 medium code model (#66839)
Error if not used with x86_64. Warn if not used with the medium code model (can update if other code models end up using this). Set TargetMachine option and add module flag.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 9293b91..f2fe904 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -574,6 +574,7 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
llvm::Triple::ArchType Arch = T.getArch();
CodeGenOpts.CodeModel = TargetOpts.CodeModel;
+ CodeGenOpts.LargeDataThreshold = TargetOpts.LargeDataThreshold;
if (LangOpts.getExceptionHandling() !=
LangOptions::ExceptionHandlingKind::None &&