bruno added a comment.
Ping!
https://reviews.llvm.org/D33275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bruno added a comment.
That sounds even better. Thanks @v.g.vassilev
https://reviews.llvm.org/D33275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
v.g.vassilev added a comment.
@rsmith suggested to move this one interface layer down, that is
`ContentCache::getBuffer`. Moving it there might fix more issues. I will try to
improve it and land the new version if that's not urgent for you.
https://reviews.llvm.org/D33275
__
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
We're hitting a very similar problem to this one, which I think this patch will
likely fix. I can't come up with a reproducible testcase either. If you can
write one better yet, but I'm ok with
v.g.vassilev added a comment.
We have this pattern:
FileID FID;
const clang::FileEntry* FE
= SM.getFileManager().getVirtualFile(source_name.str(), InputSize,
0 /* mod time*/);
SM.overrideFileContents(FE, std::move(MB)); // MB is a llvm::MemoryBuf
bruno added a comment.
Hi Vassil,
In which case specifically this trigger for you? I'm curious because we're
sometimes hitting non-deterministic crashes in ComputeLineNumbers, wonder if
it's related.
Any chance you can come up with a testcase?
https://reviews.llvm.org/D33275
__
v.g.vassilev created this revision.
In some cases we do not have files on disk. They are only available in the
FileManager as virtual files and the SourceManager overrides their content.
https://reviews.llvm.org/D33275
Files:
lib/Basic/SourceManager.cpp
lib/Frontend/VerifyDiagnosticConsume