summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert 241171, 241187, 241199 (32-bit SEH)."Reid Kleckner2015-07-079-235/+386
| | | | | | | | | | | This reverts commit r241244, but restricts SEH support to Win64. This way, Chromium builds will still fall back on TUs with SEH, and Clang developers can work on this incrementally upstream while patching this small predicate locally. It'll also make it easier to review small fixes. llvm-svn: 241533
* Remember to mark the target attribute as documented and clean up theEric Christopher2015-07-071-3/+2
| | | | | | Subjects line to avoid redundancy. llvm-svn: 241529
* [Driver] Use llvm::Triple methods to handle -EL and -EB.Benjamin Kramer2015-07-062-12/+15
| | | | | | Add a test for ppc64(le), which wasn't handled before. llvm-svn: 241528
* Update target attribute support for post-commit feedback.Eric Christopher2015-07-062-2/+2
| | | | | | | Use const auto rather than duplicating the type name and fix the error message when the attribute is applied to an incorrect entity. llvm-svn: 241526
* Handle arbitrary whitespace in the target attribute support.Eric Christopher2015-07-062-1/+8
| | | | | | | This allows us to deal a bit more gracefully with inclusions done by macros, token pasting, or just code layout/formatting. llvm-svn: 241525
* Add some basic documentation for the __attribute__((target(""))) support.Eric Christopher2015-07-061-0/+19
| | | | | | | | Describes the general syntax of how it's used with the unfortunate usage of "subtarget features" and some examples from the x86 port to help users. llvm-svn: 241524
* Refactor to avoid long if-condition.Richard Smith2015-07-061-8/+23
| | | | llvm-svn: 241518
* Debug info: Don't emit a bogus location for the global block pointer typeAdrian Prantl2015-07-062-5/+7
| | | | | | | | | | | (__block_literal_generic). The arbitrary nature of the location confuses lldb and prevents type uniquing. rdar://problem/21602473 llvm-svn: 241511
* Support -pthread in mingw toolchain.Yaron Keren2015-07-061-4/+2
| | | | | | "-pthread" appends -lpthread after the object files list passed to the linker. llvm-svn: 241485
* [Sema] Warn when shifting a negative value.Davide Italiano2015-07-064-5/+18
| | | | | | | | | | | | | | | Example: % ./clang -Wshift-negative-value emit.c emit.c:3:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value] int a = -1 << 3; ~~ ^ 1 warning generated. PR: 24026 Differential Revision: http://reviews.llvm.org/D10938 Reviewed by: rsmith llvm-svn: 241478
* Update testcase to reflect new behavior in DIBuilder.Adrian Prantl2015-07-061-2/+1
| | | | llvm-svn: 241471
* Resubmit "Pass down the -flto option to the -cc1 job" (r239481)Teresa Johnson2015-07-067-1/+52
| | | | | | | | | | | | | | | | | | The patch is the same except for the addition of a new test for the issue that required reverting the dependent llvm commit. --Original Commit Message-- Pass down the -flto option to the -cc1 job, and from there into the CodeGenOptions and onto the PassManagerBuilder. This enables gating the new EliminateAvailableExternally module pass on whether we are preparing for LTO. If we are preparing for LTO (e.g. a -flto -c compile), the new pass is not included as we want to preserve available externally functions for possible link time inlining. llvm-svn: 241467
* Grammar bug. NFCDouglas Katzman2015-07-061-1/+1
| | | | llvm-svn: 241451
* clang-format: [JS] Properly reset parse state after parsing interface.Daniel Jasper2015-07-062-1/+5
| | | | llvm-svn: 241446
* clang-format: [JS] Prevent confusing TypeScript parameters wraps.Daniel Jasper2015-07-062-1/+4
| | | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {} After: aaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {} llvm-svn: 241444
* clang-format: Fix __attribute__ being treated as decl name.Daniel Jasper2015-07-062-1/+7
| | | | | | | | | | | __attribute__ was treated as the name of a function definition, with the tokens in parentheses being the parameter list. This formats incorrectly with AlwaysBreakAfterDefinitionReturnType. Fix it by treating __attribute__ like decltype. Patch by Strager Neds, thank you. llvm-svn: 241439
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-0610-46/+44
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241433
* Teach mingw toolchain the msys2 mingw-w64 distribution C++ dirs.Yaron Keren2015-07-062-11/+18
| | | | llvm-svn: 241432
* [TableGen] Change a couple methods to return an ArrayRef instead of a const ↵Craig Topper2015-07-061-2/+2
| | | | | | std::vector reference. NFC llvm-svn: 241431
* [OPENMP 4.0] Codegen for 'omp cancel' directive.Alexey Bataev2015-07-064-17/+172
| | | | | | | | | | Add the next codegen for 'omp cancel' directive: if (__kmpc_cancel()) { __kmpc_cancel_barrier(); <exit construct>; } llvm-svn: 241429
* PR24030, PR24033: Consistently check whether a new declaration conflicts withRichard Smith2015-07-064-31/+169
| | | | | | | | | | an existing using shadow declaration if they define entities of the same kind in different namespaces. We'd previously check this consistently if the using-declaration came after the other declaration, but not if it came before. llvm-svn: 241428
* DR1909: Diagnose all invalid cases of a class member sharing its name with ↵Richard Smith2015-07-0611-40/+90
| | | | | | the class. llvm-svn: 241425
* When we see something that looks like a constructor with a return type, only ↵Richard Smith2015-07-065-15/+12
| | | | | | issue one error, not two. llvm-svn: 241424
* Mark clang/test/Modules/signal.m as REQUIRES:crash-recovery.NAKAMURA Takumi2015-07-051-1/+1
| | | | llvm-svn: 241421
* Document problems when trying libclang tests on Windows 7.Yaron Keren2015-07-051-1/+2
| | | | llvm-svn: 241407
* Add the missing return statements from revision 241399.Nemanja Ivanovic2015-07-051-2/+3
| | | | llvm-svn: 241405
* [CMake] clang-*.*: Prevent versioning if the buildhost is targeting for Win32.NAKAMURA Takumi2015-07-051-1/+5
| | | | | | | | | | | | | | CMake-2.8.12 is hardcoded to create symlinked clang.exe if the target property VERSION is present and the host is not Win32. Then clang.exe-*.* is generated and clang.exe is symlinked to it. lrwxrwxrwx. 1 bb bb 13 Jul 5 18:04 clang.exe -> clang.exe-3.7 -rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang++.exe -rwxr-x---. 1 bb bb 244763 Jul 5 18:04 clang.exe-3.7 It made me unhappy when built binaries were copied to the Windows target. FIXME: Could we just remove the target property VERSION in add_llvm_executable() ? llvm-svn: 241403
* clang/test/CodeGen/builtins-ppc-vsx.c: Fix for -Asserts.NAKAMURA Takumi2015-07-051-8/+8
| | | | llvm-svn: 241401
* Add missing builtins to altivec.h for ABI compliance (vol. 2)Nemanja Ivanovic2015-07-054-7/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D10875 The bulk of the second round of additions to altivec.h. The following interfaces were added: vector double vec_floor(vector double) vector double vec_madd(vector double, vector double, vector double) vector float vec_msub(vector float, vector float, vector float) vector double vec_msub(vector double, vector double, vector double) vector float vec_mul(vector float, vector float) vector double vec_mul(vector double, vector double) vector float vec_nmadd(vector float, vector float, vector float) vector double vec_nmadd(vector double, vector double, vector double) vector double vec_nmsub(vector double, vector double, vector double) vector double vec_nor(vector double, vector double) vector double vec_or(vector double, vector double) vector float vec_rint(vector float) vector double vec_rint(vector double) vector float vec_nearbyint(vector float) vector double vec_nearbyint(vector double) vector float vec_sqrt(vector float) vector double vec_sqrt(vector double) vector double vec_rsqrte(vector double) vector double vec_sel(vector double, vector double, vector unsigned long long) vector double vec_sel(vector double, vector double, vector unsigned long long) vector double vec_sub(vector double, vector double) vector double vec_trunc(vector double) vector double vec_xor(vector double, vector double) vector double vec_xor(vector double, vector bool long long) vector double vec_xor(vector bool long long, vector double) New VSX paths for the following interfaces: vector float vec_madd(vector float, vector float, vector float) vector float vec_nmsub(vector float, vector float, vector float) vector float vec_rsqrte(vector float) vector float vec_trunc(vector float) vector float vec_floor(vector float) llvm-svn: 241399
* clang-format: Add MacroBlock{Begin,End} optionsBirunthan Mohanathas2015-07-036-10/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MacroBlockBegin and MacroBlockEnd options make matching macro identifiers behave like '{' and '}', respectively, in terms of indentation. Mozilla code, for example, uses several macros that begin and end a scope. Previously, Clang-Format removed the indentation resulting in: MACRO_BEGIN(...) MACRO_ENTRY(...) MACRO_ENTRY(...) MACRO_END Now, using the options MacroBlockBegin: "^[A-Z_]+_BEGIN$" MacroBlockEnd: "^[A-Z_]+_END$" will yield the expected result: MACRO_BEGIN(...) MACRO_ENTRY(...) MACRO_ENTRY(...) MACRO_END Differential Revision: http://reviews.llvm.org/D10840 llvm-svn: 241363
* Revert "Refactored ARMTargetInfo in order to use the API of ↵Renato Golin2015-07-031-78/+118
| | | | | | | | llvm/lib/Support/TargetParser.cpp This reverts commit r241343, as it was, again, breaking all ARM buildbots. llvm-svn: 241362
* StmtIterator: Put stmt and decl group pointer into a union.Benjamin Kramer2015-07-032-6/+8
| | | | | | Reduce the size of StmtIterator without changing behavior. llvm-svn: 241356
* Rewrite users of Stmt::child_begin/end into for-range loops.Benjamin Kramer2015-07-0316-84/+61
| | | | | | No functionality change intended. llvm-svn: 241355
* - Refactored ARMTargetInfo in order to use the API of ↵Alexandros Lamprineas2015-07-031-118/+78
| | | | | | | | | | | llvm/lib/Support/TargetParser.cpp for extracting target specific information. - Patch for commit 241267: ShouldUseInlineAtomic was set incorrectly when subArch was not specified, causing regressions. Change-Id: Iabb35d59722f4972f1a3ab4365880add5bbcfdcc llvm-svn: 241343
* clang-format: [JS] Allow line breaks after TypeScript type colons.Daniel Jasper2015-07-032-0/+4
| | | | llvm-svn: 241339
* clang-format: [Java/JS] Properly support instanceof and its precedence.Daniel Jasper2015-07-032-2/+9
| | | | llvm-svn: 241337
* [OPENMP 4.0] Fixed codegen for 'cancellation point' construct.Alexey Bataev2015-07-0317-145/+230
| | | | | | | | | | Generate the next code for 'cancellation point': if (__kmpc_cancellationpoint()) { __kmpc_cancel_barrier(); <exit construct>; } llvm-svn: 241336
* Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but ↵Yaron Keren2015-07-037-18/+20
| | | | | | now fails the bots. llvm-svn: 241335
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-037-20/+18
| | | | | | | | and std::move to avoid implicit std::string construction. Patch by Eugene Kosov. llvm-svn: 241330
* clang/test/CodeGenCXX/trap-fnattr.cpp: Tweak to match MS-mangled names.NAKAMURA Takumi2015-07-031-6/+6
| | | | llvm-svn: 241328
* Driver: Replace a couple of out of date terms in the docsJustin Bogner2015-07-031-3/+3
| | | | | | | | The Job base class was removed in r241310, so replace a couple of references to it with Command. Also change another use of Job with Action, since that's the term used in the source. llvm-svn: 241327
* Revert r241319, investigating.Yaron Keren2015-07-037-18/+20
| | | | llvm-svn: 241321
* Replace some const std::string & with llvm::StringRef or std::stringYaron Keren2015-07-037-20/+18
| | | | | | | | | | and std::move to avoid implicit std::string construction. Part 1/2. Patch by Eugene Kosov. llvm-svn: 241319
* Make corrections to r241314.Akira Hatanaka2015-07-031-4/+4
| | | | | | The return type of a function follows the signext attribute. llvm-svn: 241315
* Fix test case to appease buildbot.Akira Hatanaka2015-07-031-4/+4
| | | | | | | | | Test case trap-fnattr.cpp was failng on clang-ppc64-elf-linux2 because ppc64 sign-extends the i32 return value. This is a follow-up to r241306. llvm-svn: 241314
* Driver: Remove the Job class. NFCJustin Bogner2015-07-027-96/+34
| | | | | | | | | | | We had a strange relationship here where we made a list of Jobs inherit from a single Job, but there weren't actually any places where this arbitrary nesting was used or needed. Simplify all of this by removing Job entirely and updating all of the users to either work with a JobList or a single Command. llvm-svn: 241310
* Driver: Don't use reserved names. NFCJustin Bogner2015-07-022-9/+7
| | | | llvm-svn: 241309
* Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.Akira Hatanaka2015-07-027-13/+62
| | | | | | | | | | | This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function name on a per-call-site basis. rdar://problem/21225723 Differential Revision: http://reviews.llvm.org/D10831 llvm-svn: 241306
* Switch users of the 'for (StmtRange range = stmt->children(); range; ↵Benjamin Kramer2015-07-0229-148/+134
| | | | | | | | | ++range)‘ pattern to range for loops. The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obscure. No functionality change intended. llvm-svn: 241300
* [CodeGen] Use llvm::join to simplify string joining.Benjamin Kramer2015-07-021-8/+2
| | | | | | | While there replace stable_sort of std::string with just sort, stability is not necessary for "simple" value types. No functional change intended. llvm-svn: 241299
OpenPOWER on IntegriCloud