Skip to content

Commit cf66110

Browse files
Merge pull request #11125 from cachemeifyoucan/eng/PR-156759645-release
[6.2][clang][DebugInfo] Handle empty comp_dir in CodeGen
2 parents e16f277 + 00a09be commit cf66110

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,6 +3119,9 @@ llvm::DIModule *CGDebugInfo::getOrCreateModuleRef(ASTSourceDescriptor Mod,
31193119
std::string Remapped = remapDIPath(Path);
31203120
StringRef Relative(Remapped);
31213121
StringRef CompDir = TheCU->getDirectory();
3122+
if (CompDir.empty())
3123+
return Remapped;
3124+
31223125
if (Relative.consume_front(CompDir))
31233126
Relative.consume_front(llvm::sys::path::get_separator());
31243127

0 commit comments

Comments
 (0)