summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve the specification of spellings in Attr.td.Alexis Hunt2012-06-191-53/+45
| | | | | | | | | | | | | | | | | Note that this is mostly a structural patch that handles the change from the old spelling style to the new one. One consequence of this is that all AT_foo_bar enum values have changed to not be based off of the first spelling, but rather off of the class name, so they are now AT_FooBar and the like (a straw poll on IRC showed support for this). Apologies for code churn. Most attributes have GNU spellings as a temporary solution until everything else is sorted out (such as a Keyword spelling, which I intend to add if someone else doesn't beat me to it). This is definitely a WIP. I've also killed BaseCheckAttr since it was unused, and I had to go through every attribute anyway. llvm-svn: 158700
* Handle C++11 attribute namespaces automatically.Alexis Hunt2012-06-181-2/+24
| | | | | | | | Now, as long as the 'Namespaces' variable is correct inside Attr.td, the generated code will correctly admit a C++11 attribute only when it has the appropriate namespace(s). llvm-svn: 158661
* Make clang-tblgen backends functions instead of TableGenBackends.Jakob Stoklund Olesen2012-06-1314-630/+403
| | | | | | | | Get rid of a bunch of header files. TableGen output should be unaffected. Patch by Sean Silva! llvm-svn: 158388
* TableGen: Remove extraneous '\' at EOL in generated tests.Jim Grosbach2012-05-301-1/+1
| | | | llvm-svn: 157700
* Fix our handling of visibility in explicit template instantiations.Rafael Espindola2012-05-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * Don't copy the visibility attribute during instantiations. We have to be able to distinguish struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template DEFAULT void bar<foo>(); from struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template void bar<foo>(); * If an instantiation has an attribute, it takes precedence over an attribute in the template. * With instantiation attributes handled with the above logic, we can now select the minimum visibility when looking at template arguments. llvm-svn: 156821
* Teach the parser to deal with multiple spellings for the sameDouglas Gregor2012-05-111-9/+13
| | | | | | | attribute, rather than requiring multiple cases in consumers of this information. llvm-svn: 156666
* ARM: Support marking intrinsic definitions as 'unavailable'Jim Grosbach2012-05-092-4/+10
| | | | llvm-svn: 156490
* Remove DiagGroups from notes, and add a TableGen assertion to catch them.Richard Smith2012-05-041-0/+2
| | | | llvm-svn: 156192
* Replace the StringSwitch in AttributeList::getKind() with aDouglas Gregor2012-05-021-3/+17
| | | | | | | | TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me at StringMatcher! llvm-svn: 156003
* Introduce the notion of 'ignored' attributes, so that all attributesDouglas Gregor2012-05-021-5/+9
| | | | | | we accept are not modeled somehow via Attr.td. llvm-svn: 155998
* Introduce the notion of an attribute that has no direct representationDouglas Gregor2012-05-021-1/+23
| | | | | | as an AST node, and fold a number of such attributes into Attr.td. llvm-svn: 155995
* Revert my optimization to AttributeList::getKind() in r155987;Douglas Gregor2012-05-021-2/+1
| | | | | | Benjamin has suggested a better approach. llvm-svn: 155989
* Replace the StringSwitch in AttributeList::getKind(constDouglas Gregor2012-05-021-1/+2
| | | | | | | IdentifierInfo *) with a static StringMap, improving -fsyntax-only performance by 1% for the example in <rdar://problem/11004361>. llvm-svn: 155987
* Refactor Clang sema attribute handling.Michael Han2012-03-073-0/+131
| | | | | | | | | | | | | | | | | 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. llvm-svn: 152169
* [tablegen] Make sure that the code that is determining the order of warning ↵Argyrios Kyrtzidis2012-03-061-51/+46
| | | | | | | | groups is shared to avoid any "misalignment" if indices. llvm-svn: 152074
* Store the warning option corresponding to a diagnostics as an index into the ↵Benjamin Kramer2012-02-151-5/+23
| | | | | | | | option table instead of storing the name. Another 8 bytes + relocation removed from every diagnostic on x86_64. llvm-svn: 150615
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-131-1/+1
| | | | | | More cleanup after r149799. llvm-svn: 150380
* Remove stray semi-colon.Daniel Dunbar2012-02-101-1/+1
| | | | llvm-svn: 150231
* Kill the brief and full explanation fields from StaticDiagInfoRec. They were ↵Benjamin Kramer2012-02-091-8/+0
| | | | | | | | unused and wasted space for nothing. - per PR11952. llvm-svn: 150199
* Move instantiateTemplateAttribute into the sema namespace, make helpers static.Benjamin Kramer2012-02-061-2/+6
| | | | llvm-svn: 149864
* Delayed template instantiation of late-parsed attributes.DeLesley Hutchins2012-01-201-1/+6
| | | | llvm-svn: 148595
* Instantiate dependent attributes when instantiating templates.DeLesley Hutchins2012-01-203-3/+162
| | | | llvm-svn: 148592
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-11/+1
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-171-3/+0
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* CodeInit was replaced by StringInit.Jakob Stoklund Olesen2012-01-131-3/+1
| | | | llvm-svn: 148095
* Remove unused include of VectorExtras.h.Benjamin Kramer2012-01-071-1/+0
| | | | llvm-svn: 147737
* Relax type checking for a few Neon intrinsics. <rdar://problem/10538555>Bob Wilson2011-12-201-0/+11
| | | | | | | | | | | | Not long ago, I tightened up the type checking for pointer arguments of Neon intrinsics to match the specifications provided by ARM. One consequence was that it became impossible to access the unaligned versions of a few Neon load/store operations. Since there are just a few of these intrinsics where it makes a difference, I think it's better to relax the type checking than to either introduce new non-standard unaligned intrinsics or to disallow intrinsics for the unaligned operations. llvm-svn: 146963
* Unweaken vtables as per ↵David Blaikie2011-12-201-1/+1
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Add support for pretty-printing attributes, from Richard Membarth!Douglas Gregor2011-11-191-0/+67
| | | | llvm-svn: 145002
* Fix Neon builtin pointer argument checking for "sret" builtins.Bob Wilson2011-11-161-6/+24
| | | | | | | | | | | The code for checking Neon builtin pointer argument types was assuming that there would only be one pointer argument. But, for vld2-4 builtins, the first argument is a special sret pointer where the result will be stored. So, instead of scanning all the arguments to find a pointer, have TableGen figure out the index of the pointer argument that needs checking. That's better than scanning all the arguments regardless. <rdar://problem/10448804> llvm-svn: 144834
* Validate DiagGroup names in TableGen, they're used as command line arguments ↵Benjamin Kramer2011-11-151-0/+4
| | | | | | so we don't want shell meta chars in there. llvm-svn: 144645
* Check pointer types for arguments of Neon load/store macros. rdar://9958031Bob Wilson2011-11-081-10/+18
| | | | | | | | | | | The Neon load/store intrinsics need to be implemented as macros to avoid hiding alignment attributes on the pointer arguments, and the macros can only evaluate those pointer arguments once (in case they have side effects), so it has been hard to get the right type checking for those pointers. I tried various alternatives in the arm_neon.h header, but it's much more straightforward to just check directly in Sema. llvm-svn: 144075
* Clean up type flags for overloaded Neon builtins. No functional change.Bob Wilson2011-11-082-13/+43
| | | | | | | | | This patch just adds a simple NeonTypeFlags class to replace the various hardcoded constants that had been used until now. Unfortunately I couldn't figure out a good way to avoid duplicating that class between clang and TableGen, but since it's small and rarely changes, that's not so bad. llvm-svn: 144054
* Use StringRef's case transformation methods.Benjamin Kramer2011-11-061-2/+1
| | | | llvm-svn: 143889
* Update the CMake build for clang-tblgen to reflect that it directlyChandler Carruth2011-11-021-0/+1
| | | | | | | depends on the Support library rather than relying on TableGen's transitive dependency. llvm-svn: 143532
* Add __nodebug__ attribute to functions in arm_neon.hBob Wilson2011-10-141-1/+1
| | | | | | This matches what we do for Intel vector intrinsics. <rdar://problem/10280207> llvm-svn: 141958
* Constant expression evaluation refactoring:Richard Smith2011-10-101-1/+1
| | | | | | | | | | | - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
* Make clang-tblgen's Makefile independent of Clang's top-level Makefile,Peter Collingbourne2011-10-081-2/+2
| | | | | | | to avoid having to make it available for the cross build when it builds only clang-tblgen. llvm-svn: 141453
* Add the Clang tblgen backends to Clang, and flip the switch to causePeter Collingbourne2011-10-0615-0/+4098
the build systems to use clang-tblgen. llvm-svn: 141291
OpenPOWER on IntegriCloud