LLVM  4.0.0
Macros | Functions | Variables
Attributes.cpp File Reference
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "AttributeImpl.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Atomic.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include "AttributesCompatFunc.inc"
Include dependency graph for Attributes.cpp:

Go to the source code of this file.

Macros

#define GET_ATTR_COMPAT_FUNC
 

Functions

static uint64_t packAllocSizeArgs (unsigned ElemSizeArg, const Optional< unsigned > &NumElemsArg)
 
static std::pair< unsigned,
Optional< unsigned > > 
unpackAllocSizeArgs (uint64_t Num)
 
template<typename AttrClass >
static bool isEqual (const Function &Caller, const Function &Callee)
 
template<typename AttrClass >
static void setAND (Function &Caller, const Function &Callee)
 Compute the logical AND of the attributes of the caller and the callee. More...
 
template<typename AttrClass >
static void setOR (Function &Caller, const Function &Callee)
 Compute the logical OR of the attributes of the caller and the callee. More...
 
static void adjustCallerSSPLevel (Function &Caller, const Function &Callee)
 If the inlined function had a higher stack protection level than the calling function, then bump up the caller's stack protection level. More...
 

Variables

static const unsigned AllocSizeNumElemsNotPresent = -1
 

Macro Definition Documentation

#define GET_ATTR_COMPAT_FUNC

Definition at line 1505 of file Attributes.cpp.

Function Documentation

static void adjustCallerSSPLevel ( Function Caller,
const Function Callee 
)
static

If the inlined function had a higher stack protection level than the calling function, then bump up the caller's stack protection level.

Definition at line 1480 of file Attributes.cpp.

References llvm::AttrBuilder::addAttribute(), llvm::Function::addFnAttr(), B, llvm::AttributeSet::FunctionIndex, llvm::Function::getContext(), llvm::Function::hasFnAttribute(), and llvm::Function::removeAttributes().

template<typename AttrClass >
static bool isEqual ( const Function Caller,
const Function Callee 
)
static
static uint64_t packAllocSizeArgs ( unsigned  ElemSizeArg,
const Optional< unsigned > &  NumElemsArg 
)
static
template<typename AttrClass >
static void setAND ( Function Caller,
const Function Callee 
)
static

Compute the logical AND of the attributes of the caller and the callee.

This function sets the caller's attribute to false if the callee's attribute is false.

Definition at line 1460 of file Attributes.cpp.

template<typename AttrClass >
static void setOR ( Function Caller,
const Function Callee 
)
static

Compute the logical OR of the attributes of the caller and the callee.

This function sets the caller's attribute to true if the callee's attribute is true.

Definition at line 1472 of file Attributes.cpp.

static std::pair<unsigned, Optional<unsigned> > unpackAllocSizeArgs ( uint64_t  Num)
static

Variable Documentation

const unsigned AllocSizeNumElemsNotPresent = -1
static

Definition at line 41 of file Attributes.cpp.

Referenced by packAllocSizeArgs(), and unpackAllocSizeArgs().