[LLVMdev] How do you determine whether afunctionisdefinedexternally to a module ?
Aaron Gray
angray at beeb.net
Sun Jul 3 19:12:23 PDT 2005
I must be doing something basic wrong with LLVM.
To be more precise the question should be probably be :-
"How do you get a list of all called functions that are external to the current module ?"
This is probably somewhat different from the list of module functions ???
Aaron
----- Original Message -----
From: Aaron Gray
To: LLVM Developers Mailing List
Sent: Monday, July 04, 2005 12:15 AM
Subject: Re: [LLVMdev] How do you determine whether afunctionisdefinedexternally to a module ?
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
------------------------------------------------------------------------------
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/37 - Release Date: 01/07/2005
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050704/b52bd3e7/attachment.html>
More information about the llvm-dev
mailing list