Re: [cfe-users] binary operator

2016-07-12 Thread folkert via cfe-users
Hi, > > When iterating through the AST I encounter BinaryOperator-s, part of an > > IfStmt. > > My question now is: how can I find which operator it is? E.g. ==, >=, > > etc. > > I'm using libclang. > > You can call BinaryOperator::getOpcode, which will return an Opcode, > which is a typedef of t

Re: [cfe-users] binary operator

2016-07-12 Thread Csaba Raduly via cfe-users
Hi Folkert, On Tue, Jul 12, 2016 at 1:46 PM, folkert via cfe-users wrote: > Hi, > > When iterating through the AST I encounter BinaryOperator-s, part of an > IfStmt. > My question now is: how can I find which operator it is? E.g. ==, >=, > etc. > I'm using libclang. > You can call BinaryOperator

Re: [cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread David Blaikie via cfe-users
you would need to build with debug info (-g) or similar (there are a few other options that enable the same source location info) to produce the debuglocs that will tell you about that On Mon, Jul 11, 2016 at 9:40 PM, Shail Dave via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > I am work

[cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread Shail Dave via cfe-users
Hi, I am working with LLVM 3.4 and want to obtain the line number information of source file from IR. The IR is generated from simple c code with Clang. *I want to obtain the line number in source c file from the line in IR body.* I tried this - 1. For Instruction BI, unsigned Line = Line =

[cfe-users] binary operator

2016-07-12 Thread folkert via cfe-users
Hi, When iterating through the AST I encounter BinaryOperator-s, part of an IfStmt. My question now is: how can I find which operator it is? E.g. ==, >=, etc. I'm using libclang. Folkert van Heusden -- -- Phone: +31-6-4127812