Skip to content

Commit 3707cfa

Browse files
author
Nathan Hawes
committed
Fix build failures due to Tyoe::dump() api difference + string conversions
1 parent 607e2b8 commit 3707cfa

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Diff for: include/swift/AST/ExtInfo.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
namespace clang {
3232
class Type;
33+
class ASTContext;
3334
} // namespace clang
3435

3536
namespace swift {
@@ -77,7 +78,7 @@ class ClangTypeInfo {
7778
/// Use the ClangModuleLoader to print the Clang type as a string.
7879
void printType(ClangModuleLoader *cml, llvm::raw_ostream &os) const;
7980

80-
void dump(llvm::raw_ostream &os) const;
81+
void dump(llvm::raw_ostream &os, const clang::ASTContext &ctx) const;
8182
};
8283

8384
// MARK: - FunctionTypeRepresentation

Diff for: lib/AST/ExtInfo.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ void ClangTypeInfo::printType(ClangModuleLoader *cml,
4343
cml->printClangType(type, os);
4444
}
4545

46-
void ClangTypeInfo::dump(llvm::raw_ostream &os) const {
46+
void ClangTypeInfo::dump(llvm::raw_ostream &os,
47+
const clang::ASTContext &ctx) const {
4748
if (type) {
48-
type->dump(os);
49+
type->dump(os, ctx);
4950
} else {
5051
os << "<nullptr>";
5152
}

Diff for: lib/SILOptimizer/Transforms/StringOptimization.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ bool StringOptimization::optimizeStringConcat(ApplyInst *concatCall) {
235235

236236
// Replace lhs + rhs with "lhs + rhs" if both lhs and rhs are constant.
237237
if (lhsString.isConstant() && rhsString.isConstant()) {
238-
std::string concat = lhsString.str;
238+
std::string concat = lhsString.str.str();
239239
concat += rhsString.str;
240240
if (ApplyInst *stringInit = createStringInit(concat, concatCall)) {
241241
concatCall->replaceAllUsesWith(stringInit);

0 commit comments

Comments
 (0)