[cfe-dev] Checking if function have been emitted

Piotr Padlewski via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 30 10:38:29 PST 2016


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/20161230/736a3621/attachment.html>


More information about the cfe-dev mailing list