2010-12-10 15:39:47 +08:00
|
|
|
//===-- llvm/Target/TargetAsmInfo.cpp - Target Assembly Info --------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetAsmInfo.h"
|
|
|
|
#include "llvm/Target/TargetData.h"
|
|
|
|
#include "llvm/Target/TargetLowering.h"
|
|
|
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
TargetAsmInfo::TargetAsmInfo(const TargetMachine &TM) {
|
|
|
|
TLOF = &TM.getTargetLowering()->getObjFileLowering();
|
|
|
|
const TargetData &TD = *TM.getTargetData();
|
|
|
|
IsLittleEndian = TD.isLittleEndian();
|
|
|
|
PointerSize = TD.getPointerSize();
|
2011-07-07 08:54:13 +08:00
|
|
|
|
|
|
|
TFI = TM.getFrameLowering();
|
|
|
|
StackDir = TFI->getStackGrowthDirection();
|
2010-12-10 15:39:47 +08:00
|
|
|
TRI = TM.getRegisterInfo();
|
2011-07-07 08:54:13 +08:00
|
|
|
TFI->getInitialFrameState(InitialFrameState);
|
2010-12-10 15:39:47 +08:00
|
|
|
}
|
2011-07-08 05:05:13 +08:00
|
|
|
|
|
|
|
int TargetAsmInfo::getCompactUnwindEncoding(ArrayRef<MCCFIInstruction> Instrs,
|
|
|
|
int DataAlignmentFactor,
|
|
|
|
bool IsEH) const {
|
|
|
|
return TFI->getCompactUnwindEncoding(Instrs, DataAlignmentFactor, IsEH);
|
|
|
|
}
|