summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Work around MSVC 2013's inability to default move special members.Richard Smith2016-09-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281382 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around a GCC 4.7-specific issue: due to implementing older rules forRichard Smith2016-09-131-0/+5
| | | | | | | | | | | | implicit declarations of move operations, GCC 4.7 would find that SelectPiece has neither a move constructor nor a copy constructor. The copy constructor was (correctly) deleted because the class has a member of move-only type, and the move constructor was (incorrectly, per current C++ rules) not provided because the class has a copy-only base class (in turn because it explicitly declares a destructor). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281363 91177308-0d34-0410-b5e6-96231b3b80d8
* Add virtual destructor (necessary due to the switch to shared_ptr).Richard Smith2016-09-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281198 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt #3 to placate MSVC.Richard Smith2016-09-121-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281197 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt #2 to placate MSVCRichard Smith2016-09-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281195 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to placate MSVC.Richard Smith2016-09-121-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281194 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a mode to clang-tblgen to generate reference documentation for warning andRichard Smith2016-09-123-1/+432
| | | | | | | | | remark flags. For now I'm checking in a copy of the built documentation, but we can replace this with a placeholder (as we do for the attributes reference documentation) once we enable building this server-side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281192 91177308-0d34-0410-b5e6-96231b3b80d8
* [tablegen] Check that an optional IdentifierArgument of an attribute isAkira Hatanaka2016-09-101-1/+7
| | | | | | | | | | | | | provided before trying to print it. This fixes a segfault that occurs when function printPretty generated by tablegen tries to print an optional argument of attribute objc_bridge_related. rdar://problem/28155469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281132 91177308-0d34-0410-b5e6-96231b3b80d8
* Add plumbing for new attribute type "Microsoft".Nico Weber2016-09-031-6/+22
| | | | | | | | | This is for attributes in []-delimited lists preceding a class, like e.g. `[uuid("...")] class Foo {};` Not used by anything yet, so no behavior change. Part of https://reviews.llvm.org/D23895 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280575 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement __attribute__((require_constant_initialization)) for safe static ↵Eric Fiselier2016-09-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization. Summary: This attribute specifies expectations about the initialization of static and thread local variables. Specifically that the variable has a [constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization) according to the rules of [basic.start.static]. Failure to meet this expectation will result in an error. Static objects with constant initializers avoid hard-to-find bugs caused by the indeterminate order of dynamic initialization. They can also be safely used by other static constructors across translation units. This attribute acts as a compile time assertion that the requirements for constant initialization have been met. Since these requirements change between dialects and have subtle pitfalls it's important to fail fast instead of silently falling back on dynamic initialization. ```c++ // -std=c++14 #define SAFE_STATIC __attribute__((require_constant_initialization)) static struct T { constexpr T(int) {} ~T(); }; SAFE_STATIC T x = {42}; // OK. SAFE_STATIC T y = 42; // error: variable does not have a constant initializer // copy initialization is not a constant expression on a non-literal type. ``` This attribute can only be applied to objects with static or thread-local storage duration. Reviewers: majnemer, rsmith, aaron.ballman Subscribers: jroelofs, cfe-commits Differential Revision: https://reviews.llvm.org/D23385 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280525 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r280516 since it contained accidental changes.Eric Fiselier2016-09-021-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280521 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement __attribute__((require_constant_initialization)) for safe static ↵Eric Fiselier2016-09-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization. Summary: This attribute specifies expectations about the initialization of static and thread local variables. Specifically that the variable has a [constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization) according to the rules of [basic.start.static]. Failure to meet this expectation will result in an error. Static objects with constant initializers avoid hard-to-find bugs caused by the indeterminate order of dynamic initialization. They can also be safely used by other static constructors across translation units. This attribute acts as a compile time assertion that the requirements for constant initialization have been met. Since these requirements change between dialects and have subtle pitfalls it's important to fail fast instead of silently falling back on dynamic initialization. ```c++ // -std=c++14 #define SAFE_STATIC __attribute__((require_constant_initialization)) static struct T { constexpr T(int) {} ~T(); }; SAFE_STATIC T x = {42}; // OK. SAFE_STATIC T y = 42; // error: variable does not have a constant initializer // copy initialization is not a constant expression on a non-literal type. ``` This attribute can only be applied to objects with static or thread-local storage duration. Reviewers: majnemer, rsmith, aaron.ballman Subscribers: jroelofs, cfe-commits Differential Revision: https://reviews.llvm.org/D23385 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280516 91177308-0d34-0410-b5e6-96231b3b80d8
* [Order Files] On Darwin use DTrace's oneshot probeChris Bieneman2016-08-241-0/+5
| | | | | | The oneshot probe only gets executed the first time the probe is hit in the process. For order file generation this is really all we care about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279673 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-tblgen] Remove unused #include (NFC)Vedant Kumar2016-08-051-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277885 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Order Files] Remove dtrace predicate"Chris Bieneman2016-08-021-1/+2
| | | | | | | | This reverts commit r277487. Removing the probe predicate was a red herring. It results in more symbols being placed in the final order file, but they are symbols from outside the clang image. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277492 91177308-0d34-0410-b5e6-96231b3b80d8
* [Order Files] Remove dtrace predicateChris Bieneman2016-08-021-2/+1
| | | | | | Having the dtrace predicate setup to only show probes in clang filters out static initializers executed by dyld, which we do want included in the order files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277487 91177308-0d34-0410-b5e6-96231b3b80d8
* [Order Files] Fixing an error in the perf-helper scriptChris Bieneman2016-08-011-1/+1
| | | | | | Dtrace probemod needs to be based on the first argument of the command, not the first argument of the args. This error was introduced a while back when I added support for skipping the driver and invoking cc1 directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277401 91177308-0d34-0410-b5e6-96231b3b80d8
* [Perf-Helper] Add logging for dtrace commandsChris Bieneman2016-07-291-0/+1
| | | | | | Logging the dtrace command into the top of the dtrace log is useful when debugging why the order file generation is flaky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277234 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-182-6/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* Sema: support __declspec(dll*) on ObjC interfacesSaleem Abdulrasool2016-07-151-0/+9
| | | | | | | | | | | Extend the __declspec(dll*) attribute to cover ObjC interfaces. This was requested by Microsoft for their ObjC support. Cover both import and export. This only adds the semantic analysis portion of the support, code-generation still remains outstanding. Add some basic initial documentation on the attributes that were previously empty. Tweak the previous tests to use the relative expected-warnings to make the tests easier to read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275610 91177308-0d34-0410-b5e6-96231b3b80d8
* Add simple, stupid, pattern-based fuzzer / reducer for modules bugs. I'veRichard Smith2016-06-271-0/+166
| | | | | | | | already used this to find and reduce quite a few bugs, and it works pretty well if you can find the right patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273913 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ranges to concisely express iterationDavid Majnemer2016-06-231-2/+2
| | | | | | | No functional change is intended, this should just clean things up a little. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273522 91177308-0d34-0410-b5e6-96231b3b80d8
* [perf-training] Ignore 'Profile Note' warnings from the runtimeVedant Kumar2016-06-141-0/+1
| | | | | | | | | | | | | | | After r272599, -DLLVM_BUILD_INSTRUMENTED passes a default argument to -fprofile-instr-generate. This confuses the perf-helper script because the runtime emits a note stating that the default is overridden by the LLVM_PROFILE_FILE environment variable. Change the perf-helper script s.t it does not treat these notes as failures. This isn't a strictly NFC change, but I don't see a simple way to add a test for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272695 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove stray semi-colon in *.py file, NFCVedant Kumar2016-06-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272610 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved Visual Studio visualization of OpaquePtrMike Spertus2016-06-131-0/+18
| | | | | | | | | | | Create a special visualizer for OpaquePtr<QualType> because the standard visualizer doesn't work with OpaquePtr<QualType> due to QualType being heavily dependent on traits to be pointer-like. Also, created an identical visualizer for UnionOpaquePtr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272531 91177308-0d34-0410-b5e6-96231b3b80d8
* Visual Studio Visualizer for PackExpansionTypeMike Spertus2016-06-121-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272522 91177308-0d34-0410-b5e6-96231b3b80d8
* Visual Studio native visualizer for ParsedTemplateArgumentMike Spertus2016-06-121-0/+11
| | | | | | | | | | | Does a good job with type and non-type template arguments and lays the groundwork for template template arguments to visualize well once there is a TemplateName visualizer. Also fixed what looks like an incorrect comment in the header for ParsedTemplate.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272521 91177308-0d34-0410-b5e6-96231b3b80d8
* Rudimentary support for Visual Studio Stmt visualizerMike Spertus2016-06-121-0/+6
| | | | | | | Better than nothing... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272518 91177308-0d34-0410-b5e6-96231b3b80d8
* Visual Studio Visualizers for ActionResult, LocInfoType, and and TypeSourceInfoMike Spertus2016-06-111-0/+39
| | | | | | | | | | | | Created a visualizer for ActionResult that displayed the validity and the pointer, but many of them initially displayed poorly. It turns out that the primary culprit is that LocInfoType is often passed in an action result, but it is not the same as other types. For example, LocInfoType is not in TypeNodes.def and clang::Type::TypeClass does not have a LocInfoType enum. After adding a special visualizer for LocInfoType, the display was more useful git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272487 91177308-0d34-0410-b5e6-96231b3b80d8
* Visual Studio visualizers associated with LookupResultsMike Spertus2016-06-111-0/+18
| | | | | | | | | | | | Visualizers for DeclAccessPair, UnresolvedSet, and LookupResult. For example, when combined with LLVM diff D21256 (currently in review), a Lookup set will show much more naturally in the Locals window something like Found: {public typename ...Ts} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272448 91177308-0d34-0410-b5e6-96231b3b80d8
* Added missing close brace to OpaquePtr Visual Studio visualizerMike Spertus2016-06-101-1/+1
| | | | | | | This syntax error resulted in garbage being appended to OpaquePtr visualizations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272441 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to match LLVM r272232.Richard Smith2016-06-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272233 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve Visual Studio visualization of DeclaratorDeclMike Spertus2016-06-071-0/+4
| | | | | | | With this change, you can now expand its name and type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271966 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved Visual Studio visualizations for template argument listsMike Spertus2016-06-061-1/+22
| | | | | | | | | | | Improved the visualizer for TemplateArgumentList to show type arguments in the DisplayString. E.g., <double, long>. Added a visualizer for MultiLevelTemplateArgumentList. I decided to display them by how they would appear in a template with the (non-existent) template-id's omitted, so the DisplayString naturally presents as something like <double, long>::<char *>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271944 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in last submission to visualize proper template argumentMike Spertus2016-06-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271911 91177308-0d34-0410-b5e6-96231b3b80d8
* Better Visual Studio visualization of TemplateArgument and TemplateArgumentListMike Spertus2016-06-061-2/+32
| | | | | | | | For pack TemplateArguments, visualize all of the items in the pack Visualize a TemplateArgumentList as a template argument list. E.g., <int, double> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271910 91177308-0d34-0410-b5e6-96231b3b80d8
* Slightly improve Visual Studio visualization of clang::ExprMike Spertus2016-06-061-1/+1
| | | | | | | | | | Now it gives the StmtClass of the Expr as well as the type. It's still a long way from full visualization of expressions, but I have found that having the class really helps when debugging, so definitely worth submitting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271866 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around MinGW's macro definition of 'interface' to 'struct'Reid Kleckner2016-05-311-0/+5
| | | | | | | | | | | Previous attempts to rename the IBOutletCollection argument to something other than "Interface" were undone (r127127 and r139620). Instead of renaming it, work around this in tablegen, so the public facing getter can have the usual name of 'getInterface'. Fixes PR26682 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271305 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-272-8/+10
| | | | | | No functionality change intended, maybe a tiny performance improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270996 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn copies into references as suggested by clang-tidy's ↵Benjamin Kramer2016-05-271-6/+7
| | | | | | performance-unnecessary-copy-initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270994 91177308-0d34-0410-b5e6-96231b3b80d8
* Visualize ellipses in TemplateTypeParm and TemplateTypeParmDeclMike Spertus2016-05-241-2/+5
| | | | | | | Now a TemplateTypeParm will be visualized as typename ...T if it is a pack git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270521 91177308-0d34-0410-b5e6-96231b3b80d8
* Visualizer for Pack template argumentsMike Spertus2016-05-231-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270505 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix use-after-free ASan failures for modules / PCH files that deserialize ↵Richard Smith2016-05-181-7/+33
| | | | | | abi_tag or no_sanitize attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269869 91177308-0d34-0410-b5e6-96231b3b80d8
* Simple visualization of expressionsMike Spertus2016-05-161-0/+3
| | | | | | | While more could be done, showing the type is a lot better than what is there now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269623 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Clang-tidy modernize-use-bool-literals in generated code.Eugene Zelenko2016-05-121-16/+118
| | | | | | | | | | | Reduce space in empty constructors and between data members and first public section. Fix some Include What You Use warnings. Differential revision: http://reviews.llvm.org/D20213 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269371 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert unnecessary tblgen change.Peter Collingbourne2016-04-271-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267788 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267784 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace hardcoded comment at 'lit.site.cfg.in'Alex Denisov2016-04-162-4/+4
| | | | | | | | | | | | | | At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266516 91177308-0d34-0410-b5e6-96231b3b80d8
* [OrderFiles] Don't allow lit to run dtrace multithreadedChris Bieneman2016-04-131-0/+1
| | | | | | Dtrace is implemented to try and minimize performance impact on the process being traced. This results in dtrace dropping samples if it is taking too many CPU resources. Multi-threading dtrace increases the sample drop rate dramatically. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266213 91177308-0d34-0410-b5e6-96231b3b80d8
* [Perf-Training] Reworked workflow improvements for order-file generationChris Bieneman2016-04-081-2/+1
| | | | | | | | | | | | | | | | | | | This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64. Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265864 91177308-0d34-0410-b5e6-96231b3b80d8