[PATCH] D18131: Fix SourceFileName when loading the FunctionInfoIndex from bitcode.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 12 23:20:38 PST 2016
joker.eph created this revision.
joker.eph added a reviewer: tejohnson.
joker.eph added a subscriber: llvm-commits.
We need to use the SourceFileName recorded in the bitcode, and not the "identifier" of the buffer.
http://reviews.llvm.org/D18131
Files:
lib/Bitcode/Reader/BitcodeReader.cpp
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<GlobalVarSummary> FS =
llvm::make_unique<GlobalVarSummary>(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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18131.50545.patch
Type: text/x-patch
Size: 1093 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160313/0090d1fc/attachment.bin>
More information about the llvm-commits
mailing list