clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
lib
CodeGen
ABIInfo.h
Go to the documentation of this file.
1
//===----- ABIInfo.h - ABI information access & encapsulation ---*- C++ -*-===//
2
//
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
#ifndef LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
11
#define LLVM_CLANG_LIB_CODEGEN_ABIINFO_H
12
13
#include "
clang/AST/Type.h
"
14
#include "llvm/IR/CallingConv.h"
15
#include "llvm/IR/Type.h"
16
17
namespace
llvm {
18
class
Value
;
19
class
LLVMContext;
20
class
DataLayout;
21
}
22
23
namespace
clang {
24
class
ASTContext;
25
class
TargetInfo;
26
27
namespace
CodeGen {
28
class
CGCXXABI;
29
class
CGFunctionInfo;
30
class
CodeGenFunction;
31
class
CodeGenTypes;
32
}
33
34
// FIXME: All of this stuff should be part of the target interface
35
// somehow. It is currently here because it is not clear how to factor
36
// the targets to support this, since the Targets currently live in a
37
// layer below types n'stuff.
38
39
40
/// ABIInfo - Target specific hooks for defining how a type should be
41
/// passed or returned from functions.
42
class
ABIInfo
{
43
public
:
44
CodeGen::CodeGenTypes
&
CGT
;
45
protected
:
46
llvm::CallingConv::ID
RuntimeCC
;
47
llvm::CallingConv::ID
BuiltinCC
;
48
public
:
49
ABIInfo
(
CodeGen::CodeGenTypes
&cgt)
50
:
CGT
(cgt),
51
RuntimeCC
(llvm::
CallingConv
::
C
),
52
BuiltinCC
(llvm::
CallingConv
::
C
) {}
53
54
virtual
~ABIInfo
();
55
56
CodeGen::CGCXXABI
&
getCXXABI
()
const
;
57
ASTContext
&
getContext
()
const
;
58
llvm::LLVMContext &
getVMContext
()
const
;
59
const
llvm::DataLayout &
getDataLayout
()
const
;
60
const
TargetInfo
&
getTarget
()
const
;
61
62
/// Return the calling convention to use for system runtime
63
/// functions.
64
llvm::CallingConv::ID
getRuntimeCC
()
const
{
65
return
RuntimeCC
;
66
}
67
68
/// Return the calling convention to use for compiler builtins
69
llvm::CallingConv::ID
getBuiltinCC
()
const
{
70
return
BuiltinCC
;
71
}
72
73
virtual
void
computeInfo
(
CodeGen::CGFunctionInfo
&FI)
const
= 0;
74
75
/// EmitVAArg - Emit the target dependent code to load a value of
76
/// \arg Ty from the va_list pointed to by \arg VAListAddr.
77
78
// FIXME: This is a gaping layering violation if we wanted to drop
79
// the ABI information any lower than CodeGen. Of course, for
80
// VAArg handling it has to be at this level; there is no way to
81
// abstract this out.
82
virtual
llvm::Value
*
EmitVAArg
(
llvm::Value
*VAListAddr,
QualType
Ty,
83
CodeGen::CodeGenFunction
&CGF)
const
= 0;
84
85
virtual
bool
isHomogeneousAggregateBaseType
(
QualType
Ty)
const
;
86
87
virtual
bool
isHomogeneousAggregateSmallEnough
(
const
Type
*
Base
,
88
uint64_t Members)
const
;
89
90
virtual
bool
shouldSignExtUnsignedType
(
QualType
Ty)
const
;
91
92
bool
isHomogeneousAggregate
(
QualType
Ty,
const
Type
*&
Base
,
93
uint64_t &Members)
const
;
94
95
};
96
}
// end namespace clang
97
98
#endif
clang::ABIInfo::EmitVAArg
virtual llvm::Value * EmitVAArg(llvm::Value *VAListAddr, QualType Ty, CodeGen::CodeGenFunction &CGF) const =0
clang::QualType
Definition:
Type.h:566
clang::ABIInfo::getTarget
const TargetInfo & getTarget() const
Definition:
CodeGen/TargetInfo.cpp:98
Base
Type.h
clang::Type
Definition:
Type.h:1234
clang::ABIInfo::computeInfo
virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const =0
Value
Value
Definition:
UninitializedValues.cpp:91
clang::ABIInfo::ABIInfo
ABIInfo(CodeGen::CodeGenTypes &cgt)
Definition:
ABIInfo.h:49
clang::ABIInfo::getRuntimeCC
llvm::CallingConv::ID getRuntimeCC() const
Definition:
ABIInfo.h:64
clang::CodeGen::CodeGenFunction
Definition:
CodeGenFunction.h:99
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:89
clang::ABIInfo::BuiltinCC
llvm::CallingConv::ID BuiltinCC
Definition:
ABIInfo.h:47
clang::ABIInfo::CGT
CodeGen::CodeGenTypes & CGT
Definition:
ABIInfo.h:44
clang::ABIInfo
Definition:
ABIInfo.h:42
clang::LangAS::ID
ID
Defines the set of possible language-specific address spaces.
Definition:
AddressSpaces.h:27
clang::TargetInfo
Exposes information about the current target.
Definition:
include/clang/Basic/TargetInfo.h:49
clang::ABIInfo::getVMContext
llvm::LLVMContext & getVMContext() const
Definition:
CodeGen/TargetInfo.cpp:90
clang::ABIInfo::getContext
ASTContext & getContext() const
Definition:
CodeGen/TargetInfo.cpp:86
clang::ABIInfo::~ABIInfo
virtual ~ABIInfo()
Definition:
CodeGen/TargetInfo.cpp:51
clang::CallingConv
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition:
Specifiers.h:204
clang::ABIInfo::getBuiltinCC
llvm::CallingConv::ID getBuiltinCC() const
Return the calling convention to use for compiler builtins.
Definition:
ABIInfo.h:69
clang::ABIInfo::shouldSignExtUnsignedType
virtual bool shouldSignExtUnsignedType(QualType Ty) const
Definition:
CodeGen/TargetInfo.cpp:111
clang::ABIInfo::isHomogeneousAggregate
bool isHomogeneousAggregate(QualType Ty, const Type *&Base, uint64_t &Members) const
Definition:
CodeGen/TargetInfo.cpp:3541
clang::ABIInfo::RuntimeCC
llvm::CallingConv::ID RuntimeCC
Definition:
ABIInfo.h:46
clang::CodeGen::CGFunctionInfo
Definition:
CGFunctionInfo.h:335
clang::CodeGen::CGCXXABI
Implements C++ ABI-specific code generation functions.
Definition:
CGCXXABI.h:42
clang::CodeGen::CodeGenTypes
Definition:
CodeGenTypes.h:120
clang::ABIInfo::isHomogeneousAggregateSmallEnough
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const
Definition:
CodeGen/TargetInfo.cpp:106
clang::ABIInfo::getCXXABI
CodeGen::CGCXXABI & getCXXABI() const
Definition:
CodeGen/TargetInfo.cpp:82
AttributeLangSupport::C
Definition:
SemaDeclAttr.cpp:39
clang::ABIInfo::getDataLayout
const llvm::DataLayout & getDataLayout() const
Definition:
CodeGen/TargetInfo.cpp:94
clang::ABIInfo::isHomogeneousAggregateBaseType
virtual bool isHomogeneousAggregateBaseType(QualType Ty) const
Definition:
CodeGen/TargetInfo.cpp:102
Generated on Mon Aug 31 2015 10:45:06 for clang by
1.8.6