The inline keyword goes before the return type. This fixes a compiler warning.
[oota-llvm.git] / tools / bugpoint / Miscompilation.cpp
index 47d90e51ef3d83c2223800adf16936d085605c92..8e677cbbb219f66315eb0dd18f650c5417b1b5da 100644 (file)
@@ -657,7 +657,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
       for (Function::arg_iterator
              I = newMain->arg_begin(), E = newMain->arg_end(),
              OI = oldMain->arg_begin(); I != E; ++I, ++OI) {
-        I->takeName(OI);    // Copy argument names from oldMain
+        I->setName(OI->getName());    // Copy argument names from oldMain
         args.push_back(I);
       }
 
@@ -734,18 +734,22 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
           // Resolve the call to function F via the JIT API:
           //
           // call resolver(GetElementPtr...)
-          CallInst *Resolver = CallInst::Create(resolverFunc, ResolverArgs.begin(),
-                                                ResolverArgs.end(),
-                                                "resolver", LookupBB);
-          // cast the result from the resolver to correctly-typed function
-          CastInst *CastedResolver = new BitCastInst(Resolver, 
-            PointerType::getUnqual(F->getFunctionType()), "resolverCast", LookupBB);
+          CallInst *Resolver =
+            CallInst::Create(resolverFunc, ResolverArgs.begin(),
+                             ResolverArgs.end(), "resolver", LookupBB);
+
+          // Cast the result from the resolver to correctly-typed function.
+          CastInst *CastedResolver =
+            new BitCastInst(Resolver,
+                            PointerType::getUnqual(F->getFunctionType()),
+                            "resolverCast", LookupBB);
 
           // Save the value in our cache.
           new StoreInst(CastedResolver, Cache, LookupBB);
           BranchInst::Create(DoCallBB, LookupBB);
 
-          PHINode *FuncPtr = PHINode::Create(NullPtr->getType(), "fp", DoCallBB);
+          PHINode *FuncPtr = PHINode::Create(NullPtr->getType(),
+                                             "fp", DoCallBB);
           FuncPtr->addIncoming(CastedResolver, LookupBB);
           FuncPtr->addIncoming(CachedVal, EntryBB);