[LLVMdev] How to use WhileStmt to implement while loop in LLVM

Rasha Omar rasha.sala7 at gmail.com
Sun May 26 01:55:48 PDT 2013


No, I need to use it in LLVM pass. Could it work?


On 26 May 2013 10:41, Nick Lewycky <nicholas at mxc.ca> wrote:

> Rasha Omar wrote:
>
>> Dear All,
>>
>> I have a question
>>
>> How could I use |WhileStmt class| in Stmt.h
>>
>> http://clang.llvm.org/doxygen/**Stmt_8h_source.html<http://clang.llvm.org/doxygen/Stmt_8h_source.html>
>>
>> to implement |while loop| like |while(i==1){}| that is required to be
>> inserted
>>
>> For example, Convert x++; y++; to x++; while(i=1){} y++;
>>
>> from the class's constructor:
>>
>> |WhileStmt(ASTContext  &C,  VarDecl  *Var,  Expr  *cond,  Stmt
>>  *body,SourceLocation  WL);
>> //I know C -->  1
>> //Var-->  i
>> //cond -->  =
>> //body -->  NOP
>> //WL -->  ??|
>>
>> but how to implement these terms in LLVM pass? and what's the
>> SourceLocation?
>>
>
> Do you actually mean LLVM pass? Or are you working inside clang (for
> example, on a source code rewriter)? If so, email cfe-dev instead.
>
> Nick
>



-- 
*Rasha Salah Omar
Msc Student at E-JUST
Demonestrator  at Faculty of Computers and Informatics
Benha University
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130526/57fd45e5/attachment.html>


More information about the llvm-dev mailing list