diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 07:27:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 07:27:07 +0000 |
commit | aba9bcb9b60edbad3646b2f3088c120d06549cc7 (patch) | |
tree | ef1afda10b71212573c752bfefc14d2dfbdbf0f3 /lib/CodeGen/GCStrategy.cpp | |
parent | f14645cc6474dab76b266906575ce4e4d018e9ee (diff) |
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/GCStrategy.cpp')
-rw-r--r-- | lib/CodeGen/GCStrategy.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp index b5006fdbb4..69db77f4fb 100644 --- a/lib/CodeGen/GCStrategy.cpp +++ b/lib/CodeGen/GCStrategy.cpp @@ -71,9 +71,9 @@ namespace { void FindSafePoints(MachineFunction &MF); void VisitCallPoint(MachineBasicBlock::iterator MI); - unsigned InsertLabel(MachineBasicBlock &MBB, - MachineBasicBlock::iterator MI, - DebugLoc DL) const; + MCSymbol *InsertLabel(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MI, + DebugLoc DL) const; void FindStackOffsets(MachineFunction &MF); @@ -329,14 +329,11 @@ void MachineCodeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<GCModuleInfo>(); } -unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB, - MachineBasicBlock::iterator MI, - DebugLoc DL) const { - unsigned Label = MMI->NextLabelID(); - - BuildMI(MBB, MI, DL, - TII->get(TargetOpcode::GC_LABEL)).addImm(Label); - +MCSymbol *MachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB, + MachineBasicBlock::iterator MI, + DebugLoc DL) const { + MCSymbol *Label = MMI->getLabelSym(MMI->NextLabelID()); + BuildMI(MBB, MI, DL, TII->get(TargetOpcode::GC_LABEL)).addSym(Label); return Label; } |