aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/GCStrategy.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 07:27:07 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 07:27:07 +0000
commit1065f49ad9b2cb175e86ee9bc5f919e3bdafe5f6 (patch)
tree1a6f09e21479e82594c7f987faad5ebc61452a75 /llvm/lib/CodeGen/GCStrategy.cpp
parentd16d38c0b9713a7f57cb4c5073137c53555bd524 (diff)
downloadllvm-1065f49ad9b2cb175e86ee9bc5f919e3bdafe5f6.zip
llvm-1065f49ad9b2cb175e86ee9bc5f919e3bdafe5f6.tar.gz
llvm-1065f49ad9b2cb175e86ee9bc5f919e3bdafe5f6.tar.bz2
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
llvm-svn: 98474
Diffstat (limited to 'llvm/lib/CodeGen/GCStrategy.cpp')
-rw-r--r--llvm/lib/CodeGen/GCStrategy.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp
index b5006fd..69db77f 100644
--- a/llvm/lib/CodeGen/GCStrategy.cpp
+++ b/llvm/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;
}