[llvm-dev] SourceMgr include relative to current file

Sean Silva via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 22 17:19:04 PDT 2015


On Tue, Sep 22, 2015 at 5:43 AM, Russell Wallace via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> SourceMgr provides AddIncludeFile which I'm thinking of using for parsing
> the TPTP language.
>
> As far as I can see, AddIncludeFile only deals with #include <...> style,
> i.e. only search the include directories. I don't see any code for dealing
> with #include "...", i.e. first look relative to the current file.
>
> Is there something I'm missing? How does clang handle this?
>

Clang is a totally different beast, and the meaning of "..." vs. <...> is
not what you just described (it is much more complicated).

It sounds like what you want is to just add the directory containing the
file as an include path.

-- Sean Silva


>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150922/205a6357/attachment.html>


More information about the llvm-dev mailing list