PPCMachineFunctionInfo.cpp revision 270147
1//===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "PPCMachineFunctionInfo.h"
11#include "llvm/MC/MCAsmInfo.h"
12#include "llvm/MC/MCContext.h"
13#include "llvm/Target/TargetMachine.h"
14
15using namespace llvm;
16
17void PPCFunctionInfo::anchor() { }
18
19MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
20  const MCAsmInfo *MAI = MF.getTarget().getMCAsmInfo();
21  return MF.getContext().GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix())+
22    Twine(MF.getFunctionNumber())+"$poff");
23}
24