<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 2, 2021 at 2:48 PM Florian Hahn <<a href="mailto:florian_hahn@apple.com" target="_blank">florian_hahn@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On 2 Feb 2021, at 22:41, Arthur Eubanks via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr">This was added in <a href="https://reviews.llvm.org/D86979" target="_blank">https://reviews.llvm.org/D86979</a>. 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.<div><br></div><div>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.</div></div></div></blockquote></div><br><div><br></div><div>Could it go into llvm/examples or does it need to be under llvm/lib/Transforms?</div></div></blockquote></div>