[cfe-dev] multiple .C files in SourceManager

Karthik Bhat blitz.opensource at gmail.com
Wed Feb 20 22:12:13 PST 2013


Hi Sean,
Thanks for the reply. I'm sorry i didn't make my requirement clear in the
last mail.

As per my understanding compiler Instance operates on one file at a time
and hence at a time the Source Manager contains only the information about
the current file being processed.

Given the command -

clang -cc1 test1.c test2.c

While processing test1.c Source manager will not have any information about
test2.c. Is my understanding correct?

Is it possible to provide Sourcemanager with information about test2.c as
well while the current file being processed is test1.c?


In my current requirement i'm trying to emit warnings in case we have a
call from a function in test1.c to a function in test2.c which might result
in some problems. Hence would require the Source manager to have
information of test2.c as well while the current file being processed is
test1.c

Thanks.




On Wed, Feb 20, 2013 at 11:23 PM, Sean Silva <silvas at purdue.edu> wrote:

> The SourceManager is meant to manage all the sources. Don't use one
> SourceManager per file.
>
> -- Sean Silva
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130221/c79ce293/attachment.html>


More information about the cfe-dev mailing list