[llvm-dev] HelloWorldPass ?

Arthur Eubanks via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 2 15:06:31 PST 2021


The issue isn't which directory it's in, it's which CMake component it's
in. We would still have to create a new library if we put it under
llvm/examples.

On Tue, Feb 2, 2021 at 2:48 PM Florian Hahn <florian_hahn at apple.com> wrote:

>
>
> On 2 Feb 2021, at 22:41, Arthur Eubanks via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> This was added in https://reviews.llvm.org/D86979. My goal was to show
> how to write an in-tree NPM pass. It didn't really fit into any of the
> existing directories/libraries, so I created a similar one to the legacy
> HelloWorld example. Since it's unconditionally added to PassRegistry.def, I
> followed the CMake from something like llvm/lib/Transforms/Scalar. TBH I'm
> not super familiar with the various CMake machinery, so any suggestions are
> welcome.
>
> In hindsight, perhaps adding it to llvm/lib/Transforms/Scalar would be
> cleaner and would still properly show how to write an in-tree pass. I can
> go ahead and do that if you'd like.
>
>
>
> Could it go into llvm/examples or does it need to be under
> llvm/lib/Transforms?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210202/ef52896c/attachment-0001.html>


More information about the llvm-dev mailing list