mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +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:
@@ -819,11 +819,9 @@ unsigned DwarfDebug::GetOrCreateSourceID(StringRef FileName,
|
|||||||
return GetOrCreateSourceID("<stdin>", StringRef());
|
return GetOrCreateSourceID("<stdin>", StringRef());
|
||||||
|
|
||||||
// MCStream expects full path name as filename.
|
// MCStream expects full path name as filename.
|
||||||
if (!DirName.empty() && !FileName.startswith("/")) {
|
if (!DirName.empty() && !sys::path::is_absolute(FileName)) {
|
||||||
std::string FullPathName(DirName.data());
|
SmallString<128> FullPathName = DirName;
|
||||||
if (!DirName.endswith("/"))
|
sys::path::append(FullPathName, FileName);
|
||||||
FullPathName += "/";
|
|
||||||
FullPathName += FileName.data();
|
|
||||||
// Here FullPathName will be copied into StringMap by GetOrCreateSourceID.
|
// Here FullPathName will be copied into StringMap by GetOrCreateSourceID.
|
||||||
return GetOrCreateSourceID(StringRef(FullPathName), StringRef());
|
return GetOrCreateSourceID(StringRef(FullPathName), StringRef());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user