[llvm-dev] External linkage functions which allocate memory

25 views
Skip to first unread message

raghesh via llvm-dev

unread,
Nov 2, 2021, 6:57:29 AM11/2/21
to LLVM Developers Mailing List
Hi All,

In a linked LLVM-IR module, I would like to know if any of the functions with external linkage allocate memory. The definitions of these functions are not available in the linked IR. For example, the 'strdup' function.

If I understand the definition of 'readnone' attribute correctly, I think one way to do this is to check if the function declaration has 'readnone' attached to it [1]. Is this correct?

Please let me know if there are any other reliable methods to do the same.


Regards,
Raghesh
------------------------------
Raghesh Aloor
AMD India Pvt. Ltd.
Bengaluru.
------------------------------

raghesh via llvm-dev

unread,
Nov 2, 2021, 9:03:26 AM11/2/21
to LLVM Developers Mailing List
Hi All,

A correction in my query.

Please ignore this part --> "if any of the functions with external linkage allocate memory". I think I have not used the term "external linkage" promptly as per its definition.

What I would like to know is about the possibility of memory allocation by those functions whose definitions are not there in the linked LLMV-IR.

Regards
Raghesh
------------------------------
Raghesh Aloor
AMD India Pvt. Ltd.
Bengaluru.
------------------------------

Reply all
Reply to author
Forward
0 new messages