Add a FIXME for an unfortunate issue in ConvertBackendLocation()
This function is copying the entire file contents into memory repeatedly and allocating new file IDs *each time* a source location is processed. llvm-svn: 211874
This commit is contained in:
parent
dada538bb4
commit
aa0dd5a409
|
@ -267,9 +267,11 @@ static FullSourceLoc ConvertBackendLocation(const llvm::SMDiagnostic &D,
|
|||
LSM.getMemoryBuffer(LSM.FindBufferContainingLoc(D.getLoc()));
|
||||
|
||||
// Create the copy and transfer ownership to clang::SourceManager.
|
||||
// TODO: Avoid copying files into memory.
|
||||
llvm::MemoryBuffer *CBuf =
|
||||
llvm::MemoryBuffer::getMemBufferCopy(LBuf->getBuffer(),
|
||||
LBuf->getBufferIdentifier());
|
||||
// FIXME: Keep a file ID map instead of creating new IDs for each location.
|
||||
FileID FID = CSM.createFileID(CBuf);
|
||||
|
||||
// Translate the offset into the file.
|
||||
|
|
Loading…
Reference in New Issue