From 706b5472d897ca75ebd210e4109637793288bcf2 Mon Sep 17 00:00:00 2001 From: Amy Kwan Date: Sat, 17 Jun 2023 00:31:35 -0500 Subject: [AIX][TLS] Relax front end diagnostics to accept the local-exec TLS model This patch relaxes the front end AIX diagnostics added in D102070 to accept the local-exec TLS model, as we plan to support this model in a series of future patches. The diagnostics are relaxed when local-exec is used as a compiler option to `-ftls-model=*` and in the `__attribute__((tls_model("local-exec")))` attribute. Differential Revision: https://reviews.llvm.org/D149596 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f6c04fe..dca8853 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1894,7 +1894,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, if (Arg *A = Args.getLastArg(OPT_ftlsmodel_EQ)) { if (T.isOSAIX()) { StringRef Name = A->getValue(); - if (Name != "global-dynamic") + if (Name != "global-dynamic" && Name != "local-exec") Diags.Report(diag::err_aix_unsupported_tls_model) << Name; } } -- cgit v1.1