History log of /external/clang/utils/TableGen/TableGen.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/utils/TableGen/TableGen.cpp
9feedb862e46f46d302f250ade1cac7108ba880b 04-Nov-2013 Aaron Ballman <aaron@aaronballman.com> Attributes which accept a type as their sole argument are no longer hard coded into the parser. Instead, they are automatically listed through tablegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
d92aa2d2880d1c30baff996cb4c4f0836dbc355e 24-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR17666: Instead of allowing an initial identifier argument in any attribute
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.

I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
bbb3b3237df2284f6f3c34798944fcfa4b43fd34 10-Sep-2013 Aaron Ballman <aaron@aaronballman.com> Attribute tablegen now understands that attribute arguments can be optional. This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
83b154843c57f52422c62139df0bf9a4a1418e5f 16-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> clang-format utils/TableGen/TableGen.cpp.

I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
15f03ea2e223631e71d4ae75db986e2951d4e092 18-Jun-2013 Reid Kleckner <reid@kleckner.net> Remove option emitter from clang-tblgen

The CMake build was still using it because I forgot to s/CLANG/LLVM/ in
the tablegen() call. The Makefile build is already using llvm-tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
92eb7d847cb1273a63d5e3b7dc98a7c97a81b703 03-May-2013 Douglas Gregor <dgregor@apple.com> Use attribute argument information to determine when to parse attribute arguments as expressions.

This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};

while this would parse as a "parameter name" 'Align':

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
fa5f03052bc39d9c8f2fa8b4002597a8219760a4 03-May-2013 Douglas Gregor <dgregor@apple.com> Revert r180970; it's causing breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
3796d1539a39b999fd50bed7aea726ef6f845e17 03-May-2013 Douglas Gregor <dgregor@apple.com> Use attribute argument information to determine when to parse attribute arguments as expressions.

This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align((Align)))) char storage[Size];
};

while this would parse as a "parameter name" 'Align':

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align(Align))) char storage[Size];
};

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

template<unsigned Size, unsigned Align>
class my_aligned_storage
{
__attribute__((align)) char storage[Size];
};

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
af01bed59b2fe18fa483f5dbb86584b31eda6f98 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: improve the fidelity of XML output for many block commands

This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.

For example:

\todo Meow.

used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
5bd1e5ba000023910ad986a16dd16d7ca914750a 30-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: resolve more named character references

This reimplements r173850 with a better approach:
(1) use a TableGen-generated matcher instead of doing a linear search;
(2) avoid allocations for new strings by converting code points to string
iterals with TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
51d8c52ad36129760eaa586f85176037e2cd0d0e 24-Jan-2013 Michael Han <fragmentshaders@gmail.com> PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.

Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td.
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself.

Thanks to Richard Smith for the idea and review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
c3cd2b0d538e4db78f1bcbedd0085e2005ce5c51 07-Jan-2013 Alexander Kornienko <alexfh@google.com> Implement Attr dumping for -ast-dump.
http://llvm-reviews.chandlerc.com/D234

Patch by Philip Craig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
30bc63ffbab71522e5c5a9adc5054e462a0cbf65 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines under utils/...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
de3832b123c761e1dac39ba99c5d67151a2e05bc 03-Oct-2012 Sean Silva <silvas@purdue.edu> tblgen: Migrate clang-tblgen to new TableGenMain API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
e4330a302ac20b41b9800267ebd4b5b01f8553f8 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed). Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands. Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID. Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state. But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object. This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed. This is a source-incompatible
change for this C API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
c24a76e376a767edc14e60bed716396a84cb127a 31-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
8d3ba23f2d9e6c87794d059412a0808c9cbacb25 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
or verbatim command.
* Inline content is placed within some block. Inline content includes plain
text, inline commands and HTML as tag soup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
3cc509b5ac0e99ef44c1bf8b57cd403b546abc3d 13-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Make clang-tblgen backends functions instead of TableGenBackends.

Get rid of a bunch of header files. TableGen output should be unaffected.

Patch by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
e53ac8aea2d9e8bbb11191398ea3cc2edb2d171a 07-Mar-2012 Michael Han <Michael.Han@autodesk.com> Refactor Clang sema attribute handling.

This submission improves Clang sema handling by using Clang tablegen
to generate common boilerplate code. As a start, it implements AttributeList
enumerator generation and case statements for AttributeList::getKind.

A new field "SemaHandler" is introduced in Attr.td and by default set to 1
as most of attributes in Attr.td have semantic checking in Sema. For a small
number of attributes that don't appear in Sema, the value is set to 0.

Also there are a small number of attributes that only appear in Sema but not
in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList.

Reviewed by Delesley Hutchins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
7b9ff0c09025dcbe48ec7db71330e2066d1e1863 20-Jan-2012 DeLesley Hutchins <delesley@google.com> Instantiate dependent attributes when instantiating templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp
51d7777a21b9706d503496c650af06f80d278c1a 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add the Clang tblgen backends to Clang, and flip the switch to cause
the build systems to use clang-tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/TableGen/TableGen.cpp