Skip to content

Commit 779bdf0

Browse files
authored
Merge pull request #41550 from benlangmuir/make-next-less-sad
Pre-fix some build failures that we'll see with newer llvm
2 parents bd5a437 + 3547863 commit 779bdf0

File tree

15 files changed

+22
-19
lines changed

15 files changed

+22
-19
lines changed

include/swift/ABI/TypeIdentity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define SWIFT_ABI_TYPEIDENTITY_H
2020

2121
#include "swift/Basic/LLVM.h"
22+
#include <llvm/ADT/Optional.h>
2223
#include <llvm/ADT/StringRef.h>
2324

2425
namespace swift {

include/swift/Basic/DiverseStack.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ class DiverseValueBuffer {
395395
public:
396396
DiverseValueBuffer(const T &value) {
397397
size_t size = value.allocated_size();
398-
data.reserve(size);
399-
data.set_size(size);
398+
data.resize_for_overwrite(size);
400399
memcpy(data.data(), reinterpret_cast<const void *>(&value), size);
401400
}
402401

include/swift/Basic/Fingerprint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "swift/Basic/StableHasher.h"
1717
#include "llvm/ADT/Hashing.h"
18+
#include "llvm/ADT/Optional.h"
1819
#include "llvm/ADT/SmallString.h"
1920
#include "llvm/ADT/StringRef.h"
2021

include/swift/Basic/SourceLoc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/Basic/Debug.h"
2121
#include "swift/Basic/LLVM.h"
2222
#include "llvm/ADT/DenseMapInfo.h"
23+
#include "llvm/ADT/Hashing.h"
2324
#include "llvm/ADT/StringRef.h"
2425
#include "llvm/Support/SMLoc.h"
2526
#include <functional>

include/swift/Basic/Statistic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef SWIFT_BASIC_STATISTIC_H
1414
#define SWIFT_BASIC_STATISTIC_H
1515

16+
#include "llvm/ADT/Optional.h"
1617
#include "llvm/ADT/SmallString.h"
1718
#include "llvm/ADT/Statistic.h"
1819
#include "llvm/Support/Timer.h"

include/swift/Demangling/ManglingUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef SWIFT_DEMANGLING_MANGLINGUTILS_H
1414
#define SWIFT_DEMANGLING_MANGLINGUTILS_H
1515

16+
#include "llvm/ADT/Optional.h"
1617
#include "llvm/ADT/StringRef.h"
1718
#include "swift/Demangling/NamespaceMacros.h"
1819
#include "swift/Demangling/Punycode.h"

include/swift/Remote/MemoryReader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include "swift/Remote/RemoteAddress.h"
2222
#include "swift/SwiftRemoteMirror/MemoryReaderInterface.h"
23+
#include "llvm/ADT/Optional.h"
2324

2425
#include <cstring>
2526
#include <functional>

include/swift/SIL/SILInstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,12 @@ SILInstructionResultArray::end() const {
277277

278278
inline SILInstructionResultArray::reverse_iterator
279279
SILInstructionResultArray::rbegin() const {
280-
return llvm::make_reverse_iterator(end());
280+
return std::make_reverse_iterator(end());
281281
}
282282

283283
inline SILInstructionResultArray::reverse_iterator
284284
SILInstructionResultArray::rend() const {
285-
return llvm::make_reverse_iterator(begin());
285+
return std::make_reverse_iterator(begin());
286286
}
287287

288288
inline SILInstructionResultArray::range

include/swift/Syntax/AbsoluteRawSyntax.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ class OptionalStorage<AbsoluteRawSyntax> {
397397

398398
bool hasValue() const { return !Storage.isNull(); }
399399

400-
AbsoluteRawSyntax &getValue() LLVM_LVALUE_FUNCTION {
400+
AbsoluteRawSyntax &getValue() & {
401401
assert(hasValue());
402402
return Storage;
403403
}
404-
AbsoluteRawSyntax const &getValue() const LLVM_LVALUE_FUNCTION {
404+
AbsoluteRawSyntax const &getValue() const & {
405405
assert(hasValue());
406406
return Storage;
407407
}

include/swift/Syntax/SyntaxData.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,11 @@ class OptionalStorage<SyntaxDataRef> {
416416

417417
bool hasValue() const { return !Storage.getAbsoluteRaw().isNull(); }
418418

419-
SyntaxDataRef &getValue() LLVM_LVALUE_FUNCTION {
419+
SyntaxDataRef &getValue() & {
420420
assert(hasValue());
421421
return Storage;
422422
}
423-
SyntaxDataRef const &getValue() const LLVM_LVALUE_FUNCTION {
423+
SyntaxDataRef const &getValue() const & {
424424
assert(hasValue());
425425
return Storage;
426426
}

0 commit comments

Comments
 (0)