]> granicus.if.org Git - clang/commit
Make attribute-target on a Definition-after-use update the LLVM attributes
authorErich Keane <erich.keane@intel.com>
Mon, 12 Feb 2018 17:01:41 +0000 (17:01 +0000)
committerErich Keane <erich.keane@intel.com>
Mon, 12 Feb 2018 17:01:41 +0000 (17:01 +0000)
commitb2ae819f9001f1c1b1f3ff67a990ab3a9e8e44d8
treeb3b6a99206646848c5b81b0c0c8dc8793fd5a92c
parentef56574a01305e3cf293c0930f2e1ef8fdf2c559
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324907 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
test/CodeGen/attr-target-x86.c