diff options
author | Erich Keane <erich.keane@intel.com> | 2018-02-12 17:01:41 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-02-12 17:01:41 +0000 |
commit | 93e58667ee1030f36affff0cc5c43e404be19523 (patch) | |
tree | ee537870827d464ee92e4f4e5a77f0f405068e4d /clang/lib/CodeGen/CodeGenModule.h | |
parent | 1022220b16123d918fa885b86fd3ca2b3b5683f1 (diff) | |
download | bcm5719-llvm-93e58667ee1030f36affff0cc5c43e404be19523.tar.gz bcm5719-llvm-93e58667ee1030f36affff0cc5c43e404be19523.zip |
Make attribute-target on a Definition-after-use update the LLVM attributes
As reported here: https://bugs.llvm.org/show_bug.cgi?id=36301
The issue is that the 'use' causes the plain declaration to emit
the attributes to LLVM-IR. However, if the definition added it
later, these would silently disappear.
This commit extracts that logic to its own function in CodeGenModule,
and has the attribute-applications done during 'definition' update
the attributes properly.
Differential Revision: https://reviews.llvm.org/D43095
llvm-svn: 324907
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 30ce47b5d7d..d85537b1c28 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1273,6 +1273,8 @@ private: ForDefinition_t IsForDefinition = NotForDefinition); + bool GetCPUAndFeaturesAttributes(const Decl *D, + llvm::AttrBuilder &AttrBuilder); void setNonAliasAttributes(const Decl *D, llvm::GlobalObject *GO); /// Set function attributes for a function declaration. |