xref: /minix3/external/bsd/llvm/dist/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc //===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
2f4a2713aSLionel Sambuc //
3f4a2713aSLionel Sambuc //                     The LLVM Compiler Infrastructure
4f4a2713aSLionel Sambuc //
5f4a2713aSLionel Sambuc // This file is distributed under the University of Illinois Open Source
6f4a2713aSLionel Sambuc // License. See LICENSE.TXT for details.
7f4a2713aSLionel Sambuc //
8f4a2713aSLionel Sambuc //===----------------------------------------------------------------------===//
9f4a2713aSLionel Sambuc 
10f4a2713aSLionel Sambuc #include "PPCMachineFunctionInfo.h"
11*0a6a1f1dSLionel Sambuc #include "llvm/IR/DataLayout.h"
12*0a6a1f1dSLionel Sambuc #include "llvm/MC/MCContext.h"
13*0a6a1f1dSLionel Sambuc #include "llvm/Target/TargetMachine.h"
14*0a6a1f1dSLionel Sambuc #include "llvm/Target/TargetSubtargetInfo.h"
15f4a2713aSLionel Sambuc 
16f4a2713aSLionel Sambuc using namespace llvm;
17f4a2713aSLionel Sambuc 
anchor()18f4a2713aSLionel Sambuc void PPCFunctionInfo::anchor() { }
19f4a2713aSLionel Sambuc 
getPICOffsetSymbol() const20*0a6a1f1dSLionel Sambuc MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
21*0a6a1f1dSLionel Sambuc   const DataLayout *DL = MF.getSubtarget().getDataLayout();
22*0a6a1f1dSLionel Sambuc   return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
23*0a6a1f1dSLionel Sambuc     Twine(MF.getFunctionNumber())+"$poff");
24*0a6a1f1dSLionel Sambuc }
25