blob: 9da1b1b5c754a7489f5def78133d521b0b1efdd9 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===//
David Blaikiea379b1812011-12-20 02:50:00 +00002//
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"
Hal Finkel3ee2af72014-07-18 23:29:49 +000011#include "llvm/IR/DataLayout.h"
12#include "llvm/MC/MCContext.h"
13#include "llvm/Target/TargetMachine.h"
David Blaikiea379b1812011-12-20 02:50:00 +000014
15using namespace llvm;
16
17void PPCFunctionInfo::anchor() { }
18
Hal Finkel3ee2af72014-07-18 23:29:49 +000019MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const {
20 const DataLayout *DL = MF.getTarget().getDataLayout();
21 return MF.getContext().GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
22 Twine(MF.getFunctionNumber())+"$poff");
23}