Skip to content

Commit 7783201

Browse files
committed
Use getSDKPath() for WASI in ClangImporter
1 parent b141d1b commit 7783201

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,11 @@ getWasiLibcModuleMapPath(SearchPathOptions& Opts, llvm::Triple triple,
481481
SmallVectorImpl<char> &buffer) {
482482
StringRef platform = swift::getPlatformNameForTriple(triple);
483483
StringRef arch = swift::getMajorArchitectureName(triple);
484+
StringRef SDKPath = Opts.getSDKPath();
484485

485-
if (!Opts.SDKPath.empty()) {
486+
if (!SDKPath.empty()) {
486487
buffer.clear();
487-
buffer.append(Opts.SDKPath.begin(), Opts.SDKPath.end());
488+
buffer.append(SDKPath.begin(), SDKPath.end());
488489
llvm::sys::path::append(buffer, "usr", "lib", "swift");
489490
llvm::sys::path::append(buffer, platform, arch, "wasi.modulemap");
490491

0 commit comments

Comments
 (0)