Skip to content

Commit 97f490c

Browse files
Merge pull request #58922 from aschwaighofer/fix_clangimporter_smallvector_template_parameter
ClangImporter.cpp: Fix compilation on some linux systems
2 parents 727d3fe + 9cb2573 commit 97f490c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ importer::addCommonInvocationArguments(
866866
/// On Linux, some platform libraries (glibc, libstdc++) are not modularized.
867867
/// We inject modulemaps for those libraries into their include directories
868868
/// to allow using them from Swift.
869-
static SmallVector<std::pair<std::string, std::string>>
869+
static SmallVector<std::pair<std::string, std::string>, 16>
870870
getClangInvocationFileMapping(ASTContext &ctx) {
871871
using Path = SmallString<128>;
872872

@@ -923,7 +923,7 @@ getClangInvocationFileMapping(ASTContext &ctx) {
923923
cxxStdlibDirs.push_back(Path(iter->path()));
924924
}
925925

926-
SmallVector<std::pair<std::string, std::string>> result;
926+
SmallVector<std::pair<std::string, std::string>, 16> result;
927927
// Inject a modulemap into the VFS for each of the libstdc++ versions.
928928
for (const Path &cxxStdlibDir : cxxStdlibDirs) {
929929
// Only inject the module map if the module does not already exist at

0 commit comments

Comments
 (0)