Sevak Sargsyan
2012-Feb-21 09:41 UTC
[LLVMdev] How To Pass An Command Line Option To The Pass
Hi all, I have a problem with passing multiple option(-flag=aaa/bbb) from clang to llvm, I don't know how to parse it, should I parse it in clang and pass it to llvm or should I parse it in llvm pass where I use it, could you help me. Thanks in advance, Sevak.
Tobias von Koch
2012-Feb-21 10:44 UTC
[LLVMdev] How To Pass An Command Line Option To The Pass
Hi Sevak, You can use the cl::opt<> template to declare your options inside your LLVM pass. When calling clang, you can then pass options using -mllvm (e.g. clang -mllvm -my-option=1). Tobias On Tue, Feb 21, 2012 at 09:41, Sevak Sargsyan <sevaksargsyan777 at gmail.com>wrote:> Hi all, > > I have a problem with passing multiple option(-flag=aaa/bbb) from clang to > llvm, > I don't know how to parse it, should I parse it in clang and pass it > to llvm or should I parse it in llvm pass where I use it, > could you help me. > > Thanks in advance, > Sevak. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120221/97a784f2/attachment.html>
Sevak Sargsyan
2012-Feb-22 12:29 UTC
[LLVMdev] How To Pass An Command Line Option To The Pass
Hi all, I have problem with debugging clang, gdb does not stop in function ParseFrontendArgs, the function works because I wrote errs() and I saw it in command line, I also wrote __asm__("int $3") in ParseFrontendArgs but it does not help. Thanks in advance.
Tom Honermann
2012-Feb-22 15:18 UTC
[LLVMdev] How To Pass An Command Line Option To The Pass
On 2/22/2012 7:29 AM, Sevak Sargsyan wrote:> Hi all, > I have problem with debugging clang, gdb does not stop in function > ParseFrontendArgs, the function works because I wrote errs() and I saw > it in command line, > I also wrote __asm__("int $3") in ParseFrontendArgs but it does not help.Are you debugging the correct process? Note that invocations of 'clang' without '-cc1' fork/exec 'clang -cc1' to handle front end options. Tom.
Possibly Parallel Threads
- [LLVMdev] How To Pass An Command Line Option To The Pass
- [LLVMdev] How To Pass An Command Line Option To The Pass
- [LLVMdev] [cfe-dev] [3.6 Release] RC3 has been tagged
- [LLVMdev] [cfe-dev] [3.6 Release] RC3 has been tagged
- Help with reshape/reShape and indexing