diff options
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index eb9bbf2b7b..4ae96c2e64 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -74,6 +74,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // The make clang go fast button. CmdArgs.push_back("-disable-free"); + // Set the main file name, so that debug info works even with + // -save-temps. + CmdArgs.push_back("-main-file-name"); + CmdArgs.push_back(darwin::CC1::getBaseInputName(Args, Inputs)); + if (isa<AnalyzeJobAction>(JA)) { // Add default argument set. // |