Skip to content

Commit b707b7f

Browse files
committed
Fixing build breaks for master-next against latest llvm.org.
There were changes due to the StringRef to std::string conversion, changes in the Debug Info DIBuilder::createModule API, and a drop in the using for PointerUnion4 since PointerUnion is now a variadic template and will do in its place.
1 parent d142b43 commit b707b7f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,7 @@ bool RefactoringActionConvertToSwitchStmt::performChange() {
24702470
std::string findDefaultStatements() {
24712471
auto ElseBody = dyn_cast_or_null<BraceStmt>(PreviousIf->getElseStmt());
24722472
if (!ElseBody)
2473-
return getTokenText(tok::kw_break);
2473+
return getTokenText(tok::kw_break).str();
24742474
return findBodyWithoutBraces(ElseBody);
24752475
}
24762476

@@ -2479,7 +2479,7 @@ bool RefactoringActionConvertToSwitchStmt::performChange() {
24792479
if (!BS)
24802480
return Lexer::getCharSourceRangeFromSourceRange(SM, body->getSourceRange()).str().str();
24812481
if (BS->getElements().empty())
2482-
return getTokenText(tok::kw_break);
2482+
return getTokenText(tok::kw_break).str();
24832483
SourceRange BodyRange = BS->getElements().front().getSourceRange();
24842484
BodyRange.widen(BS->getElements().back().getSourceRange());
24852485
return Lexer::getCharSourceRangeFromSourceRange(SM, BodyRange).str().str();

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2759,7 +2759,7 @@ std::string swift::describeGenericType(ValueDecl *GP, bool includeName) {
27592759
OS << " '" << decl->getFullName() << "'";
27602760
}
27612761

2762-
return OS.str();
2762+
return OS.str().str();
27632763
}
27642764

27652765
/// Special handling of conflicts associated with generic arguments.

lib/Sema/ConstraintSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,8 @@ struct Score {
781781

782782
/// An AST node that can gain type information while solving.
783783
using TypedNode =
784-
llvm::PointerUnion4<const Expr *, const TypeLoc *,
785-
const VarDecl *, const Pattern *>;
784+
llvm::PointerUnion<const Expr *, const TypeLoc *,
785+
const VarDecl *, const Pattern *>;
786786

787787
/// Display a score.
788788
llvm::raw_ostream &operator<<(llvm::raw_ostream &out, const Score &score);

0 commit comments

Comments
 (0)