Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
afc8368
[libc++abi][libunwind] Enable AT&T syntax explicitly (#166818)
tambry Nov 8, 2025
3673cc7
[llvm-rc] Don't interpret integer literals as octal numbers in rc.exe…
mstorsjo Nov 8, 2025
26bb121
Remove unused <vector> inclusion (#166997)
serge-sans-paille Nov 8, 2025
02976f5
[TableGen] Use "using" instead of "typedef" (NFC) (#167168)
kazutakahirata Nov 8, 2025
15e3b49
[llvm] Allow Rust personality name to contain arbitrary prefix (#166095)
Noratrieb Nov 8, 2025
0902a6b
Add missing #include (fix for #166997)
googlewalt Nov 8, 2025
3b219cf
[LV] Add register pressure test for #164124.
fhahn Nov 8, 2025
e61a51d
[llvm] Use llvm::find_if and llvm::is_contained (NFC) (#167166)
kazutakahirata Nov 8, 2025
0fad7d7
[llvm] Use static_assert on getEmptyKey and getTombstoneKey (NFC) (#1…
kazutakahirata Nov 8, 2025
7b1a74c
[BOLT] Use DenseMap::contains (NFC) (#167169)
kazutakahirata Nov 8, 2025
0246f33
[BinaryFromat] Simplify subscript operators (NFC) (#167170)
kazutakahirata Nov 8, 2025
91821ba
[MLIR] Fix FileCheck annotations and add 32-bit coverage (#167149)
Men-cotton Nov 9, 2025
3bb903e
[libc++] Treat P0513R0 as a defect report against C++11 (#166690)
frederick-vs-ja Nov 9, 2025
188f109
[mlir] Remove duplicate includes (NFC) (#167187)
kazutakahirata Nov 9, 2025
8628ff3
[ObjectYAML] Remove extraneous .c_str() (NFC) (#167189)
kazutakahirata Nov 9, 2025
3240581
[gn] port ebb61a5bea (llvm-cas)
nico Nov 9, 2025
3a8894d
[libc++][numeric] Marked saturation artithmetic functions as `[[nodis…
H-G-Hristov Nov 9, 2025
4b6a597
Reapply "[compiler-rt] Default to Lit's Internal Shell"
boomanaiden154 Nov 9, 2025
da0afff
merge main into amd-staging
z1-cciauto Nov 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bolt/lib/Core/DebugNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ void DWARF5AcceleratorTable::populateAbbrevsMap() {

void DWARF5AcceleratorTable::writeEntry(BOLTDWARF5AccelTableData &Entry) {
const uint64_t EntryID = getEntryID(Entry);
if (EntryRelativeOffsets.find(EntryID) != EntryRelativeOffsets.end())
if (EntryRelativeOffsets.contains(EntryID))
EntryRelativeOffsets[EntryID] = EntriesBuffer->size();

const std::optional<DWARF5AccelTable::UnitIndexAndEncoding> EntryRet =
Expand Down
8 changes: 5 additions & 3 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ def push_dynamic_library_lookup_path(config, new_path):
config.environment[dynamic_library_lookup_var] = new_ld_library_path_64


# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
#
# Choose between lit's internal shell pipeline runner and a real shell. If
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
if use_lit_shell:
# 0 is external, "" is default, and everything else is internal.
execute_external = use_lit_shell == "0"
else:
# Otherwise we default to internal on Windows and external elsewhere, as
# bash on Windows is usually very slow.
execute_external = not sys.platform in ["win32"]
# Otherwise we default to internal everywhere.
execute_external = False

# Allow expanding substitutions that are based on other substitutions
config.recursiveExpansionLimit = 10
Expand Down
2 changes: 1 addition & 1 deletion libcxx/docs/Status/Cxx17Papers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"`P0508R0 <https://wg21.link/P0508R0>`__","Wording for GB 58 - structured bindings for node_handles","2016-11 (Issaquah)","|Complete|","7","`#99944 <https://github.com/llvm/llvm-project/issues/99944>`__",""
"`P0509R1 <https://wg21.link/P0509R1>`__","Updating ""Restrictions on exception handling""","2016-11 (Issaquah)","|Nothing To Do|","n/a","`#103676 <https://github.com/llvm/llvm-project/issues/103676>`__",""
"`P0510R0 <https://wg21.link/P0510R0>`__","Disallowing references, incomplete types, arrays, and empty variants","2016-11 (Issaquah)","|Complete|","4","`#103677 <https://github.com/llvm/llvm-project/issues/103677>`__",""
"`P0513R0 <https://wg21.link/P0513R0>`__","Poisoning the Hash","2016-11 (Issaquah)","|Complete|","5","`#103678 <https://github.com/llvm/llvm-project/issues/103678>`__",""
"`P0513R0 <https://wg21.link/P0513R0>`__","Poisoning the Hash","2016-11 (Issaquah)","|Complete|","5","`#103678 <https://github.com/llvm/llvm-project/issues/103678>`__","Implemented as a DR against C++11 since LLVM 22. MSVC STL does the same."
"`P0516R0 <https://wg21.link/P0516R0>`__","Clarify That shared_future's Copy Operations have Wide Contracts","2016-11 (Issaquah)","|Complete|","4","`#103679 <https://github.com/llvm/llvm-project/issues/103679>`__",""
"`P0517R0 <https://wg21.link/P0517R0>`__","Make future_error Constructible","2016-11 (Issaquah)","|Complete|","4","`#103680 <https://github.com/llvm/llvm-project/issues/103680>`__",""
"`P0521R0 <https://wg21.link/P0521R0>`__","Proposed Resolution for CA 14 (shared_ptr use_count/unique)","2016-11 (Issaquah)","|Complete|","18","`#103681 <https://github.com/llvm/llvm-project/issues/103681>`__",""
Expand Down
9 changes: 0 additions & 9 deletions libcxx/include/__functional/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,10 @@ struct __hash_impl<long double> : __scalar_hash<long double> {
template <class _Tp>
struct hash : public __hash_impl<_Tp> {};

#if _LIBCPP_STD_VER >= 17

template <>
struct hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(nullptr_t) const _NOEXCEPT { return 662607004ull; }
};
#endif

#ifndef _LIBCPP_CXX03_LANG
template <class _Key, class _Hash>
Expand All @@ -452,18 +449,12 @@ template <class _Key, class _Hash = hash<_Key> >
using __has_enabled_hash _LIBCPP_NODEBUG =
integral_constant<bool, __check_hash_requirements<_Key, _Hash>::value && is_default_constructible<_Hash>::value >;

# if _LIBCPP_STD_VER >= 17
template <class _Type, class>
using __enable_hash_helper_imp _LIBCPP_NODEBUG = _Type;

template <class _Type, class... _Keys>
using __enable_hash_helper _LIBCPP_NODEBUG =
__enable_hash_helper_imp<_Type, __enable_if_t<__all<__has_enabled_hash<_Keys>::value...>::value> >;
# else
template <class _Type, class...>
using __enable_hash_helper _LIBCPP_NODEBUG = _Type;
# endif

#endif // !_LIBCPP_CXX03_LANG

_LIBCPP_END_NAMESPACE_STD
Expand Down
10 changes: 5 additions & 5 deletions libcxx/include/__numeric/saturation_arithmetic.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,27 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Rp __saturate_cast(_Tp __x) noexcept {
#if _LIBCPP_STD_VER >= 26

template <__signed_or_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp add_sat(_Tp __x, _Tp __y) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp add_sat(_Tp __x, _Tp __y) noexcept {
return std::__add_sat(__x, __y);
}

template <__signed_or_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp sub_sat(_Tp __x, _Tp __y) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp sub_sat(_Tp __x, _Tp __y) noexcept {
return std::__sub_sat(__x, __y);
}

template <__signed_or_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp mul_sat(_Tp __x, _Tp __y) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp mul_sat(_Tp __x, _Tp __y) noexcept {
return std::__mul_sat(__x, __y);
}

template <__signed_or_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp div_sat(_Tp __x, _Tp __y) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp div_sat(_Tp __x, _Tp __y) noexcept {
return std::__div_sat(__x, __y);
}

template <__signed_or_unsigned_integer _Rp, __signed_or_unsigned_integer _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Rp saturate_cast(_Tp __x) noexcept {
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Rp saturate_cast(_Tp __x) noexcept {
return std::__saturate_cast<_Rp>(__x);
}

Expand Down
35 changes: 35 additions & 0 deletions libcxx/test/libcxx/numerics/nodiscard.verify.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//===----------------------------------------------------------------------===//
//
// 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: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// REQUIRES: std-at-least-c++20

// <numeric>

// Check that functions are marked [[nodiscard]]

#include <bit>
#include <numeric>

#include "test_macros.h"

void test() {
// [bit.rotate]
std::rotl(0u, 0); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
std::rotr(0u, 0); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}

// clang-format off
#if TEST_STD_VER >= 26
// [numeric.sat]
std::add_sat(94, 82); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
std::sub_sat(94, 82); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
std::mul_sat(94, 82); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
std::div_sat(94, 82); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
std::saturate_cast<signed int>(49); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
#endif // TEST_STD_VER >= 26
// clang-format on
}
18 changes: 0 additions & 18 deletions libcxx/test/std/numerics/bit/bitops.rot/nodiscard.verify.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// size_t operator()(T val) const;
// };

// XFAIL: FROZEN-CXX03-HEADERS-FIXME

// Not very portable

#include <cassert>
Expand Down Expand Up @@ -44,18 +46,14 @@ test()
assert(h(&i) != h(&j));
}

// can't hash nullptr_t until C++17
void test_nullptr()
{
#if TEST_STD_VER > 14
typedef std::nullptr_t T;
typedef std::hash<T> H;
void test_nullptr() {
typedef std::nullptr_t T;
typedef std::hash<T> H;
#if TEST_STD_VER <= 17
static_assert((std::is_same<typename H::argument_type, T>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
#endif
ASSERT_NOEXCEPT(H()(T()));
static_assert((std::is_same<typename H::argument_type, T>::value), "");
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "");
#endif
ASSERT_NOEXCEPT(H()(T()));
}

int main(int, char**)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ int main(int, char**)
test_enabled_with_deleter<A, PointerDeleter<A, 1>>();
test_enabled_with_deleter<A[], PointerDeleter<A[], 1>>();

#if TEST_STD_VER > 14
test_disabled_with_deleter<int, PointerDeleter<int, 0>>();
test_disabled_with_deleter<int[], PointerDeleter<int[], 0>>();
test_disabled_with_deleter<A, PointerDeleter<A, 0>>();
test_disabled_with_deleter<A[], PointerDeleter<A[], 0>>();
#endif
}
#endif

Expand Down
10 changes: 3 additions & 7 deletions libcxx/test/support/poisoned_hash_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,9 @@ struct Class {};
// Each header that declares the std::hash template provides enabled
// specializations of std::hash for std::nullptr_t and all cv-unqualified
// arithmetic, enumeration, and pointer types.
#if TEST_STD_VER >= 17
using MaybeNullptr = types::type_list<std::nullptr_t>;
#else
using MaybeNullptr = types::type_list<>;
#endif
using LibraryHashTypes = types::
concatenate_t<types::arithmetic_types, types::type_list<Enum, EnumClass, void*, void const*, Class*>, MaybeNullptr>;
using LibraryHashTypes =
types::concatenate_t<types::arithmetic_types,
types::type_list<Enum, EnumClass, void*, void const*, Class*, std::nullptr_t>>;

struct TestHashEnabled {
template <class T>
Expand Down
1 change: 1 addition & 0 deletions libcxxabi/test/native/x86_64/lpstart-zero.pass.sh.s
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
## The exception table is modified to use udata4 encoding for LPStart and
## sdata4 encoding for call sites.

.att_syntax
.text
.globl main # -- Begin function main
.p2align 4, 0x90
Expand Down
1 change: 1 addition & 0 deletions libunwind/test/remember_state_leak.pass.sh.s
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

SIZEOF_UNWIND_EXCEPTION = 32

.att_syntax
.text
callback:
xorl %eax, %eax
Expand Down
27 changes: 13 additions & 14 deletions llvm/benchmarks/FormatVariadicBM.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
//===- FormatVariadicBM.cpp - formatv() benchmark ---------- --------------===//
//
// 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: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "benchmark/benchmark.h"
#include "llvm/Support/FormatVariadic.h"
#include <algorithm>
#include <string>
#include <vector>

//===- FormatVariadicBM.cpp - formatv() benchmark ---------- --------------===//
//
// 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: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "benchmark/benchmark.h"
#include "llvm/Support/FormatVariadic.h"
#include <algorithm>
#include <string>

using namespace llvm;
using namespace std;

Expand Down
9 changes: 4 additions & 5 deletions llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,10 @@ struct IRInstructionMapper {
: InstDataAllocator(IDA), IDLAllocator(IDLA) {
// Make sure that the implementation of DenseMapInfo<unsigned> hasn't
// changed.
assert(DenseMapInfo<unsigned>::getEmptyKey() == static_cast<unsigned>(-1) &&
"DenseMapInfo<unsigned>'s empty key isn't -1!");
assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2) &&
"DenseMapInfo<unsigned>'s tombstone key isn't -2!");
static_assert(DenseMapInfo<unsigned>::getEmptyKey() ==
static_cast<unsigned>(-1));
static_assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2));

IDL = new (IDLAllocator->Allocate())
IRInstructionDataList();
Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/AsmParser/SlotMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "llvm/AsmParser/NumberedValues.h"
#include "llvm/IR/TrackingMDRef.h"
#include <map>
#include <vector>

namespace llvm {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/CGData/OutlinedHashTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "llvm/Support/raw_ostream.h"

#include <unordered_map>
#include <vector>

namespace llvm {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <memory>
#include <mutex>
#include <vector>

namespace llvm::orc {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/SectCreate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "llvm/Support/Compiler.h"

#include <utility>
#include <vector>

namespace llvm::orc {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/MC/MCAssembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <string>
#include <tuple>
#include <utility>
#include <vector>

namespace llvm {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/ObjectYAML/GOFFYAML.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "llvm/BinaryFormat/GOFF.h"
#include "llvm/ObjectYAML/YAML.h"
#include <cstdint>
#include <vector>

namespace llvm {

Expand Down
8 changes: 3 additions & 5 deletions llvm/include/llvm/Option/OptTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,13 @@ class LLVM_ABI OptTable {
StringRef SubCommand) const {
assert(!SubCommand.empty() &&
"This helper is only for valid registered subcommands.");
auto SCIT =
std::find_if(SubCommands.begin(), SubCommands.end(),
[&](const auto &C) { return SubCommand == C.Name; });
auto SCIT = llvm::find_if(
SubCommands, [&](const auto &C) { return SubCommand == C.Name; });
assert(SCIT != SubCommands.end() &&
"This helper is only for valid registered subcommands.");
auto SubCommandIDs = CandidateInfo->getSubCommandIDs(SubCommandIDsTable);
unsigned CurrentSubCommandID = SCIT - &SubCommands[0];
return std::find(SubCommandIDs.begin(), SubCommandIDs.end(),
CurrentSubCommandID) != SubCommandIDs.end();
return llvm::is_contained(SubCommandIDs, CurrentSubCommandID);
}

private:
Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/PassInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "llvm/ADT/StringRef.h"
#include <cassert>
#include <vector>

namespace llvm {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/Support/Mustache.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
#include "llvm/Support/JSON.h"
#include "llvm/Support/StringSaver.h"
#include <functional>
#include <vector>

namespace llvm::mustache {

Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/TargetParser/XtensaTargetParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define LLVM_TARGETPARSER_XTENSATARGETPARSER_H

#include "llvm/TargetParser/Triple.h"
#include <vector>

namespace llvm {
class StringRef;
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/Transforms/IPO/IROutliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ class IROutliner {
: getTTI(GTTI), getIRSI(GIRSI), getORE(GORE) {

// Check that the DenseMap implementation has not changed.
assert(DenseMapInfo<unsigned>::getEmptyKey() == (unsigned)-1 &&
"DenseMapInfo<unsigned>'s empty key isn't -1!");
assert(DenseMapInfo<unsigned>::getTombstoneKey() == (unsigned)-2 &&
"DenseMapInfo<unsigned>'s tombstone key isn't -2!");
static_assert(DenseMapInfo<unsigned>::getEmptyKey() ==
static_cast<unsigned>(-1));
static_assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2));
}
bool run(Module &M);

Expand Down
Loading