Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:55:03+00:00 2026-06-15T07:55:03+00:00

Now we are implementing a analysis pass for llvm , following this tutorial .

  • 0

Now we are implementing a analysis pass for llvm, following this tutorial. and need to pass an additional argument to the plugin such as below:

opt -load /path/to/myplugin.so -mypass -mypass_option input.bc

However I did not find any manual telling me how to do. So I’m wondering whether it is possible in practice.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:55:05+00:00Added an answer on June 15, 2026 at 7:55 am

    You should use the CommandLine library which comes built-in with LLVM. Basically, you just put at the top of the .cpp file of the pass:

    #include "llvm/Support/CommandLine.h"
    
    static cl::opt<string> InputFilename("mypass_option", cl::desc("Specify input filename for mypass"), cl::value_desc("filename"));
    

    But I recommend you check the above link, it has full reference + convenient quickstart section.

    For an example, take a look at the built-in loop unrolling pass – it defines two unsigned and two boolean options, right at the top of the source file, by using cl::opt<unsigned> and cl::opt<bool>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been stuck for a day now on implementing openssl(on windows) md5. Such
I'm now implementing something like this post (specifically, the effect takes place when the
I am implementing a rest API and now I have to execute following request
i implementing Java WebService with JAX-WS and now need to secure my webservice with
I'm implementing now CPU schedule algorithms FCFS, SJF and Round Robin. Could somebody tell
I'm implementing right now some syscalls from unistd.h and fcntl.h (open, read, close, e.t.c)
Hey I am implementing the drag and drop operations using Kineticjs Now I want
I am implementing a little extension for an existing application. Now I am creating
I have written an API Bundle and some implementing services. Now i want to
Now I'm not sure if this is something I'm doing wrong, or something thats

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.