Fix the inliner to be deterministic, not letting its output depend on the
relative location of Function objects in memory.

llvm-svn: 14260
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 0abc4f7..8fca968 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -1,4 +1,4 @@
-//===- InlineCommon.cpp - Code common to all inliners ---------------------===//
+//===- Inliner.cpp - Code common to all inliners --------------------------===//
 // 
 //                     The LLVM Compiler Infrastructure
 //
@@ -90,9 +90,8 @@
   // from inlining other functions.
   std::vector<CallSite> CallSites;
 
-  for (std::set<Function*>::iterator SCCI = SCCFunctions.begin(),
-         E = SCCFunctions.end(); SCCI != E; ++SCCI)
-    if (Function *F = *SCCI)
+  for (unsigned i = 0, e = SCC.size(); i != e; ++i)
+    if (Function *F = SCC[i]->getFunction())
       for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
         for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
           CallSite CS = CallSite::get(I);