mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Use path API for path concatenation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6536644713
commit
ab5f788f67
@ -819,11 +819,9 @@ unsigned DwarfDebug::GetOrCreateSourceID(StringRef FileName,
|
||||
return GetOrCreateSourceID("<stdin>", StringRef());
|
||||
|
||||
// MCStream expects full path name as filename.
|
||||
if (!DirName.empty() && !FileName.startswith("/")) {
|
||||
std::string FullPathName(DirName.data());
|
||||
if (!DirName.endswith("/"))
|
||||
FullPathName += "/";
|
||||
FullPathName += FileName.data();
|
||||
if (!DirName.empty() && !sys::path::is_absolute(FileName)) {
|
||||
SmallString<128> FullPathName = DirName;
|
||||
sys::path::append(FullPathName, FileName);
|
||||
// Here FullPathName will be copied into StringMap by GetOrCreateSourceID.
|
||||
return GetOrCreateSourceID(StringRef(FullPathName), StringRef());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user