Indeed, "CHANGE" is not a thing yet, and we should probably not carry
around dead code which does not do anything apart from confusing the
reader.
Differential Revision: https://reviews.llvm.org/D42819
llvm-svn: 324027
each kind.
Attribute instantiation would previously default to instantiating each kind of
attribute only once. This was overridden by a flag whose intended purpose was
to permit attributes from a prior declaration to be inherited onto a new
declaration even if that new declaration had its own copy of the attribute.
This is the wrong behavior: when instantiating attributes from a template, we
should always instantiate all the attributes that were written on that
template.
This patch renames the flag in the Attr class (and TableGen sources) to more
clearly identify what it's actually for, and removes the usage of the flag from
template instantiation. I also removed the flag from AlignedAttr, which was
only added to work around the incorrect suppression of duplicate attribute
instantiation.
llvm-svn: 321834
This patch adds support to the attribute tablegen for specifying a [[]] attribute is allowed in C mode. This patch also adds the annotate attribute to the list of double square bracket attributes we support in C mode.
Eventually, I anticipate that this logic will be reversed (you have to opt out of allowing an attribute in C rather than opting in), but I want to see how the design plays out as more attributes are considered.
llvm-svn: 321763
Looking through the code, I saw a FIXME on IFunc to switch it
to a target specific attribute. In looking through it, i saw that
the no-longer-appropriately-named TargetArch didn't support ObjectFormat
checking.
This patch changes the name of TargetArch to TargetSpecific
(since it checks much more than just Arch), makes "Arch" optional, adds
support for ObjectFormat, better documents the TargetSpecific type, and
changes IFunc over to a TargetSpecificAttr.
Differential Revision: https://reviews.llvm.org/D41303
llvm-svn: 321201
This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc).
Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute).
llvm-svn: 319002
Storing diffs.txt is now redundant, as we simply dump the CmpRuns output
to stdout (it is saved in CI and tends to be small).
Not generating those files enables us to remove empty folders, which
confuse git, as it would not add them with reference results.
llvm-svn: 316948
Summary:
Can be used to set breakpoints for either the diagnostics actually
emitted for the current compilation, a particular DiagID, or all
DiagIDs for a particular warning.
Differential Revision: https://reviews.llvm.org/D36347
llvm-svn: 316773
Changes all existing attributes that currently use GNU<"attr"> and CXX11<"clang", "attr> spellings to instead use the Clang<"attr"> spelling.
No additional tests are necessary because the existing tests already use both spellings for the attributes converted to the new spelling. No functional changes are expected.
llvm-svn: 316658
Contrary to the deleted comment, in most cases CmpRuns.py produces a
fairly small amount of output, which is useful to see straight away to
see what has changed when executing the integration tests.
llvm-svn: 316618
Pointer to HTML diagnostics is removed (as it is not stored) as well as
the version (as it would be available from the commit message).
llvm-svn: 316534
Record::getValueAsString returns a stringref to an interned
string (apparently had been changed since most of tablegen was
written). In this patch, I audited the usage of getValueAsString
to find places where we can trivially stop storing 'std::string' and instead
keep the stringref.
There was one instance where an unnecessary 'stringstream' was being used,
so that has been removed as well to unblock the stringref replacing string fix.
Differential Revision: https://reviews.llvm.org/D38979
llvm-svn: 315956
Typically we don't use the stringstream, so instead use
raw_string_stream. Additionally, the dependent function
changed to use raw_ostream.
llvm-svn: 315950
Attributes in the docs were previously sorted (apparently)
by the attribute name, so AnyX86Interrupt ended up being the
first one, rather than in a meaningful place. This resulted in the
4 'interrupt' titled sections being all in different places.
This replaces it with a naive alphabetical sort (case sensitive, underscore
and special characters first, etc).
Differential Revision: https://reviews.llvm.org/D38969
llvm-svn: 315931
At the moment if LLVM_BUILD_INSTRUMENTED is set to True
one has to set LLVM_PROFTDATA even if it's not really used
(because of message(FATAL_ERROR ...)).
Building the instrumented version of Clang can be useful even if
one doesn't plan to build the target generate-profdata
(currently that target would only compile utils/perf-training/cxx/hello_world.cpp).
For example, one can run the instrumented version of Clang
via a separate build system against a different codebase,
collect/analyze the profiles and merge them by llvm-profdata later.
Differential revision: https://reviews.llvm.org/D38859
llvm-svn: 315665
- Exporting needed function for future reuse.
- Idiomatic python: using with `file as f` instead of `try/finally`.
- Fixing some indentation issues.
- No need to reinvent python `multiprocessing.getCPUCount()`
- Removing a function parameter which is always the same under all invocations.
- Adding some docstrings.
Differential Revision: https://reviews.llvm.org/D38156
llvm-svn: 313949
This change is required to easily test the given checkout of the analyzer,
rather than the one bundled with a system compiler.
Differential Revision: https://reviews.llvm.org/D38155
llvm-svn: 313927
Summary:
This adds an option "-gen-clang-data-collectors" to the Clang TableGen
that is used to generate StmtDataCollectors.inc.
Reviewers: arphaman, teemperor!
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D37383
llvm-svn: 312634
Summary:
`clang --autocomplete=-std` will show
```
-std: Language standard to compile for
-std= Language standard to compile for
-stdlib= C++ standard library to use
```
after this change.
However, showing HelpText with completion in bash seems super tricky, so
this feature will be used in other shells (fish, zsh...).
Reviewers: v.g.vassilev, teemperor, ruiu
Subscribers: cfe-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D35759
llvm-svn: 309113
Summary:
File path wasn't autocompleted after `-fmodule-cache-path=[tab]`, so
fixed this bug by checking if $flags contains only a newline or not.
Differential Revision: https://reviews.llvm.org/D35763
llvm-svn: 309112