OSDN Git Service

[NFC] Refactor TableGen for attributes
authorTyker <tyker1@outlook.com>
Sun, 2 Feb 2020 13:46:50 +0000 (14:46 +0100)
committerTyker <tyker1@outlook.com>
Sun, 2 Feb 2020 14:12:20 +0000 (15:12 +0100)
commitcfe87a4a16b73652dc06f9fa334137656991f13f
tree201438bd0dfb8fcd3c2b39e88c49543cbd12684d
parent89d3b070c1ee305fc6e1f397ef64c0b7a8f2f83d
[NFC] Refactor TableGen for attributes

Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/AttributesCompatFunc.td [deleted file]
llvm/lib/IR/CMakeLists.txt
llvm/lib/IR/Core.cpp
llvm/utils/TableGen/Attributes.cpp