Preserve exceptions information during calls code generation.

This patch changes the generation of CGFunctionInfo to contain 
the FunctionProtoType if it is available. This enables the code 
generation for call instructions to look into this type for 
exception information and therefore generate better quality 
IR - it will not create invoke instructions for functions that 
are know not to throw.

llvm-svn: 253926
This commit is contained in:
Samuel Antao
2015-11-23 22:04:44 +00:00
parent 2f16f25391
commit 798f11cfb7
10 changed files with 143 additions and 41 deletions

View File

@@ -968,16 +968,14 @@ public:
/// function type.
///
/// \param Info - The function type information.
/// \param TargetDecl - The decl these attributes are being constructed
/// for. If supplied the attributes applied to this decl may contribute to the
/// function attributes and calling convention.
/// \param CalleeInfo - The callee information these attributes are being
/// constructed for. If valid, the attributes applied to this decl may
/// contribute to the function attributes and calling convention.
/// \param PAL [out] - On return, the attribute list to use.
/// \param CallingConv [out] - On return, the LLVM calling convention to use.
void ConstructAttributeList(const CGFunctionInfo &Info,
const Decl *TargetDecl,
AttributeListType &PAL,
unsigned &CallingConv,
bool AttrOnCallSite);
CGCalleeInfo CalleeInfo, AttributeListType &PAL,
unsigned &CallingConv, bool AttrOnCallSite);
// Fills in the supplied string map with the set of target features for the
// passed in function.