summaryrefslogtreecommitdiffstats
path: root/clang/utils
Commit message (Collapse)AuthorAgeFilesLines
* Revert unnecessary tblgen change.Peter Collingbourne2016-04-271-1/+0
| | | | llvm-svn: 267788
* 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 llvm-svn: 267784
* 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. llvm-svn: 266516
* [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. llvm-svn: 266213
* [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. llvm-svn: 265864
* Re-commit r265518 ("[modules] Continue factoring encoding of AST records out ofRichard Smith2016-04-061-14/+11
| | | | | | | ASTWriter."), reverted in r265526, with a fix for an iterator invalidation bug (thanks, MSan!). llvm-svn: 265564
* Revert "[modules] Continue factoring encoding of AST records out of ASTWriter."Dmitry Polukhin2016-04-061-11/+14
| | | | | | This reverts commit r265518. llvm-svn: 265526
* [modules] Continue factoring encoding of AST records out of ASTWriter.Richard Smith2016-04-061-14/+11
| | | | llvm-svn: 265518
* Fix redundant "typename typename T" in Visual Studio Native VisualizerMike Spertus2016-04-041-2/+3
| | | | | | Also, a little minor cleanup llvm-svn: 265338
* Visual Studio native visualizers for clang::TemplateSpecializationTypeMike Spertus2016-04-011-2/+17
| | | | | | | | Displays a template specialization as, say, A<int, double>. Does not yet handle UncommonTemplateNameStorage, QualifiedTemplateName, or DependentTemplateName, but still more than worthwhile llvm-svn: 265104
* Visual Studio native visualization for clang::TemplateDeclMike Spertus2016-03-311-0/+3
| | | | | | | | With this change, TemplateDecls display in the Locals Window something like template<typename T, typename U> struct A; llvm-svn: 264997
* Visual Studio native visualization for TemplateParameterList and ↵Mike Spertus2016-03-291-0/+25
| | | | | | | | | TemplateTypeParmDecl With this change, a TemplateParameterList will suggestively display in the locals window something like: <typename T, int i> llvm-svn: 264714
* Visual Studio native visualizer for InjectedClassNameTypeMike Spertus2016-03-291-1/+13
| | | | | | Also fixes some omissions for TemplateSpecializationType llvm-svn: 264710
* This file was accidentally committed with bad line endings. Fixed...Mike Spertus2016-03-281-7/+7
| | | | llvm-svn: 264621
* Use VS2015 Project Support for Natvis to eliminate the need to manually ↵Mike Spertus2016-03-282-3/+11
| | | | | | | | | install clang native visualizer This is the clang equivalent to llvm commit 264601. When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations. Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013). llvm-svn: 264603
* Display const/volatile/restrict qualifiers in Visual Studio visualizationsMike Spertus2016-03-241-4/+16
| | | | llvm-svn: 264229
* Visualize fields of records as they were declared in Visual Studio debuggerMike Spertus2016-03-231-1/+1
| | | | llvm-svn: 264169
* [Perf-training] Using os.devnull instead of a temp fileChris Bieneman2016-03-221-4/+1
| | | | | | | | This is based on post-commit feedback from Vedant. Totally didn't know that existed and worked on Windows. Thanks Vedant! llvm-svn: 264064
* [Perf-training] Cleanup based on feedback from Sean SilvasChris Bieneman2016-03-221-11/+6
| | | | | | Sean provided feedback based on r257934 on cfe-commits. This change addresses that feedback. llvm-svn: 264063
* [Perf-training] Fixing an issue with multi-threading PGO generationChris Bieneman2016-03-221-2/+5
| | | | | | When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes. llvm-svn: 264021
* Visual Studio Native Visualizations for constructors and methodsMike Spertus2016-03-221-23/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the class struct A { A(int _i); ~A(); int foo(double d); double bar(A *a) { return 1.3; } }; appears in the VS2015 Locals Window as D 0x02dbb378 struct A |- DeclKind CXXRecord |- Members |- [0] implicit struct A |- [1] Constructor {A(int _i)} |- [2] Destructor {~A()} |- [3] Method {int foo(double d)} |- [4] Method {double bar(struct A *)} |- [Raw View] /* Other stuff */ Note that these changes only benefit VS2015 as VS2013 does not have views and only displays the struct name "A", but the change does no apparent harm in VS2013, so is still a win. llvm-svn: 264020
* [Perf-training] Adding support for tests to skip the clang driverChris Bieneman2016-03-215-2/+69
| | | | | | | | | | This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again. The approach in this patch was discussed via IRC with Sean Silvas. Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized. llvm-svn: 263997
* Visual Studio Visualizers for clang::FunctionDeclMike Spertus2016-03-201-2/+42
| | | | | | | Readably displays a FunctionDecl in the Visual Studio Locals Window something like: void g(int, double d, struct A && arr) llvm-svn: 263915
* Better visualization of clang::BuiltinType in VisualStudioMike Spertus2016-03-201-0/+26
| | | | | | Whenever possible, use C++ names for visualizing builtin types. E.g., "long double" instead of "LongDouble" llvm-svn: 263891
* Visual Studio Visualizer for clang::FunctionProtoTypeMike Spertus2016-03-201-0/+32
| | | | | | Displays return type and parameters for the Function Protoype object in the Locals window. llvm-svn: 263890
* Show members of DeclContexts (i.e., class members) in Visual Studio native ↵Mike Spertus2016-03-181-1/+28
| | | | | | | | visualizers This change shows members of DeclContext objects in the Visual Studio debugger. It will also cast a TagType like a class or a struct to a DeclContext, so its methods and fields are visualized. llvm-svn: 263794
* Add an optional string argument to DeprecatedAttr for Fix-It.Manman Ren2016-03-161-0/+11
| | | | | | | | We only add this to __attribute__((deprecated)). Differential Revision: http://reviews.llvm.org/D17865 llvm-svn: 263652
* Add visualizers for more clang types. Create more C++-like visualizations ↵Mike Spertus2016-03-161-20/+85
| | | | | | | | | | | | | | | | | for existing Clang types Created visualizer for PointerType, LValueReferenceType, RValueReferenceType, and TemplateParmType. In addition, cleaned up the display of existing types to be more C++-like. For example, instead of SubstTemplateTypeParmType: {Identifier (("T"))} => Record (25), {Identifier (("A"))} it now displays more readably as SubstTemplateTypeParmType: {typename T <= struct A} The <expand> sections still can be used for all the gory details if necessary. llvm-svn: 263638
* Print strict in Availability attribute when it is on.Manman Ren2016-03-101-0/+1
| | | | llvm-svn: 263172
* Add Visual Studio native visualizers for several Clang typesMike Spertus2016-03-081-14/+83
| | | | | | | | | | | | | | | | This is one of a series of changes to improve the MSVC visualization of Clang types. This one focuses on Record and SubstTemplateTypeParmType meaning that, for example, a TemplateArgumentLoc no longer displays incomprehensibly in the locals window as {Argument={DeclArg={Kind=1 QT=0x033acb00 D=0xcccccccc {DeclType=???}}... but instead much more usefully as Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))} Additional types and improvements will be made in subsequent commits llvm-svn: 262933
* P0188R1: add support for standard [[fallthrough]] attribute. This is almostRichard Smith2016-03-081-0/+2
| | | | | | | | | | | | | | exactly the same as clang's existing [[clang::fallthrough]] attribute, which has been updated to have the same semantics. The one significant difference is that [[fallthrough]] is ill-formed if it's not used immediately before a switch label (even when -Wimplicit-fallthrough is disabled). To support that, we now build a CFG of any function that uses a '[[fallthrough]];' statement to check. In passing, fix some bugs with our support for statement attributes -- in particular, diagnose their use on declarations, rather than asserting. llvm-svn: 262881
* Semantic analysis for the swiftcall calling convention.John McCall2016-03-031-1/+2
| | | | | | | I've tried to keep the infrastructure behind parameter ABI treatments fairly general. llvm-svn: 262587
* Add an llvm_unreachable back to the autogeneration of this covered switch.John McCall2016-03-011-1/+2
| | | | llvm-svn: 262288
* Infrastructure improvements to Clang attribute TableGen.John McCall2016-03-011-82/+198
| | | | | | This should make it easier to add new Attr subclasses. llvm-svn: 262275
* [cmake] Revert r260742 (and r260744) to improve order file support.Chandler Carruth2016-02-171-1/+2
| | | | | | | | | | This appears to be passing '-Wl,-order_file' to Linux link commands, which then causes the linker to silently, behind the scenes, write the output to 'rder_file' instead of somewhere else. Will work with Chris to figure out the proper support for this, but so far there are numerous people who can't get Clang to update when they build because of this. llvm-svn: 261054
* Fix a leak in the generated code for attributes with strings.Benjamin Kramer2016-02-131-4/+17
| | | | | | | | Storing std::strings in attributes simply doesn't work, we never call the destructor. Use an array of StringRefs instead of std::strings and copy the data into memory taken from the ASTContext. llvm-svn: 260831
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one. Original Patch Review: http://reviews.llvm.org/D16896 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. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16999 llvm-svn: 260742
* Revert "[CMake] Improve the clang order-file generation workflow"Chris Bieneman2016-02-051-1/+2
| | | | | | | | | | | | | This reverts commit r259862, and attempts to fix builder CMakeCaches. Will try this again some other time... Conflicts: CMakeLists.txt tools/driver/CMakeLists.txt llvm-svn: 259872
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 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. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16896 llvm-svn: 259862
* Add back the ABITest makefilesChris Bieneman2016-02-036-0/+272
| | | | | | These files are standalone and not integrated with CMake, so we probably want them. llvm-svn: 259667
* No need to use utostr when putting integers into a raw_ostream. NFCCraig Topper2016-01-311-5/+5
| | | | llvm-svn: 259310
* Remove autoconf supportChris Bieneman2016-01-268-313/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* [analyzer] SATestBuild.py: Remove html and log when producing reference results.Devin Coughlin2016-01-231-7/+29
| | | | | | | | | | | The html reports are huge -- every issue in a given file results in a separate copy of the source code, in HTML form, for the file. This gets very large quickly and it doesn't make sense to check this into a reference repository. Also remove the log when generating reference results because it can leak absolute path names. We still keep both the html and the log around when producing non-reference results. llvm-svn: 258594
* [analyzer] SATestBuild.py: Handle spaces in path passed to --use-analyzer.Devin Coughlin2016-01-221-2/+2
| | | | | | I missed this one in r258493. llvm-svn: 258517
* [analyzer] Update SATestBuild.py to handle spaces in paths.Devin Coughlin2016-01-221-10/+10
| | | | | | | The Jenkins workspace on the new Green Dragon builder for the static analyzer has spaces in its path. llvm-svn: 258493
* [TableGen] Merge the SuperClass Record and SMRange vector a single vector. ↵Craig Topper2016-01-183-18/+17
| | | | | | This removes the state needed to manage the extract vector. NFC llvm-svn: 258066
* [CMake] Fix bots broken by including order file generation in check-allChris Bieneman2016-01-151-0/+4
| | | | llvm-svn: 257948
* [CMake] [Order-files] Use print_function as an attempt at being forward ↵Chris Bieneman2016-01-151-17/+19
| | | | | | | | compatible. Based on feedback from bogner. llvm-svn: 257936
* [CMake] Support generation of linker order files using dtraceChris Bieneman2016-01-154-22/+408
| | | | | | | | | | | | | | | | | | | Summary: This patch extends the lit-based perf-training tooling supplied for PGO data generation to also generate linker order files using dtrace. This patch should work on any system that has dtrace. If CMake can find the dtrace tool it will generate a target 'generate-order-file' which will run the per-training tests wrapped by dtrace to capture function entries. There are several algorithms implemented for sorting the order files which can be experimented with for best performance. The dtrace wrapper also supports bot oneshot and pid probes. The perf-helper.py changes to support order file construction are ported from internal changes by ddunbar; he gets all the credit for the hard work here, I just copy and pasted. Note: I've tested these patches on FreeBSD and OS X 10.10. Reviewers: ddunbar, bogner, silvas Subscribers: llvm-commits, emaste Differential Revision: http://reviews.llvm.org/D16134 llvm-svn: 257934
* [TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects ↵Craig Topper2016-01-041-0/+3
| | | | | | in the support library will be deleted. llvm-svn: 256731
OpenPOWER on IntegriCloud