Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -5764,7 +5764,7 @@ // module path string table entry with an empty (0) ID to take // ownership. FS->setModulePath( - TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0)); + TheIndex->addModulePath(SourceFileName, 0)); static int RefListStartIndex = 4; int CallGraphEdgeStartIndex = RefListStartIndex + NumRefs; assert(Record.size() >= RefListStartIndex + NumRefs && @@ -5802,7 +5802,7 @@ std::unique_ptr FS = llvm::make_unique(getDecodedLinkage(RawLinkage)); FS->setModulePath( - TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0)); + TheIndex->addModulePath(SourceFileName, 0)); for (unsigned I = 2, E = Record.size(); I != E; ++I) { unsigned RefValueId = Record[I]; uint64_t RefGUID = getGUIDFromValueId(RefValueId);