LLVM API Documentation

PPCMachineFunctionInfo.cpp
Go to the documentation of this file.
00001 //===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #include "PPCMachineFunctionInfo.h"
00011 #include "llvm/IR/DataLayout.h"
00012 #include "llvm/MC/MCContext.h"
00013 #include "llvm/Target/TargetMachine.h"
00014 #include "llvm/Target/TargetSubtargetInfo.h"
00015 
00016 using namespace llvm;
00017 
00018 void PPCFunctionInfo::anchor() { }
00019 
00020 MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
00021   const DataLayout *DL = MF.getSubtarget().getDataLayout();
00022   return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
00023     Twine(MF.getFunctionNumber())+"$poff");
00024 }