I am trying to read an AST file from a memory buffer, here is my approach, but is not working.
theFile.first = “myFileName.ast”;
theFile.second = llvm::MemoryBuffer::getMemBufferCopy(myVirtualString, “someBufferName”);
// Import AST from virtual file using this remapped file.
llvm::OwningPtrclang::ASTUnit CUnit(ASTUnit::LoadFromASTFile(“myFileName.ast”, &ci2.getDiagnostics(), ci2.getFileSystemOpts(), false, &theFile, 1));
But this is returning NULL on ASTUnit, does anyone know how to fill this ASTUnit with a virtual buffer?