[cfe-dev] Checking if function have been emitted

Piotr Padlewski via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 2 11:55:24 PST 2017


friendly ping

2016-12-30 19:38 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>:

> Hi,
> I would like to check if there is inline virtual function that was not
> emitted.
>
> I tried to do something like this based on CodeGenModule::
> GetOrCreateLLVMFunction:
>
>       StringRef Name = CGM.getMangledName(VFunction);
>       auto *Entry = CGM.GetGlobalValue(Name);
>
>       // If function doesn't exist or doesn't have a definition.
>       if (!Entry || Entry->isDeclaration())
>         return true;
>
> But Entry->isDeclaration() returns True for functions that I would expect
> to be emited.
> What is the proper way of checking that?
>
> Thanks for help!
> Piotr
>
>
> PS:
> here is the patch that doesn't work, to get wider scope.
> https://reviews.llvm.org/D28178
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170102/39ce7a5e/attachment.html>


More information about the cfe-dev mailing list