Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Serialization/ASTReader.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Config/config.h"
#include "llvm/IR/Constants.h"
Expand Down Expand Up @@ -775,10 +776,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
// include path set to the working directory.
auto &HSI =
CI.getClangPreprocessor().getHeaderSearchInfo().getHeaderSearchOpts();
if (HSI.ModuleFileHomeIsCwd) {
Desc = ASTSourceDescriptor(Desc.getModuleName(), Opts.DebugCompilationDir,
Desc.getASTFile(), Desc.getSignature());
}
StringRef IncludePath =
HSI.ModuleFileHomeIsCwd ? Opts.DebugCompilationDir : Desc.getPath();

// Handle Clang modules.
if (ClangModule) {
Expand All @@ -800,11 +799,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
ClangModule->Parent);
}
return getOrCreateModule(ClangModule, Parent, Desc.getModuleName(),
Desc.getPath(), Signature, Desc.getASTFile());
IncludePath, Signature, Desc.getASTFile());
}
// Handle PCH.
return getOrCreateModule(Desc.getASTFile().bytes_begin(), nullptr,
Desc.getModuleName(), Desc.getPath(), Signature,
Desc.getModuleName(), IncludePath, Signature,
Desc.getASTFile());
};

Expand Down