Skip to content

Commit aa90800

Browse files
authored
Merge pull request #633 from xiaobai/fix-swift-master-next
Fix swift/master-next
2 parents 2d2e6a2 + 1240129 commit aa90800

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,7 @@ unsigned SwiftExpressionParser::Parse(DiagnosticManager &diagnostic_manager,
16511651
if (log) {
16521652
std::string s;
16531653
llvm::raw_string_ostream ss(s);
1654-
const bool verbose = false;
1655-
sil_module->print(ss, verbose, &parsed_expr->module);
1654+
sil_module->print(ss, &parsed_expr->module);
16561655
ss.flush();
16571656

16581657
log->Printf("SIL module before linking:");
@@ -1667,8 +1666,7 @@ unsigned SwiftExpressionParser::Parse(DiagnosticManager &diagnostic_manager,
16671666
if (log) {
16681667
std::string s;
16691668
llvm::raw_string_ostream ss(s);
1670-
const bool verbose = false;
1671-
sil_module->print(ss, verbose, &parsed_expr->module);
1669+
sil_module->print(ss, &parsed_expr->module);
16721670
ss.flush();
16731671

16741672
log->Printf("Generated SIL module:");
@@ -1681,8 +1679,7 @@ unsigned SwiftExpressionParser::Parse(DiagnosticManager &diagnostic_manager,
16811679
if (log) {
16821680
std::string s;
16831681
llvm::raw_string_ostream ss(s);
1684-
const bool verbose = false;
1685-
sil_module->print(ss, verbose, &parsed_expr->module);
1682+
sil_module->print(ss, &parsed_expr->module);
16861683
ss.flush();
16871684

16881685
log->Printf("SIL module after diagnostic passes:");

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,6 @@ ParseSupportFilesFromPrologue(const lldb::ModuleSP &module,
220220
return support_files;
221221
}
222222

223-
FileSpecList SymbolFileDWARF::GetSymlinkPaths() {
224-
return GetGlobalPluginProperties()->GetSymLinkPaths();
225-
}
226-
227223
static inline bool IsSwiftLanguage(LanguageType language) {
228224
return language == eLanguageTypePLI || language == eLanguageTypeSwift ||
229225
((uint32_t)language == (uint32_t)llvm::dwarf::DW_LANG_Swift);

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,8 @@ void ClangASTContext::CreateASTContext() {
722722
ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) {
723723
ClangASTContext *clang_ast = GetASTMap().Lookup(ast);
724724
if (!clang_ast)
725-
clang_ast = new ClangASTContext(*ast);
725+
clang_ast = new ClangASTContext(
726+
"ASTContext from ClangASTContext::GetASTContext", *ast);
726727
return clang_ast;
727728
}
728729

lldb/source/Symbol/SwiftASTContext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ static bool IsDeviceSupport(const char *path) {
841841

842842
static std::string GetClangModulesCacheProperty() {
843843
llvm::SmallString<128> path;
844-
auto props = ModuleList::GetGlobalModuleListProperties();
844+
const auto &props = ModuleList::GetGlobalModuleListProperties();
845845
props.GetClangModulesCachePath().GetPath(path);
846846
return path.str();
847847
}
@@ -2690,7 +2690,7 @@ swift::ClangImporterOptions &SwiftASTContext::GetClangImporterOptions() {
26902690

26912691
// Set the Clang module search path.
26922692
llvm::SmallString<128> path;
2693-
auto props = ModuleList::GetGlobalModuleListProperties();
2693+
const auto &props = ModuleList::GetGlobalModuleListProperties();
26942694
props.GetClangModulesCachePath().GetPath(path);
26952695
clang_importer_options.ModuleCachePath = path.str();
26962696

@@ -3423,7 +3423,7 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
34233423
if (!m_ast_context_ap->SearchPathOpts.SDKPath.empty() || TargetHasNoSDK()) {
34243424
if (!clang_importer_options.OverrideResourceDir.empty()) {
34253425
// Create the DWARFImporterDelegate.
3426-
auto props = ModuleList::GetGlobalModuleListProperties();
3426+
const auto &props = ModuleList::GetGlobalModuleListProperties();
34273427
if (props.GetUseDWARFImporter())
34283428
m_dwarf_importer_delegate_up =
34293429
std::make_unique<SwiftDWARFImporterDelegate>(*this);
@@ -3480,7 +3480,7 @@ swift::ASTContext *SwiftASTContext::GetASTContext() {
34803480
prebuiltModuleCachePath.c_str());
34813481

34823482
// Determine the Swift module loading mode to use.
3483-
auto props = ModuleList::GetGlobalModuleListProperties();
3483+
const auto &props = ModuleList::GetGlobalModuleListProperties();
34843484
swift::ModuleLoadingMode loading_mode;
34853485
switch (props.GetSwiftModuleLoadingMode()) {
34863486
case eSwiftModuleLoadingModePreferSerialized:

0 commit comments

Comments
 (0)