0

Is there any way to execute linux commands in llvm pass and parse the objdump in it.

For example in python we can do as follows:

os.system('gcc example.c -o example') 
os.system('objdump -o example > parsed.txt')

and parse it by using regular expression.So, similarly can we do it in llvm pass as well?

3
  • You could call out to the system using any normal C/C++ system programming tools, but that would probably be considered "weird". What are you actually trying to accomplish? Commented Dec 14, 2016 at 16:22
  • @echristo - It's for my project, already I have an llvm pass, so I have to create another llvm pass so that I can call system () to execute the old llvm pass from the new llvm pass and then parse the object file of it.So can i use getAnalysisUsage() to do this? Commented Dec 15, 2016 at 15:07
  • You should just add you new pass to the pass pipeline like you did with your previous pass. Commented Jan 3, 2017 at 6:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.