[PATCH] D43095: Make attribute-target on a Definition-after-use update the LLVM attributes

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 15:32:23 PST 2018


erichkeane created this revision.
erichkeane added reviewers: echristo, craig.topper, aaron.ballman.
Herald added a subscriber: mgrang.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D43095

Files:
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/CodeGenModule.cpp
  lib/CodeGen/CodeGenModule.h
  test/CodeGen/attr-target-x86.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43095.133519.patch
Type: text/x-patch
Size: 7500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180208/0f6bafa9/attachment-0001.bin>


More information about the cfe-commits mailing list