Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 7 additions & 4 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2112,12 +2112,15 @@ void SwiftASTContext::AddExtraClangCC1Args(
else
++it;
}
invocation.getFrontendOpts().ModuleFiles.erase(
llvm::remove_if(invocation.getFrontendOpts().ModuleFiles,
[&](const auto &mod) { return !CheckFileExists(mod); }),
invocation.getFrontendOpts().ModuleFiles.end());
llvm::erase_if(invocation.getFrontendOpts().ModuleFiles,
[&](const auto &mod) { return !CheckFileExists(mod); });
}

// Remove -Werror flags.
Comment thread
adrian-prantl marked this conversation as resolved.
llvm::erase_if(
invocation.getDiagnosticOpts().Warnings,
[](StringRef Warning) { return Warning.starts_with("error"); });

invocation.generateCC1CommandLine(
[&](const llvm::Twine &arg) { dest.push_back(arg.str()); });

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/swift/clangimporter/caching/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SWIFT_SOURCES := main.swift
SWIFT_ENABLE_EXPLICIT_MODULES := YES
SWIFTFLAGS_EXTRAS = -I$(SRCDIR) -I/TEST_DIR -F/FRAMEWORK_DIR -cache-compile-job -cas-path $(BUILDDIR)/cas
SWIFTFLAGS_EXTRAS = -I$(SRCDIR) -I/TEST_DIR -F/FRAMEWORK_DIR -cache-compile-job -cas-path $(BUILDDIR)/cas -Xcc -Werror

all: a.out cas-config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ def test(self):
# CHECK: SwiftASTContextForExpressions(module: "a", cu: "main.swift")::LogConfiguration() -- -DADDED=1
# CHECK: SwiftASTContextForExpressions(module: "a", cu: "main.swift")::LogConfiguration() -- -DEXTRA=1
# CHECK: SwiftASTContextForExpressions(module: "a", cu: "main.swift") Module import remark: loaded module 'ClangA'
# CHECK-NOT: -Werror
# CHECK-NOT: -cc1
# CHECK-NOT: Clang error