[PM] Replace the Pass argument in MergeBasicBlockIntoOnlyPred with
[oota-llvm.git] / lib / Transforms / Utils / CloneFunction.cpp
index 6b86378bc2e4f49a10ce3741633ec5fd30e228e3..96a763fac93baf5e7a77efb30ccc8bc339f47ca0 100644 (file)
@@ -164,8 +164,8 @@ static MDNode* FindSubprogram(const Function *F, DebugInfoFinder &Finder) {
 
 // Add an operand to an existing MDNode. The new operand will be added at the
 // back of the operand list.
-static void AddOperand(DICompileUnit CU, DIArray SPs, Value *NewSP) {
-  SmallVector<Value *, 16> NewSPs;
+static void AddOperand(DICompileUnit CU, DIArray SPs, Metadata *NewSP) {
+  SmallVector<Metadata *, 16> NewSPs;
   NewSPs.reserve(SPs->getNumOperands() + 1);
   for (unsigned I = 0, E = SPs->getNumOperands(); I != E; ++I)
     NewSPs.push_back(SPs->getOperand(I));
@@ -186,7 +186,7 @@ static void CloneDebugInfoMetadata(Function *NewFunc, const Function *OldFunc,
   // Ensure that OldFunc appears in the map.
   // (if it's already there it must point to NewFunc anyway)
   VMap[OldFunc] = NewFunc;
-  DISubprogram NewSubprogram(MapValue(OldSubprogramMDNode, VMap));
+  DISubprogram NewSubprogram(MapMetadata(OldSubprogramMDNode, VMap));
 
   for (DICompileUnit CU : Finder.compile_units()) {
     DIArray Subprograms(CU.getSubprograms());