Unlike LoadFromCommandLine, LoadFromCompilerInvocation(the one with many arguments) causes a crash if Precompilepreamble is set to true because there is no FileManager at that point. Two methods are not in sync despite being very similar..<br>
<br>Index: lib/Frontend/ASTUnit.cpp<br>===================================================================<br>--- lib/Frontend/ASTUnit.cpp    (revision 172881)<br>+++ lib/Frontend/ASTUnit.cpp    (working copy)<br>@@ -1913,6 +1913,8 @@<br>
   AST->IncludeBriefCommentsInCodeCompletion<br>     = IncludeBriefCommentsInCodeCompletion;<br>   AST->Invocation = CI;<br>+  AST->FileSystemOpts = CI->getFileSystemOpts();<br>+  AST->FileMgr = new FileManager(AST->FileSystemOpts);<br>
   AST->UserFilesAreVolatile = UserFilesAreVolatile;<br>   <br>   // Recover resources if we crash before exiting this method.<br><br>