<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Obviously, if you want to analyze the call graph of an entire program, you need to collect the information from across compilation units.  In LLVM, the best way to do that is to link the bitcode files together into a single bitcode file.  This can either by done using llvm-link (which requires changing the Makefiles of most programs) or by adding your passes into libLTO (which is more work but allows you to do whole-program analysis with little/no modification to program Makefiles).</span></div></blockquote></div><br class=""><div class="">Hi John,</div><div class=""><br class=""></div><div class="">this is actually what I am doing.</div><div class="">I have a simple program that has a main that call 2 functions.</div><div class="">Those 2 functions are in two different .c files.</div><div class="">So I create the BC file with clang for the 3 files.</div><div class="">I link them together with llvm-link and then I disassemble it.</div><div class="">However when I run my pass it still can’t see the external calls.</div><div class=""><br class=""></div><div class="">Why is that?</div><div class=""><br class=""></div><div class="">Thanks.</div><div class="">Simone</div></body></html>