<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/115143>115143</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Loading a custom pass via opt in LLVM 18.1.8
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sec-staff-lilithgames
      </td>
    </tr>
</table>

<pre>
    I am a newbie here and I followed several instructions to have built the LLVM 18.1.8. And I cloned a repo from github to build and test myself.
![image](https://github.com/user-attachments/assets/3b02ee87-f32f-4509-aed4-2099fb346ee9)
Above is the registry module, I found none of the pass registered there has a name being called, so I added the if-else logic to name the TestMachinePass as "test". 

I used "cmake" to build up all of things and tried to load the TestMachinePass namely the "test" pass via opt.

  "opt --load-pass-plugin="./build/skeleton/SkeletonPass.dll" --passes="test" test.ll -S -o test.op.ll"

but it just output the "unknown pass name 'test'.

I tried to use "opt -print-passes" to print avaliable passes but there is no my pass named "test".

anyone has the same problem? 




</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE9vpLgT_TTmUgKBaRr6wCHzi1qKlJF-0qz2XsYFeGJsRNkd9bdfGZJJR1rtxTauP-_Vc1HIbCZH1Ivmh2ieM4xh9lvPNOQccBxza6wJ84QLcaa8vvcvgAsgOHpXhmCmjQCdhhcYvbX-nTQw3WhDC8Zx2OIQjHcMwcOMNwIVjQ0QZoLX179_QtUVVdEV8LSnGKx3pAFho9XDuPkFJhPmqFJ4itQ7ViAOsNyZ7FiI8lmUT0JWovlhFpxINM9CdnMIK4v6ScirkNcjSTH4RchrZNpyDAGHeSEXWMgrMtN-qFUpibo2H2s55qemvORI-pTL8nIZVX06E12EvBygT8rfCAzv1Ww0GQ7bHRavoyUh_7dLEp0G5x2BH3e3FZk_fGkjne42ghk5SYoLgSLjJhjQWtIpCXt4AdT68AUz5mSZwPrJDEmVPShZ_iIOP3GYjaP_JxBkEFImqYSUBXzotK8vEJl0Mg8LvpGQ8kvfuAJae9A1buJD8M0kfA_Wo_5XtETD3nfTF-pR7c0g-DUUjwwgefk1QJ6nlHlyzFcbJ-NE_ZwIC3ndCQl55TeyFLwT8vrr45gwC21tAsn3aOIj8BM67YW1kP-C3B9ffi32iEciKgYwAX5HDuBjWGP4rCG6N-ff3VHDrrKQ7ZG9Lb6r-UeeyPSnsHUzLnxSOxTerwBvaA0qezQDMagDdNt7yXlY7l-g-vERH1HR3VNbpc5JhDkRXDevLC2ivn577sc1032tL_UFM-qrti67rm2rNpt77Nr6jOrS4aC78TKOpM9t29SNGio9KpWZXpbyVFXluSrLrm6LUy3P8ixH1Y51rRoSp5IWNLaw9rYUfpsywxypr6qmOtWZRUWW9zkjpaN32K3pOZrnbOtTUK7ixOJUWsOBv9IEEyz1rx51-jUQhsjBL9-aC4x7nCdZ3Gz_HyMgpf7Y8nXzv2kIQl53QmkKfDC-9fKfAAAA___3kaaj">