<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">There have been no comments/concerns
raised, so how can I get this committed to trunk?<br>
<br>
Thanks for your help,<br>
-Neil Henning.<br>
<br>
On 11/09/2013 10:26, Neil Henning wrote:<br>
</div>
<blockquote cite="mid:52303746.6050807@neil-henning.co.uk"
type="cite">CompilerInvocation can have a previously set
FileManager and SourceManager, but not a Preprocessor or
ASTContext. This stops Clang drivers from being able to declare
their own Preprocessor and ASTContext before calling using
FrontendAction's BeginSourceFile to compile.
<br>
<br>
This patch allows a Preprocessor or ASTContext to previously have
been set.
<br>
<br>
Any comments would be appreciated,
<br>
-Neil Henning.
<br>
<br>
Patch (also attached);
<br>
<blockquote type="cite">Index: lib/Frontend/FrontendAction.cpp
<br>
===================================================================
<br>
--- lib/Frontend/FrontendAction.cpp (revision 190499)
<br>
+++ lib/Frontend/FrontendAction.cpp (working copy)
<br>
@@ -265,7 +265,8 @@
<br>
}
<br>
<br>
// Set up the preprocessor.
<br>
- CI.createPreprocessor();
<br>
+ if(!CI.hasPreprocessor())
<br>
+ CI.createPreprocessor();
<br>
<br>
// Inform the diagnostic client we are processing a source
file.
<br>
CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(),
<br>
@@ -279,7 +280,8 @@
<br>
// Create the AST context and consumer unless this is a
preprocessor only
<br>
// action.
<br>
if (!usesPreprocessorOnly()) {
<br>
- CI.createASTContext();
<br>
+ if(!CI.hasASTContext())
<br>
+ CI.createASTContext();
<br>
<br>
OwningPtr<ASTConsumer> Consumer(
<br>
CreateWrappedASTConsumer(CI,
InputFile));
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a>
</pre>
</blockquote>
<br>
</body>
</html>