<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I must be doing something basic wrong with
LLVM.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>To be more precise the question should be probably
be :-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> "How do you get a list of all
<U>called functions</U> that are external to the current module ?"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is probably somewhat different from the list
of module functions ???</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aaron</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=angray@beeb.net href="mailto:angray@beeb.net">Aaron Gray</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=llvmdev@cs.uiuc.edu
href="mailto:llvmdev@cs.uiuc.edu">LLVM Developers Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 04, 2005 12:15
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [LLVMdev] How do you
determine whether afunctionisdefinedexternally to a module ?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>I have tried the following :-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> if (!M.empty())</FONT></DIV>
<DIV><FONT face="Courier New" size=2> for (Module::iterator
I = M.begin(), E = M.end(); I != E; ++I)</FONT></DIV>
<DIV><FONT face="Courier New" size=2> if (
!I->getIntrinsicID() && I->getEntryBlock().empty())</FONT></DIV>
<DIV><FONT face="Courier New"
size=2> O << "EXTERN "
<< Mang->getValueName(I) << " : NEAR" <<
"\n";</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Based upon :-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Courier><SPAN class=keyword> virtual</SPAN>
<SPAN class=keywordtype>bool</SPAN> Function::</FONT><A class=code
href="http://illuvium.com/docs/doxygen/classllvm_1_1Function.html#a5"><FONT
face=Courier color=#000000>isExternal</FONT></A><FONT face=Courier>()<SPAN
class=keyword> const </SPAN>{ <SPAN class=keywordflow>return</SPAN>
BasicBlocks.empty(); }</FONT></DIV>
<DIV><FONT face=Courier></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>But it does not work either.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Which means there must be a BasicBlock occuring
on undefined/external functions.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyway no hurry I am off to do other tasks for a
day or so.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aaron</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>LLVM Developers
mailing
list<BR>LLVMdev@cs.uiuc.edu
http://llvm.cs.uiuc.edu<BR>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev<BR>
<P>
<HR>
<P></P>No virus found in this incoming message.<BR>Checked by AVG
Anti-Virus.<BR>Version: 7.0.323 / Virus Database: 267.8.8/37 - Release Date:
01/07/2005<BR></BLOCKQUOTE></BODY></HTML>