mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
76e470d26f
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. This patch is quite boring overall, except for some uglyness in ASMPrinter which has a getDataLayout function but has some clients that use it without a Module (llmv-dsymutil, llvm-dwarfdump), so some methods are taking a DataLayout as parameter. Reviewers: echristo Subscribers: yaron.keren, rafael, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D11090 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 242386
26 lines
896 B
C++
26 lines
896 B
C++
//===-- 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");
|
|
}
|