Exposing the noduplicate attribute within Clang, which marks functions so that the optimizer does not duplicate code.
Patch thanks to Marcello Maggioni! llvm-svn: 201941
This commit is contained in:
@@ -631,6 +631,8 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
|
||||
// Naked implies noinline: we should not be inlining such functions.
|
||||
B.addAttribute(llvm::Attribute::Naked);
|
||||
B.addAttribute(llvm::Attribute::NoInline);
|
||||
} else if (D->hasAttr<NoDuplicateAttr>()) {
|
||||
B.addAttribute(llvm::Attribute::NoDuplicate);
|
||||
} else if (D->hasAttr<NoInlineAttr>()) {
|
||||
B.addAttribute(llvm::Attribute::NoInline);
|
||||
} else if ((D->hasAttr<AlwaysInlineAttr>() ||
|
||||
|
||||
Reference in New Issue
Block a user