FileInfo always has content cache and replaceBuffer became setBuffer.
See llvm/llvm-project@296314516d
This commit is contained in:
parent
0041450ed4
commit
7fcc35181a
@ -1547,11 +1547,11 @@ namespace {
|
||||
SM->setMainFileID(MainFileID);
|
||||
const SrcMgr::SLocEntry& MainFileSLocE = SM->getSLocEntry(MainFileID);
|
||||
const SrcMgr::FileInfo& MainFileFI = MainFileSLocE.getFile();
|
||||
SrcMgr::ContentCache* MainFileCC
|
||||
= const_cast<SrcMgr::ContentCache*>(MainFileFI.getContentCache());
|
||||
SrcMgr::ContentCache& MainFileCC
|
||||
= const_cast<SrcMgr::ContentCache&>(MainFileFI.getContentCache());
|
||||
if (!Buffer)
|
||||
Buffer = llvm::MemoryBuffer::getMemBuffer("/*CLING DEFAULT MEMBUF*/;\n");
|
||||
MainFileCC->replaceBuffer(Buffer.release(), /*DoNotFree*/ false);
|
||||
MainFileCC.setBuffer(std::move(Buffer));
|
||||
|
||||
// Create TargetInfo for the other side of CUDA and OpenMP compilation.
|
||||
if ((CI->getLangOpts().CUDA || CI->getLangOpts().OpenMPIsDevice) &&
|
||||
|
Loading…
Reference in New Issue
Block a user