mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
lli: Tweak CacheName not to contain DOS driveletter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32712c7614
commit
744f816bc1
@ -304,7 +304,15 @@ private:
|
||||
size_t PrefixLength = Prefix.length();
|
||||
if (ModID.substr(0, PrefixLength) != Prefix)
|
||||
return false;
|
||||
CacheName = CacheDir + ModID.substr(PrefixLength);
|
||||
std::string CacheSubdir = ModID.substr(PrefixLength);
|
||||
#if defined(_WIN32)
|
||||
// Transform "X:\foo" => "/X\foo" for convenience.
|
||||
if (isalpha(CacheSubdir[0]) && CacheSubdir[1] == ':') {
|
||||
CacheSubdir[1] = CacheSubdir[0];
|
||||
CacheSubdir[0] = '/';
|
||||
}
|
||||
#endif
|
||||
CacheName = CacheDir + CacheSubdir;
|
||||
size_t pos = CacheName.rfind('.');
|
||||
CacheName.replace(pos, CacheName.length() - pos, ".o");
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user