@@ -35,8 +35,8 @@ bool CppModuleConfiguration::SetOncePath::TrySet(llvm::StringRef path) {
3535static llvm::SmallVector<std::string, 2 >
3636getTargetIncludePaths (const llvm::Triple &triple) {
3737 llvm::SmallVector<std::string, 2 > paths;
38- if (!triple.str ( false ).empty ()) {
39- paths.push_back (" /usr/include/" + triple.str ( false ));
38+ if (!triple.clone ( true , false ). str ( ).empty ()) {
39+ paths.push_back (" /usr/include/" + triple.clone ( true , false ). str ( ));
4040 if (!triple.getArchName ().empty () ||
4141 triple.getOSAndEnvironmentName ().empty ())
4242 paths.push_back ((" /usr/include/" + triple.getArchName () + " -" +
@@ -75,13 +75,13 @@ bool CppModuleConfiguration::analyzeFile(const FileSpec &f,
7575 parent_path (posix_dir, Style::posix).ends_with (" c++" )) {
7676 if (!m_std_inc.TrySet (posix_dir))
7777 return false ;
78- if (triple.str ( false ).empty ())
78+ if (triple.clone ( true , false ). str ( ).empty ())
7979 return true ;
8080
8181 posix_dir.consume_back (" c++/v1" );
8282 // Check if this is a target-specific libc++ include directory.
8383 return m_std_target_inc.TrySet (
84- (posix_dir + triple.str ( false ) + " /c++/v1" ).str ());
84+ (posix_dir + triple.clone ( true , false ). str ( ) + " /c++/v1" ).str ());
8585 }
8686
8787 std::optional<llvm::StringRef> inc_path;
0 commit comments