r249413 - [Tooling] Don't run a tool invocation without a FileManager.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 12:48:03 PDT 2015
On Tue, Oct 6, 2015 at 8:04 AM, Benjamin Kramer via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: d0k
> Date: Tue Oct 6 10:04:13 2015
> New Revision: 249413
>
> URL: http://llvm.org/viewvc/llvm-project?rev=249413&view=rev
> Log:
> [Tooling] Don't run a tool invocation without a FileManager.
>
> Fixes a crash regression from r249410.
>
> Modified:
> cfe/trunk/lib/Tooling/Tooling.cpp
>
> Modified: cfe/trunk/lib/Tooling/Tooling.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=249413&r1=249412&r2=249413&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Tooling/Tooling.cpp (original)
> +++ cfe/trunk/lib/Tooling/Tooling.cpp Tue Oct 6 10:04:13 2015
> @@ -455,8 +455,10 @@ std::unique_ptr<ASTUnit> buildASTFromCod
>
> std::vector<std::unique_ptr<ASTUnit>> ASTs;
> ASTBuilderAction Action(ASTs);
> + llvm::IntrusiveRefCntPtr<FileManager> Files(
> + new FileManager(FileSystemOptions()));
> ToolInvocation Invocation(getSyntaxOnlyToolArgs(Args, FileNameRef),
> &Action,
> - nullptr, PCHContainerOps);
> + Files.get(), PCHContainerOps);
>
Why is this a pointer parameter instead of a reference?
>
> SmallString<1024> CodeStorage;
> Invocation.mapVirtualFile(FileNameRef,
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151006/f6ce82b8/attachment.html>
More information about the cfe-commits
mailing list