Mercurial > hg > Members > tobaru > cbc > CbC_llvm
view lib/Target/PowerPC/PPCMachineFunctionInfo.cpp @ 100:7d135dc70f03
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 803732b1fca8 |
line wrap: on
line source
//===-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "PPCMachineFunctionInfo.h" #include "llvm/IR/DataLayout.h" #include "llvm/MC/MCContext.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; void PPCFunctionInfo::anchor() { } MCSymbol *PPCFunctionInfo::getPICOffsetSymbol() const { const DataLayout &DL = MF.getDataLayout(); return MF.getContext().getOrCreateSymbol(Twine(DL.getPrivateGlobalPrefix()) + Twine(MF.getFunctionNumber()) + "$poff"); } MCSymbol *PPCFunctionInfo::getGlobalEPSymbol() const { const DataLayout &DL = MF.getDataLayout(); return MF.getContext().getOrCreateSymbol(Twine(DL.getPrivateGlobalPrefix()) + "func_gep" + Twine(MF.getFunctionNumber())); } MCSymbol *PPCFunctionInfo::getLocalEPSymbol() const { const DataLayout &DL = MF.getDataLayout(); return MF.getContext().getOrCreateSymbol(Twine(DL.getPrivateGlobalPrefix()) + "func_lep" + Twine(MF.getFunctionNumber())); } MCSymbol *PPCFunctionInfo::getTOCOffsetSymbol() const { const DataLayout &DL = MF.getDataLayout(); return MF.getContext().getOrCreateSymbol(Twine(DL.getPrivateGlobalPrefix()) + "func_toc" + Twine(MF.getFunctionNumber())); }