[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-02 Thread Fangrui Song via cfe-commits
@@ -1980,6 +1981,23 @@ static void handleWeakRefAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. For C++, we look up the demangled name +// ignoring parameters. This should handle the

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-03-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/87130 https://reviews.llvm.org/D54188 marked "alias" targets as used in C to fix -Wunused false positives. This patch extends the approach to handle mangled names to support global scope names in C++. We fix false

[clang] f18600c - [Driver] Avoid repeated ToolChain.getTriple() calls. NFC

2024-03-27 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-27T13:50:17-07:00 New Revision: f18600c87404eab8d0a279b0286f8add8b4a1bb8 URL: https://github.com/llvm/llvm-project/commit/f18600c87404eab8d0a279b0286f8add8b4a1bb8 DIFF: https://github.com/llvm/llvm-project/commit/f18600c87404eab8d0a279b0286f8add8b4a1bb8.diff

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-26 Thread Fangrui Song via cfe-commits
@@ -7203,6 +7203,33 @@ void Clang::ConstructJob(Compilation , const JobAction , options::OPT_fno_ptrauth_intrinsics, false)) CmdArgs.push_back("-fptrauth-intrinsics"); + if (Args.hasFlag(options::OPT_fptrauth_calls, options::OPT_fno_ptrauth_calls,

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,32 @@ +// Check that we can manually enable specific ptrauth features. MaskRay wrote: aarch64-ptrauth.c is more conventional for such target-specific features https://github.com/llvm/llvm-project/pull/85235

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,32 @@ +// Check that we can manually enable specific ptrauth features. + +// RUN: %clang --target=aarch64 -c %s -### 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth-intrinsics" MaskRay wrote: `// NONE-NOT:

[clang] 6ff6191 - [Driver] Reject -fptrauth-intrinsics on non-AArch64 targets

2024-03-26 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-26T00:04:19-07:00 New Revision: 6ff61914a1ef2c05702ba73cf31ffdeed59c1740 URL: https://github.com/llvm/llvm-project/commit/6ff61914a1ef2c05702ba73cf31ffdeed59c1740 DIFF: https://github.com/llvm/llvm-project/commit/6ff61914a1ef2c05702ba73cf31ffdeed59c1740.diff

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Fangrui Song via cfe-commits
@@ -166,8 +167,9 @@ class SemaPPCallbacks : public PPCallbacks { } case ExitFile: if (!IncludeStack.empty()) { -if (llvm::timeTraceProfilerEnabled()) - llvm::timeTraceProfilerEnd(); +if (llvm::timeTraceProfilerEnabled()) { +

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-25 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Looks like we were able to fix code on our end and this here isn't needed. > But maybe the current behavior isn't 100% ideal. Thanks. I am abandoning this workaround. > Here's what I think the situation currently is (please correct me if I'm > wrong): > > * With clang-cl,

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-25 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > There is a use case to pass customized arguments to main without using > > -ffreestanding. > > This is not motivating for C++ because that's not actually valid to do > ([eel.is/c++draft/basic.start.main#3.sentence-1](https://eel.is/c++draft/basic.start.main#3.sentence-1)),

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [cmake] Add cmake module dir before using GetDarwinLinkerVersion (PR #86386)

2024-03-23 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/86386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make '-frtlib-add-rpath' include the standard library directory (PR #86217)

2024-03-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/86217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread Fangrui Song via cfe-commits
MaskRay wrote: We should remove the comment. To make the PR more useful, the PR can be changed to remove other confusing comments like this. https://github.com/llvm/llvm-project/pull/85921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][SPIRV] Don't warn on -mcmodel (PR #86039)

2024-03-21 Thread Fangrui Song via cfe-commits
@@ -5804,7 +5804,7 @@ void Clang::ConstructJob(Compilation , const JobAction , } else if (Triple.getArch() == llvm::Triple::x86_64) { Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"}, CM); -} else if

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,32 @@ +// Check that we can manually enable specific ptrauth features. + +// RUN: %clang -target aarch64 -c %s -### 2>&1 | FileCheck %s --check-prefix NONE +// NONE: "-cc1" +// NONE-NOT: "-fptrauth-intrinsics" +// NONE-NOT: "-fptrauth-calls" +// NONE-NOT:

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI compatibility tag (PR #85235)

2024-03-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,32 @@ +// Check that we can manually enable specific ptrauth features. + +// RUN: %clang -target aarch64 -c %s -### 2>&1 | FileCheck %s --check-prefix NONE MaskRay wrote: `--target=` for new tests https://github.com/llvm/llvm-project/pull/85235

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. bazel-6.3.2 build --config=generic_clang @llvm-project//clang build passes with this refactoring. Thanks https://github.com/llvm/llvm-project/pull/84184 ___ cfe-commits mailing list

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85891 unless USE_DEPRECATED_GCC_INSTALL_PREFIX (temporary escape hatch) is set. Setting GCC_INSTALL_PREFIX leads to a warning for Clang 18.1 (#77537) and will be completely removed for Clang 20. Link:

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/85359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] -fsanitize=undefined: don't expand to signed-integer-overflow if -fwrapv (PR #85501)

2024-03-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang driver: enable fast unaligned access for Android on RISCV64 (PR #85704)

2024-03-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: . https://github.com/llvm/llvm-project/pull/85704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang driver: enable fast unaligned access for Android on RISCV64 (PR #85704)

2024-03-19 Thread Fangrui Song via cfe-commits
@@ -167,6 +167,10 @@ void riscv::getRISCVTargetFeatures(const Driver , const llvm::Triple , Features.push_back("-relax"); } + // Android requires fast unaligned access on RISCV64. MaskRay wrote: This adds two +fast-unaligned-access if

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the comment. I'll abandon this. https://github.com/llvm/llvm-project/pull/85441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

2024-03-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks. Fixing it on the Chromium feels nicer to me as well. This should work around the code if you run into more code needing this :) Personally I suspect not, since module-level inline asm with instructions are very rarely used (non-instruction directives are uses more).

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: > If possible I would prefer to keep -m[no-]unaligned-access for AArch64. > > The history of this option name derives from Arm's proprietary compiler >

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85668 clang-cl is conflating input assembly syntax with output assembly syntax. It expects AT syntax input but Intel syntax output. This conflicts with clang -c -masm=intel users that do expect -masm=intel to control

[clang] [Driver] -fsanitize=undefined: don't expand to signed-integer-overflow if -fwrapv (PR #85501)

2024-03-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: "Squash and merge" uses the description instead of the commit message, so the commit message is not useful. The commit message is due to spr. https://github.com/llvm/llvm-project/pull/85501 ___ cfe-commits mailing list

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85494 >From 0fd3675447f41b033472f9269648e8e735bc543a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 15 Mar 2024 20:26:52 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

2024-03-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Shouldn't plain `-fsanitize=undefined` disable this sanitizer by default > (requiring explicit opt-in)? In `-fwrapv` mode this is not undefined > behavior, so `-fsanitize=undefined` should not complain about it. I was on the fence whether `-fsanitize=undefined` should expand

[clang] [Driver] -fsanitize=undefined: don't expand to signed-integer-overflow if -fwrapv (PR #85501)

2024-03-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85501 Linux kernel uses -fwrapv to change signed integer overflows from undefined behaviors to defined behaviors. However, the security folks still want -fsanitize=signed-integer-overflow diagnostics. Their intention

[clang] [Sema] Allow -Wno-main to suppress the arg wrong error (PR #85494)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85494 The diagnostic is a warning in GCC. We make it a DefaultError warning under -Wmain. There is a use case to pass customized arguments to main without using -ffreestanding. Close #85491 >From

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows MaskRay wrote: UNSUPPORTED is much more common

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows +// On AIX, the default output for `-c` may be `.s` instead of `.o`, +// which makes the test fail. So

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, + Group, Visibility<[ClangOption,

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-03-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: > CC @llvm/clang-vendors > > > I [announced this change on > > discourse](https://discourse.llvm.org/t/use-glob-instead-of-regex-for-specialcaselists/71666?u=ellishg) > > last year. > > "Use glob instead of regex for SpecialCaseLists" doesn't mean anything for > anyone not

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85458 Setting GCC_INSTALL_PREFIX leads to a warning (#77537). Link: discourse.llvm.org/t/add-gcc-install-dir-deprecate-gcc-toolchain-and-remove-gcc-install-prefix/65091 Link:

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -839,6 +839,13 @@ llvm::Error expandResponseFiles(SmallVectorImpl , bool ClangCLMode, llvm::BumpPtrAllocator , llvm::vfs::FileSystem *FS = nullptr); +/// Apply a space separated list of edits to the input

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,134 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl , return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set , StringRef S) { MaskRay wrote: We prefer `static` for functions

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl , return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set , StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -87,6 +87,7 @@ #include "llvm/Support/Process.h" #include "llvm/Support/Program.h" #include "llvm/Support/RISCVISAInfo.h" +#include "llvm/Support/Regex.h" MaskRay wrote: remove #include "llvm/Support/Regex.h" for clang/tools/driver/driver.cpp

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. two nits https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl , return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set , StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: If Apple platforms need this option, I can keep it recognized but only for Apple. For ELF platforms, we should remove the GCC-unsupported-and-rejected aliases. https://github.com/llvm/llvm-project/pull/85441 ___ cfe-commits mailing

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85441 Follow-up to #85350: GCC only supports -m[no-]strict-align for AArch64 and rejects adding -m[no-]unaligned-access aliases. We inapropriated supported -m[no-]unaligned-access as aliases for non-AArch64 due to an

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] b8db3e7 - [RISCV,test] Change two -munaligned-access to GCC-supported -mno-strict-align

2024-03-15 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-15T10:46:12-07:00 New Revision: b8db3e7c7dddaa14c314a05b92c9fa3df38734e4 URL: https://github.com/llvm/llvm-project/commit/b8db3e7c7dddaa14c314a05b92c9fa3df38734e4 DIFF: https://github.com/llvm/llvm-project/commit/b8db3e7c7dddaa14c314a05b92c9fa3df38734e4.diff

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver , } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,247 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686 --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linux-gnux32

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/83136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/83136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,24 @@ +/// attribute parsing error cases. + +// RUN: not llvm-mc -triple=hexagon -filetype=asm %s 2>&1 \ +// RUN: | FileCheck %s + + .attribute Tag_unknown_name, 0 +// CHECK: error: attribute name not recognized: Tag_unknown_name MaskRay wrote:

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -251,7 +251,10 @@ StringRef llvm::object::getELFSectionTypeName(uint32_t Machine, unsigned Type) { } break; case ELF::EM_HEXAGON: -switch (Type) { STRINGIFY_ENUM_CASE(ELF, SHT_HEX_ORDERED); } +switch (Type) { + STRINGIFY_ENUM_CASE(ELF,

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver , } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -395,7 +396,8 @@ template class ELFObjectFile : public ELFObjectFileBase { for (const Elf_Shdr : *SectionsOrErr) { if (Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES || - Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES) { + Sec.sh_type ==

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -652,6 +660,57 @@ bool HexagonAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned , return finishBundle(IDLoc, Out); return false; } +/// parseDirectiveAttribute +/// ::= .attribute int, int +/// ::= .attribute Tag_name, int +bool

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,20 @@ +/// Enabled by default for assembly +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1 \ +// RUN:| FileCheck %s -check-prefix CHECK-ENABLED + +/// Can be forced on or off for assembly. +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -79,7 +80,8 @@ static cl::opt ErrorNoncontigiousRegister( "merror-noncontigious-register", cl::desc("Error for register names that aren't contigious"), cl::init(false)); - +static cl::opt AddBuildAttributes("hexagon-add-build-attributes", +

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85350 GCC ports only supports one of the options, with -mstrict-align preferred by newer ports. And they reject adding such aliases (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555). We should not support aliases,

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,46 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(features = ["layering_check"], MaskRay

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -18,7 +18,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H -#include "Feature.h" MaskRay wrote: This change should be removed. https://github.com/llvm/llvm-project/pull/81556

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. bazel-specific changes often have a title `[bazel] Add clangd support`. Please consider following suit. It would be nice to have a fuller support, but I understand having this cc_library first can make your downstream changes easier, so

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Ping! llvm-project email notifications are extremely high-volume and nobody can notice every change even if they are subscribed to the relevant labels... If you don't have write/triage role

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"]) +

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,45 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package(default_visibility = ["//visibility:public"])

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/84119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Facebook was using it at one point (can't say if they are currently), I > > know that Sony had some interested users as well. > > Yes, the order matters - that was the reason that the flag was implemented > > in the first place. > > Cc @smeenai @pogo59 on whether this

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Facebook was using it at one point (can't say if they are currently), I know > that Sony had some interested users as well. > > Yes, the order matters - that was the reason that the flag was implemented in > the first place. Cc @smeenai @pogo59 on whether this option is

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -404,6 +404,15 @@ class CodeGenOptions : public CodeGenOptionsBase { /// List of pass builder callbacks. std::vector> PassBuilderCallbacks; + /// List of global variables explicitly specified by the user as toc-data. + std::vector TocDataVarsUserSpecified; + + ///

[clang] 605abe0 - [clang] Initialize AllTocData after #67999

2024-03-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-13T15:06:55-07:00 New Revision: 605abe0689dfd28aadc9413306f33a4494cf3fb8 URL: https://github.com/llvm/llvm-project/commit/605abe0689dfd28aadc9413306f33a4494cf3fb8 DIFF: https://github.com/llvm/llvm-project/commit/605abe0689dfd28aadc9413306f33a4494cf3fb8.diff

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/84119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: @compnerd https://github.com/llvm/llvm-project/pull/84121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > There is some discussion in last (2024/2/29) LLVM sync up meeting: We all > agree that might not useful in linux target and those platforms disable GP > relaxation, like Android and fuchsia; Thanks for having the discussion. The motivation behind my revising this patch was

[clang] [Clang] Don't use crtbegin/crtend when building for musl. (PR #85089)

2024-03-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't use crtbegin/crtend when building for musl. (PR #85089)

2024-03-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/85089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't use crtbegin/crtend when building for musl. (PR #85089)

2024-03-13 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. Thanks for working on musl but I don't think this is correct. A musl-cross-make build does use crtbegin/crtend, though technically the files can be empty. https://github.com/llvm/llvm-project/pull/85089

[libcxx] [libcxxabi] [libunwind] [libcxx, libcxxabi, libunwind] Prefer -fvisibility-global-new-delete=force-hidden (PR #84917)

2024-03-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > There are many `--no-offload-new-driver` test changes. They can be > > pre-committed to make this default flip modify fewer files. > > I think it's much easier to keep these in a single patch, both for writing > and with any potential reverting that it may require. Since

<    1   2   3   4   5   6   7   8   9   10   >