1 //===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "PPCMachineFunctionInfo.h"
11 #include "llvm/IR/DataLayout.h"
12 #include "llvm/MC/MCContext.h"
13 #include "llvm/Target/TargetMachine.h"
17 void PPCFunctionInfo::anchor() { }
19 MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
20 const DataLayout *DL = MF.getTarget().getDataLayout();
21 return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
22 Twine(MF.getFunctionNumber())+"$poff");