[LLVMdev] How do you determine whether a functionisdefinedexternally to a module ?

Aaron Gray angray at beeb.net
Sun Jul 3 16:15:35 PDT 2005


I have tried the following :-

  if (!M.empty())
    for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
      if ( !I->getIntrinsicID() && I->getEntryBlock().empty())
        O << "EXTERN " << Mang->getValueName(I) << " : NEAR" << "\n";

Based upon :-

    virtual bool Function::isExternal() const { return BasicBlocks.empty(); }

But it does not work either.

Which means there must be a BasicBlock occuring on undefined/external functions.

Anyway no hurry I am off to do other tasks for a day or so.

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050704/0d66579c/attachment.html>


More information about the llvm-dev mailing list