summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* 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
* clang-format: Extend header sort category implementation.Daniel Jasper2015-12-163-8/+18
| | | | | | | | | | Specifically, it is sometimes necessary to keep certain #includes as the first #include, even before the main #include for a .cc file. Switching the category to be signed instead of unsigned isn't ideal, but it seems as good of an option as any and is fully backwards compatible. llvm-svn: 255757
* [Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() isAkira Hatanaka2015-12-162-1/+17
| | | | | | | | | | | | | | called on an empty list. This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return nullptr if it sees an invalid type parameter (e.g., __kindof) in the type parameter list. rdar://problem/23068920 Differential Revision: http://reviews.llvm.org/D15463 llvm-svn: 255754
* [CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter ↵Craig Topper2015-12-161-18/+14
| | | | | | types in EmitCompare to eliminate some later explicit casts. NFC. llvm-svn: 255753
* Print qualified display names when emitting CodeViewReid Kleckner2015-12-166-23/+115
| | | | | | This is what debuggers expect. Words towards fixing PR21528. llvm-svn: 255744
* [CMake] Add support for generating profdata for clang from training filesChris Bieneman2015-12-167-0/+151
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for using LIT to drive generating PGO profile data for clang. This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata. Future opportunities for extension: * Support for Build->Profile->Build bootstrapping * Support for linker order file generation using a similar mechanism and the same training data * Support for Windows Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15462 llvm-svn: 255740
* [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).Evgeniy Stepanov2015-12-164-3/+10
| | | | | | | Split the CFI runtime in two: cfi and cfi_diag. The latter includes UBSan runtime to allow printing diagnostics. llvm-svn: 255736
* Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-163-24/+34
| | | | | | | | 32bit" I forgot to initialize RecoverFP. llvm-svn: 255731
* Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as ↵Reid Kleckner2015-12-163-29/+20
| | | | | | | | 32bit" This reverts commit r255710. llvm-svn: 255728
* Fix grammar.Richard Smith2015-12-161-1/+2
| | | | llvm-svn: 255727
* Update our claims about GCC's diagnostics quality to reflect recent ↵Richard Smith2015-12-161-6/+6
| | | | | | improvements to GCC. llvm-svn: 255726
* These days, GCC has at least minimal documentation for its VLAIS extension.Richard Smith2015-12-161-2/+2
| | | | llvm-svn: 255723
* Relax checks in cfi-cross-dso test.Evgeniy Stepanov2015-12-151-2/+2
| | | | | | The test is failing with unnamed labels. llvm-svn: 255712
* [SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bitReid Kleckner2015-12-153-20/+29
| | | | llvm-svn: 255710
OpenPOWER on IntegriCloud