<div dir="ltr">Hi clangers!<div><br></div><div> I am trying to read an AST file from a memory buffer, here is my approach, but is not working.<div><br></div><div><div> ASTUnit::RemappedFile theFile;</div><div> theFile.first = "myFileName.ast";</div>
<div> theFile.second = llvm::MemoryBuffer::getMemBufferCopy(myVirtualString, "someBufferName");</div><div> </div><div> </div><div> // Import AST from virtual file using this remapped file.</div><div> llvm::OwningPtr<clang::ASTUnit> CUnit(ASTUnit::LoadFromASTFile("myFileName.ast", &ci2.getDiagnostics(), ci2.getFileSystemOpts(), false, &theFile, 1));</div>
</div><div><br></div><div>But this is returning NULL on ASTUnit, does anyone know how to fill this ASTUnit with a virtual buffer?</div></div></div>