1 //===-- llvm/Target/TargetAsmInfo.cpp - Target Assembly Info --------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Target/TargetAsmInfo.h"
11 #include "llvm/Target/TargetData.h"
12 #include "llvm/Target/TargetLowering.h"
13 #include "llvm/Target/TargetLoweringObjectFile.h"
14 #include "llvm/Target/TargetMachine.h"
15 #include "llvm/Target/TargetRegisterInfo.h"
18 TargetAsmInfo::TargetAsmInfo(const TargetMachine
&TM
) {
19 TLOF
= &TM
.getTargetLowering()->getObjFileLowering();
20 const TargetData
&TD
= *TM
.getTargetData();
21 IsLittleEndian
= TD
.isLittleEndian();
22 PointerSize
= TD
.getPointerSize();
23 const TargetFrameLowering
&TFI
= *TM
.getFrameLowering();
24 StackDir
= TFI
.getStackGrowthDirection();
25 TRI
= TM
.getRegisterInfo();
26 TFI
.getInitialFrameState(InitialFrameState
);