[llvm-commits] [poolalloc] r124966 - /poolalloc/trunk/lib/AssistDS/Devirt.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Sat Feb 5 10:43:51 PST 2011


Author: aggarwa4
Date: Sat Feb  5 12:43:50 2011
New Revision: 124966

URL: http://llvm.org/viewvc/llvm-project?rev=124966&view=rev
Log:
Changed some formatting. No functionality change.

Modified:
    poolalloc/trunk/lib/AssistDS/Devirt.cpp

Modified: poolalloc/trunk/lib/AssistDS/Devirt.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/Devirt.cpp?rev=124966&r1=124965&r2=124966&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/Devirt.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/Devirt.cpp Sat Feb  5 12:43:50 2011
@@ -140,7 +140,6 @@
   // module.
   //
   ++FuncAdded;
-
   //
   // Create a bounce function that has a function signature almost identical
   // to the function being called.  The only difference is that it will have
@@ -192,7 +191,6 @@
     // Create the basic block for doing the direct call
     BasicBlock* BL = BasicBlock::Create (M->getContext(), FL->getName(), F);
     targets[FL] = BL;
-
     // Create the direct function call
     Value* directCall = CallInst::Create ((Value *)FL,
                                           fargs.begin(),
@@ -294,13 +292,13 @@
   //
   // Find the targets of the indirect function call.
   //
-  std::vector<const Function*> Targets;
-  Targets.insert (Targets.begin(), CTF->begin(CS), CTF->end(CS));
 
   //
   // Convert the call site if there were any function call targets found.
   //
-  if (Targets.size() > 0) {
+  if (CTF->size(CS)) {
+    std::vector<const Function*> Targets;
+    Targets.insert (Targets.begin(), CTF->begin(CS), CTF->end(CS));
     //
     // Determine if an existing bounce function can be used for this call site.
     //





More information about the llvm-commits mailing list