summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash-on-invalid if a :: is followed by two or more open parentheses ↵Richard Smith2015-12-192-5/+14
| | | | | | (and then something else). llvm-svn: 256080
* Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.Paul Robinson2015-12-195-0/+31
| | | | | | | | | Reapplies r256063, except instead of frugally re-using an LLVM enum, we define a Clang enum, to avoid exposing too much LLVM interface. Differential Revision: http://reviews.llvm.org/D15650 llvm-svn: 256078
* Use a command line alias to remove the need to rewrite a subtargetEric Christopher2015-12-192-10/+4
| | | | | | feature for command line compatibility. llvm-svn: 256076
* [CMake] Fixing a typo in a flagChris Bieneman2015-12-191-1/+1
| | | | | | Turns out cc1's flag has 1 - not 2... llvm-svn: 256070
* [CMake] Support a simple case for bootstrap builds to generate PGO dataChris Bieneman2015-12-194-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler. With this patch applied you can configure your build directory with the following invocation of CMake: cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir> After configuration the following additional targets will be generated: stage2-instrumented: Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler. stage2-instrumented-generate-profdata: Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training stage2: Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler. stage2-check-llvm: Depends on stage2 and runs check-llvm using the stage3 compiler. stage2-check-clang: Depends on stage2 and runs check-clang using the stage3 compiler. stage2-check-all: Depends on stage2 and runs check-all using the stage3 compiler. stage2-test-suite: Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite). Reviewers: bogner, silvas, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15584 llvm-svn: 256069
* Revert r256063, it's killing clang-tools-extraPaul Robinson2015-12-195-14/+0
| | | | llvm-svn: 256066
* CC1 part of debugger tuning; pass through setting from driver to LLVM.Paul Robinson2015-12-185-0/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D15650 llvm-svn: 256063
* [CMake] PGO training dataChris Bieneman2015-12-181-0/+2
| | | | | | Adding in a few more lit substitutions for cc1 and the test exec path. llvm-svn: 256057
* Fix invalid enum comparison.Zachary Turner2015-12-181-1/+1
| | | | llvm-svn: 256055
* Split RequireCompleteType into a function that actually requires that the typeRichard Smith2015-12-1817-126/+106
| | | | | | | | | | | | | | | | | | | is complete (with an error produced if not) and a function that merely queries whether the type is complete. Either way we'll trigger instantiation if necessary, but only the former will diagnose and recover from missing module imports. The intent of this change is to prevent a class of bugs where code would call RequireCompleteType(..., 0) and then ignore the result. With modules, we must check the return value and use it to determine whether the definition of the type is visible. This also fixes a debug info quality issue: calls to isCompleteType do not trigger the emission of debug information for a type in limited-debug-info mode. This allows us to avoid emitting debug information for type definitions in more cases where we believe it is safe to do so. llvm-svn: 256049
* Support AlwaysBreakAfterReturnTypeZachary Turner2015-12-187-26/+190
| | | | | | | | | | | This changes the behavior of AlwaysBreakAfterDeclarationReturnType so that it supports breaking after declarations, definitions, or both. Differential Revision: http://reviews.llvm.org/D10370 Reviewed By: Daniel Jasper llvm-svn: 256046
* [modules] Don't try to use the definition of a class ifRichard Smith2015-12-188-106/+126
| | | | | | | RequireCompleteType(..., 0) says we're not permitted to do so. The definition might not be visible, even though we know what it is. llvm-svn: 256045
* Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType callRichard Smith2015-12-1810-93/+108
| | | | | | | | for the derived class into it. This is mostly just a cleanup, but could in principle be a bugfix if there is some codepath that reaches here and didn't previously require a complete type (I couldn't find any such codepath, though). llvm-svn: 256037
* PIC should not be enabled by default on Darwin with -static.Bob Wilson2015-12-182-1/+4
| | | | | | | | | | | r245667 changed -static so that it doesn't override an explicit -fPIC option, but -static should still change the default for Darwin for -fno-PIC. This matches longstanding GCC and Clang behavior on Darwin and changing it would be disruptive, with no significant benefit. http://reviews.llvm.org/D15455 rdar://problem/23811045 llvm-svn: 256026
* Fix an unused variable warning from r256012.Chad Rosier2015-12-181-1/+1
| | | | llvm-svn: 256023
* Add a defensive check for a nullptr.Adrian Prantl2015-12-181-5/+7
| | | | llvm-svn: 256012
* Replace SM.getFileEntryForID(Lexer->getFileID()) with Lexer->getFileEntry().Yaron Keren2015-12-182-7/+4
| | | | llvm-svn: 255993
* [OPENMP] Remove explicit call for implicit barrierAlexey Bataev2015-12-1816-88/+1
| | | | | | | #pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread. Differential Revision: http://reviews.llvm.org/D15561 llvm-svn: 255992
* [OPENMP] Fix for http://llvm.org/PR25878: Error compiling an OpenMP programAlexey Bataev2015-12-184-6/+124
| | | | | | OpenMP codegen tried to emit the code for its constructs even if it was detected as a dead-code. Added checks to ensure that the code is emitted if the code is not dead. llvm-svn: 255990
* [OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' ↵Alexey Bataev2015-12-1813-41/+178
| | | | | | | | directive. OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct. llvm-svn: 255986
* ObjC properties: consider ownership of properties from protocols when ↵Douglas Gregor2015-12-182-0/+23
| | | | | | | | | | synthesizing. When determining whether ownership was explicitly written for a property when it is being synthesized, also consider that the original property might have come from a protocol. Fixes rdar://problem/23931441. llvm-svn: 255943
* Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.Richard Trieu2015-12-171-0/+7
| | | | llvm-svn: 255937
* [CUDA] runtime wrapper header tweaksArtem Belevich2015-12-171-3/+24
| | | | | | | | * Pull in host-only implementations of few CUDA-specific math functions. * #nclude <cmath> early to prevent its inclusion from CUDA headers after they've messed with __THROW macro. llvm-svn: 255933
* Fix r255875, use '<' instead of '==' for 'operator<'Richard Trieu2015-12-171-1/+1
| | | | | | | Aaron Ballman pointed out a typo from the copy and paste in r255875. This will preserve the strict weak ordering when comparing DynTypedNode. llvm-svn: 255929
* Attach maximum function count to Module when using PGO mode.Easwaran Raman2015-12-173-2/+55
| | | | | | | | This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information. Differential Revision: http://reviews.llvm.org/D15163 llvm-svn: 255918
* [x86] Filecheck is case sensitive. Capitalize directives.Chad Rosier2015-12-171-4/+4
| | | | llvm-svn: 255916
* [x86] Filecheck is case sensitive. Capitalize directives.Chad Rosier2015-12-171-48/+48
| | | | llvm-svn: 255915
* [CUDA] Make vtable construction aware of host/device side of CUDA compilation.Artem Belevich2015-12-173-0/+94
| | | | | | | | | | | | | | | | | | | C++ emits vtables for classes that have key function present in the current TU. While we compile CUDA the fact that key function was found in this TU does not mean that we are going to generate code for it. E.g. vtable for a class with host-only methods should not (and can not) be generated on device side, because we'll never generate code for them during device-side compilation. This patch adds an extra CUDA-specific check during key method computation and filters out potential key methods that are not suitable for this side of CUDA compilation. When we codegen vtable, entries for unsuitable methods are set to null. Differential Revision: http://reviews.llvm.org/D15309 llvm-svn: 255911
* [ms-inline-asm] Add support for composite structs in MS inline asmMarina Yatsina2015-12-172-27/+59
| | | | | | | | Add MS inline asm support for structs that contain fields that are also structs. Differential Revision: http://reviews.llvm.org/D15578 llvm-svn: 255890
* [OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && ↵Alexey Bataev2015-12-172-0/+24
| | | | | | | | "queried property of class with no definition", file AST/DeclCXX.h Added processing for template specialization during data-sharing attributes analysis llvm-svn: 255879
* Add QualType case to operator< for DynTypedNode.Richard Trieu2015-12-171-0/+4
| | | | | | | This allows sorting DynTypedNode's which are QualType's since QualType does not have memoization. llvm-svn: 255875
* [TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.Manman Ren2015-12-175-27/+43
| | | | | | | | Also set nounwind attribute. rdar://problem/9001553 llvm-svn: 255860
* [analyzer] Better detect when C++ object was constructed into existing region.Devin Coughlin2015-12-175-38/+177
| | | | | | | | | | | | | | | | | | | | | | | | | When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for the current block to detect what region the object should be constructed into. If the constructor was directly constructed into a local variable or field region then there is no need to explicitly bind the constructed value to the local or field when analyzing the DeclStmt or CXXCtorInitializer that called the constructor. Unfortunately, there were situations in which the CXXConstructExpr was constructed into a temporary region but when evaluating the corresponding DeclStmt or CXXCtorInitializer the analyzer assumed the object was constructed into the local or field. This led to spurious warnings about uninitialized values (PR25777). To avoid these false positives, this commit factors out the logic for determining when a CXXConstructExpr will be directly constructed into existing storage, adds the inverse logic to detect when the corresponding later bind can be safely skipped, and adds assertions to make sure these two checks are in sync. rdar://problem/21947725 llvm-svn: 255859
* [WebAssembly] Initial linking support.Dan Gohman2015-12-164-2/+60
| | | | | | | | | This begins minimal support for invoking 'ld' from clang for WebAssembly targets. Differential Revision: http://reviews.llvm.org/D15586 llvm-svn: 255848
* Update for llvm api change.Rafael Espindola2015-12-161-2/+2
| | | | llvm-svn: 255843
* Fix funciton->function typo.Eric Christopher2015-12-163-4/+4
| | | | llvm-svn: 255840
* Update for llvm API change.Rafael Espindola2015-12-162-2/+0
| | | | llvm-svn: 255838
* Fix CFI tests in sanitizer-ld.Evgeniy Stepanov2015-12-161-9/+3
| | | | | | | This test is not testing what it is supposed to test because of a mixup with the CHECK lines. llvm-svn: 255827
* [PS4] Fix the unit test to be compatible with clang driver. NFCSumanth Gundapaneni2015-12-162-4/+4
| | | | | | | | | | ".exe" extension is inherently checked by llvm::fs::can_execute() This patch fixes the linker extension in clang driver and updates the unit test to accommodate the the check string on windows. Differential Revision:http://reviews.llvm.org/D15577 llvm-svn: 255814
* [CMake] Name the bootstrap stages stage[0-9]Chris Bieneman2015-12-161-17/+38
| | | | | | | | | | When you start chaining bootstrap stages the CMake-generated targets get unwieldy. This change supports naming the bootstrap targets and creating wrapper targets in the top-level build file. Without this patch the default target generated for a second stage build was "bootstrap" with it the target is "stage2". Also with some CMake goop setting CLANG_BOOTSTRAP_TARGETS, you can expose third stage targets as "stage3" instead of "bootstrap-bootstrap" llvm-svn: 255813
* Let -Wdelete-non-virtual-dtor mention final.Nico Weber2015-12-162-7/+8
| | | | llvm-svn: 255812
* Add -fsyntax-only to fix failure in read-only directories.Diego Novillo2015-12-161-1/+1
| | | | | | | | | Internally, this test is executed in a read-only directory, which causes it to fail because the driver tries to generate a file unnecessarily. Adding -fsyntax-only fixes the issue (thanks to Artem Belevich for figuring out the root cause). llvm-svn: 255809
* Fix the failing windows clang unit tests. NFCSumanth Gundapaneni2015-12-163-6/+7
| | | | | | | | | | Some tests are missing the {{(.exe)?}} suffix on the exectables which the FileCheck is grepping for. This will ensure, the lit tests are clean on windows Differential Revision: http://reviews.llvm.org/D15579 llvm-svn: 255804
* [CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.hArtem Belevich2015-12-164-14/+30
| | | | | | | | | | | | | | Currently it's easy to break CUDA compilation by passing "-isystem /path/to/cuda/include" to compiler which leads to compiler including real cuda_runtime.h from there instead of the wrapper we need. Renaming the wrapper ensures that we can include the wrapper regardless of user-specified include paths and files. Differential Revision: http://reviews.llvm.org/D15534 llvm-svn: 255802
* [CMake] If you're building compiler-rt, the bootstrap build should depend on it.Chris Bieneman2015-12-161-1/+5
| | | | | | Adding optional dependency for the bootstrap targets on compiler-rt. llvm-svn: 255801
* [CMake] Make CLANG_BOOTSTRAP_TARGETS overridableChris Bieneman2015-12-161-3/+4
| | | | | | This allows exposing a custom list of targets from the next stage build up. llvm-svn: 255799
* [CMake] ExternalProject for compiler-rt needs to depend on llvm-config and clangChris Bieneman2015-12-161-2/+1
| | | | | | The add_dependencies call on compiler-rt-configure adds llvm-config and clang to the phony target, but not to the actual configure custom command. We need the dependency bound to the custom command so that it can't be re-ordered by Ninja. llvm-svn: 255798
* [PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" toPaul Robinson2015-12-162-19/+40
| | | | | | | | | | the CC1 command line when enabling code coverage. Patch by Ying Yi! Differential Revision: http://reviews.llvm.org/D15222 llvm-svn: 255784
* Make matchers thread compatible, so we can pass them to different threads ↵Manuel Klimek2015-12-161-3/+4
| | | | | | and run them on multiple translation units in parallel. llvm-svn: 255773
* [x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko2015-12-162-0/+8
| | | | | | | | Exclusion of /usr/include and /usr/local/include headers paths for MCU target. Differential Revision: http://reviews.llvm.org/D14954 llvm-svn: 255766
OpenPOWER on IntegriCloud