clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
CodeGen
CodeGenABITypes.h
Go to the documentation of this file.
1
//==---- CodeGenABITypes.h - Convert Clang types to LLVM types for ABI -----==//
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
// CodeGenABITypes is a simple interface for getting LLVM types for
11
// the parameters and the return value of a function given the Clang
12
// types.
13
//
14
// The class is implemented as a public wrapper around the private
15
// CodeGenTypes class in lib/CodeGen.
16
//
17
// It allows other clients, like LLDB, to determine the LLVM types that are
18
// actually used in function calls, which makes it possible to then determine
19
// the acutal ABI locations (e.g. registers, stack locations, etc.) that
20
// these parameters are stored in.
21
//
22
//===----------------------------------------------------------------------===//
23
24
#ifndef LLVM_CLANG_CODEGEN_CODEGENABITYPES_H
25
#define LLVM_CLANG_CODEGEN_CODEGENABITYPES_H
26
27
#include "
clang/AST/CanonicalType.h
"
28
#include "
clang/AST/Type.h
"
29
#include "
clang/CodeGen/CGFunctionInfo.h
"
30
31
namespace
llvm {
32
class
DataLayout;
33
class
Module;
34
}
35
36
namespace
clang {
37
class
ASTContext;
38
class
CXXRecordDecl;
39
class
CodeGenOptions;
40
class
CoverageSourceInfo;
41
class
DiagnosticsEngine;
42
class
HeaderSearchOptions;
43
class
ObjCMethodDecl;
44
class
PreprocessorOptions;
45
46
namespace
CodeGen {
47
class
CGFunctionInfo;
48
class
CodeGenModule;
49
50
class
CodeGenABITypes
51
{
52
public
:
53
CodeGenABITypes
(
ASTContext
&
C
, llvm::Module &M,
const
llvm::DataLayout &TD,
54
CoverageSourceInfo
*CoverageInfo =
nullptr
);
55
~CodeGenABITypes
();
56
57
/// These methods all forward to methods in the private implementation class
58
/// CodeGenTypes.
59
60
const
CGFunctionInfo
&
arrangeObjCMessageSendSignature
(
61
const
ObjCMethodDecl
*MD,
62
QualType
receiverType);
63
const
CGFunctionInfo
&
arrangeFreeFunctionType
(
64
CanQual<FunctionProtoType>
Ty);
65
const
CGFunctionInfo
&
arrangeFreeFunctionType
(
66
CanQual<FunctionNoProtoType>
Ty);
67
const
CGFunctionInfo
&
arrangeCXXMethodType
(
const
CXXRecordDecl
*RD,
68
const
FunctionProtoType
*FTP);
69
const
CGFunctionInfo
&
arrangeFreeFunctionCall
(
CanQualType
returnType,
70
ArrayRef<CanQualType>
argTypes,
71
FunctionType::ExtInfo
info,
72
RequiredArgs
args);
73
74
private
:
75
/// Default CodeGenOptions object used to initialize the
76
/// CodeGenModule and otherwise not used. More specifically, it is
77
/// not used in ABI type generation, so none of the options matter.
78
CodeGenOptions
*CGO;
79
HeaderSearchOptions
*HSO;
80
PreprocessorOptions
*PPO;
81
82
/// The CodeGenModule we use get to the CodeGenTypes object.
83
CodeGen::CodeGenModule
*CGM;
84
};
85
86
}
// end namespace CodeGen
87
}
// end namespace clang
88
89
#endif
clang::QualType
Definition:
Type.h:566
Type.h
clang::CodeGen::CodeGenABITypes::arrangeFreeFunctionCall
const CGFunctionInfo & arrangeFreeFunctionCall(CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, RequiredArgs args)
Definition:
CodeGenABITypes.cpp:70
clang::CoverageSourceInfo
Stores additional source code information like skipped ranges which is required by the coverage mappi...
Definition:
CoverageMappingGen.h:38
clang::CodeGen::CodeGenABITypes::arrangeObjCMessageSendSignature
const CGFunctionInfo & arrangeObjCMessageSendSignature(const ObjCMethodDecl *MD, QualType receiverType)
Definition:
CodeGenABITypes.cpp:48
clang::PreprocessorOptions
Definition:
PreprocessorOptions.h:44
CanonicalType.h
clang::ObjCMethodDecl
Definition:
DeclObjC.h:113
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::CodeGen::CodeGenABITypes::~CodeGenABITypes
~CodeGenABITypes()
Definition:
CodeGenABITypes.cpp:41
CGFunctionInfo.h
llvm::ArrayRef
Definition:
LLVM.h:31
clang::FunctionProtoType
Definition:
Type.h:3016
clang::CodeGen::RequiredArgs
Definition:
CGFunctionInfo.h:286
clang::CanQual< FunctionProtoType >
clang::CodeGen::CodeGenABITypes::arrangeFreeFunctionType
const CGFunctionInfo & arrangeFreeFunctionType(CanQual< FunctionProtoType > Ty)
Definition:
CodeGenABITypes.cpp:54
clang::CodeGen::CGFunctionInfo
Definition:
CGFunctionInfo.h:335
clang::CodeGen::CodeGenModule
Definition:
CodeGenModule.h:262
clang::CodeGen::CodeGenABITypes::arrangeCXXMethodType
const CGFunctionInfo & arrangeCXXMethodType(const CXXRecordDecl *RD, const FunctionProtoType *FTP)
Definition:
CodeGenABITypes.cpp:64
clang::CodeGen::CodeGenABITypes::CodeGenABITypes
CodeGenABITypes(ASTContext &C, llvm::Module &M, const llvm::DataLayout &TD, CoverageSourceInfo *CoverageInfo=nullptr)
Definition:
CodeGenABITypes.cpp:29
clang::CodeGenOptions
Definition:
CodeGenOptions.h:41
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition:
DeclCXX.h:285
clang::HeaderSearchOptions
Definition:
HeaderSearchOptions.h:45
clang::CodeGen::CodeGenABITypes
Definition:
CodeGenABITypes.h:50
AttributeLangSupport::C
Definition:
SemaDeclAttr.cpp:39
clang::FunctionType::ExtInfo
Definition:
Type.h:2847
Generated on Mon Aug 31 2015 10:45:13 for clang by
1.8.6