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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user