File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -347,13 +347,11 @@ class LLIObjectCache : public ObjectCache {
347347private:
348348 std::string CacheDir;
349349
350- bool getCacheFilename (const std::string &ModID, std::string &CacheName) {
351- std::string Prefix (" file:" );
352- size_t PrefixLength = Prefix.length ();
353- if (ModID.substr (0 , PrefixLength) != Prefix)
350+ bool getCacheFilename (StringRef ModID, std::string &CacheName) {
351+ if (!ModID.consume_front (" file:" ))
354352 return false ;
355353
356- std::string CacheSubdir = ModID. substr (PrefixLength );
354+ std::string CacheSubdir = std::string (ModID );
357355 // Transform "X:\foo" => "/X\foo" for convenience on Windows.
358356 if (is_style_windows (llvm::sys::path::Style::native) &&
359357 isalpha (CacheSubdir[0 ]) && CacheSubdir[1 ] == ' :' ) {
You can’t perform that action at this time.
0 commit comments