LLVM 24.0.0git
ForceFunctionAttrs.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "forceattrs"

Functions

static bool hasConflictingFnAttr (Attribute::AttrKind Kind, Function &F)
static void forceAttributes (const IPOOptions &Opts, Function &F)
 If F has any forced attributes given on the command line, add them.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "forceattrs"

Definition at line 19 of file ForceFunctionAttrs.cpp.

Function Documentation

◆ forceAttributes()

void forceAttributes ( const IPOOptions & Opts,
Function & F )
static

If F has any forced attributes given on the command line, add them.

If F has any forced remove attributes given on the command line, remove them. When both force and force-remove are given to a function, the latter takes precedence.

Definition at line 56 of file ForceFunctionAttrs.cpp.

References llvm::Attribute::canUseAsFnAttr(), llvm::dbgs(), F, llvm::Attribute::getAttrKindFromName(), hasConflictingFnAttr(), LLVM_DEBUG, llvm::Attribute::None, and llvm::StringRef::split().

Referenced by llvm::ForceFunctionAttrsPass::run().

◆ hasConflictingFnAttr()

bool hasConflictingFnAttr ( Attribute::AttrKind Kind,
Function & F )
static

Definition at line 21 of file ForceFunctionAttrs.cpp.

References F.

Referenced by forceAttributes(), and llvm::ForceFunctionAttrsPass::run().