forked from OSchip/llvm-project
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165489
This commit is contained in:
parent
c9b22d735a
commit
0597c1e53c
|
@ -578,7 +578,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
|
|||
|
||||
// (noinline wins over always_inline, and we can't specify both in IR)
|
||||
if ((D->hasAttr<AlwaysInlineAttr>() || D->hasAttr<ForceInlineAttr>()) &&
|
||||
!F->getFnAttributes().hasNoInlineAttr())
|
||||
!F->getFnAttributes().hasAttribute(llvm::Attributes::NoInline))
|
||||
F->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
|
||||
// FIXME: Communicate hot and cold attributes to LLVM more directly.
|
||||
|
|
Loading…
Reference in New Issue