Pass the debug info settings through to Clang and ensure that compile units

created by Swift and Clang set the CU's compilation dir similarly.

rdar://problem/22692266

Swift SVN r32637
This commit is contained in:
Adrian Prantl
2015-10-12 22:20:58 +00:00
parent 15e3e59cd1
commit 3356f7ac59
13 changed files with 88 additions and 69 deletions

View File

@@ -1047,6 +1047,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
CompilerInvocation::buildDWARFDebugFlags(Opts.DWARFDebugFlags,
RenderedArgs, SDKPath,
ResourceDir);
// TODO: Should we support -fdebug-compilation-dir?
llvm::SmallString<256> cwd;
llvm::sys::fs::current_path(cwd);
Opts.DebugCompilationDir = cwd.str();
}
}