diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-02-22 16:59:24 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-02-22 16:59:24 +0000 |
| commit | 16381d3390498c39def1db3d528121c7b06809fa (patch) | |
| tree | e1b782c01d7fb71cf3d5e14b34f9487f85940619 /lib/CodeGen/CGCall.cpp | |
| parent | 3d8ada65463bb8f60bfa08964050e40eab1caa36 (diff) | |
| download | clang-16381d3390498c39def1db3d528121c7b06809fa.tar.gz clang-16381d3390498c39def1db3d528121c7b06809fa.tar.bz2 clang-16381d3390498c39def1db3d528121c7b06809fa.tar.xz | |
Exposing the noduplicate attribute within Clang, which marks functions so that the optimizer does not duplicate code.
Patch thanks to Marcello Maggioni!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
| -rw-r--r-- | lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index a9caa88706..a21e4783b6 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1052,6 +1052,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, FuncAttrs.addAttribute(llvm::Attribute::NoUnwind); if (TargetDecl->hasAttr<NoReturnAttr>()) FuncAttrs.addAttribute(llvm::Attribute::NoReturn); + if (TargetDecl->hasAttr<NoDuplicateAttr>()) + FuncAttrs.addAttribute(llvm::Attribute::NoDuplicate); if (const FunctionDecl *Fn = dyn_cast<FunctionDecl>(TargetDecl)) { const FunctionProtoType *FPT = Fn->getType()->getAs<FunctionProtoType>(); |
