Hello, Vassily
Thanks for the clues. However, it doesn't serve my purpose as well as I
want it to be. Basically, I'm using llvm::DIBuilder class to create the
debug information for formal arguments. The function declaration is as :
DIVariable <http://llvm.org/docs/doxygen/html/classllvm_1_1DIVariable.html>
DIBuilder::createLocalVariable
<http://llvm.org/docs/doxygen/html/classllvm_1_1DIBuilder.html#a660cfd0cffd8005591d6311cd5ab991b>
( unsigned <http://llvm.org/docs/doxygen/html/classunsigned.html> *Tag*,
DIDescriptor
<http://llvm.org/docs/doxygen/html/classllvm_1_1DIDescriptor.html> *Scope*,
StringRef <http://llvm.org/docs/doxygen/html/classllvm_1_1StringRef.html>
*Name*,
DIFile <http://llvm.org/docs/doxygen/html/classllvm_1_1DIFile.html> *File*,
unsigned <http://llvm.org/docs/doxygen/html/classunsigned.html> *LineNo*,
DITypeRef
<http://llvm.org/docs/doxygen/html/namespacellvm.html#a868f4b93b5dc844759b39defbf99b2fc>
*Ty*,
bool <http://llvm.org/docs/doxygen/html/classbool.html> *AlwaysPreserve* =
false
<http://llvm.org/docs/doxygen/html/SimplifyInstructions_8cpp.html#a6dd713bd88673625bb181528a61bdc85>,
unsigned <http://llvm.org/docs/doxygen/html/classunsigned.html> *Flags* = 0,
unsigned <http://llvm.org/docs/doxygen/html/classunsigned.html> *ArgNo* = 0
)
So the last parameter that I need is ArgNo, I'm considering, given a
ArgSymbol*, can I get all the corresponding info that this function
needs(I'm able to get all these except the ArgNo now) ?
Besides, where do you think I shall put this debug info generation function
in the codegen step ? For global/local variables, I found the codegenDef
function in Symbol.cpp where adding this kinda DI generation function
works, however, for ArgSymbol, I don't find a codegenDef function...
On Mon, Dec 22, 2014 at 2:09 AM, Vassily Litvinov <[email protected]> wrote:
> Hui,
>
> ArgSymbols do not carry the argument number.
>
> To get i-th argument of a function, you can use FnSymbol::getFormal(i).\
> See also FnSymbol::numFormals() and the for_formals macro.
>
> There are counterparts for CallExpr.
>
> If this does not answer your question, please write back.
>
> Vassily
>
> ----- Forwarded message from Hui Zhang <[email protected]> -----
>
> Date: Sun, 21 Dec 2014 15:44:08 -0500
> From: Hui Zhang <[email protected]>
> To: Chapel Sourceforge Developers List <
> [email protected]>
> Subject: [Chapel-developers] Arg number in Chapel
>
> Hello,
>
> I'm trying to build debug information for the argument, but I don't know
> how to get the ArgNo parameter (argument's number. 1 indicates 1st
> argument.)
>
> I didn't see any relative member in ArgSymbol, any clues ?
>
> Thanks
>
> --
> Best regards
>
>
> Hui Zhang
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Chapel-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-developers
>
>
> ----- End forwarded message -----
>
--
Best regards
Hui Zhang
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers