user1388672
user1388672

Reputation: 297

How to get argument of opt in llvm pass?

I want to get the argument of opt (the output file after '-o') in a pass.

I have tried the following code. But the compiler reports 'bolt/Utils/CommandLineOpts.h' file not found

#include "bolt/Utils/CommandLineOpts.h"

std::string output = opts::OutputFilename.getValue();

I have checked the build command of llvm. I have set -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libunwind;lldb;lld;compiler-rt;polly;bolt". This includes bolt subproject.

What should I do?

Upvotes: 0

Views: 43

Answers (0)

Related Questions