Change this code to allocate temporary labels from mccontext,
authorChris Lattner <sabre@nondot.org>
Sun, 14 Mar 2010 07:29:45 +0000 (07:29 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 14 Mar 2010 07:29:45 +0000 (07:29 +0000)
not from MMI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98475 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/GCStrategy.cpp

index 69db77f4fb591857868f4575ba5fbe23459bb6cf..1a23be0c7d112da301a98056d1552f62d7deca3a 100644 (file)
@@ -332,7 +332,7 @@ void MachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
 MCSymbol *MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB, 
                                            MachineBasicBlock::iterator MI,
                                            DebugLoc DL) const {
-  MCSymbol *Label = MMI->getLabelSym(MMI->NextLabelID());
+  MCSymbol *Label = MBB.getParent()->getContext().GetOrCreateTemporarySymbol();
   BuildMI(MBB, MI, DL, TII->get(TargetOpcode::GC_LABEL)).addSym(Label);
   return Label;
 }