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/IR/DataLayout.h"
12 #include "llvm/MC/MCContext.h"
13 #include "llvm/Target/TargetMachine.h"
14 #include "llvm/Target/TargetSubtargetInfo.h"
15 
16 using namespace llvm;
17 
anchor()18 void PPCFunctionInfo::anchor() { }
19 
getPICOffsetSymbol() const20 MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
21   const DataLayout &DL = MF.getDataLayout();
22   return MF.getContext().getOrCreateSymbol(Twine(DL.getPrivateGlobalPrefix()) +
23                                            Twine(MF.getFunctionNumber()) +
24                                            "$poff");
25 }
26