summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* use auto for obvious type; NFCSanjay Patel2015-12-241-1/+1
| | | | llvm-svn: 256393
* [X86][ms-inline asm] Test case for adding support for memory operands that ↵Marina Yatsina2015-12-241-0/+32
| | | | | | | | | | include structs Test case for commit 256381 Differential Revision: http://reviews.llvm.org/D15749 llvm-svn: 256382
* Replace llvm::utostr calls in Twine context with Twines. NFC.Benjamin Kramer2015-12-242-3/+3
| | | | llvm-svn: 256377
* [TrailingObjects] Convert ASTTemplateKWAndArgsInfo and ↵James Y Knight2015-12-2411-293/+191
| | | | | | | | | | | | | | | | | | | ASTTemplateArgumentListInfo. Doing so required separating them so that the former doesn't inherit from the latter anymore. Investigating that, it became clear that the inheritance wasn't actually providing real value in any case. So also: - Remove a bunch of redundant functions (getExplicitTemplateArgs, getOptionalExplicitTemplateArgs) on various Expr subclasses which depended on the inheritance relationship. - Switched external callers to use pre-existing accessors that return the data they're actually interested in (getTemplateArgs, getNumTemplateArgs, etc). - Switched internal callers to use pre-existing getTemplateKWAndArgsInfo. llvm-svn: 256359
* [StaticAnalyzer] Use front() and back() instead of dereferencing begin() and ↵Craig Topper2015-12-242-6/+6
| | | | | | rbegin(). Makes the code a little cleaner. NFC llvm-svn: 256358
* Replace isa+cast with dyn_cast and obey the no else after return rule.Yaron Keren2015-12-231-6/+2
| | | | llvm-svn: 256349
* clang-format: Lower penalty for breaking between array subscripts.Daniel Jasper2015-12-232-1/+3
| | | | | | | | | | | | Before: aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaa(aaaaaaaaaaaa)][bbbbbbbbbbb( bbbbbbbbbbbb)] After: aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaa(aaaaaaaaaaaa)] [bbbbbbbbbbb(bbbbbbbbbbbb)] llvm-svn: 256343
* clang-format: Fix incorrect pointer detection.Daniel Jasper2015-12-232-1/+2
| | | | | | | | | | Before: return * this += 1; After: return *this += 1; llvm-svn: 256342
* [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.Alexey Bataev2015-12-238-70/+262
| | | | | | OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause. llvm-svn: 256330
* [Sema] Make an enum local to the only method that uses it. NFCCraig Topper2015-12-231-7/+5
| | | | llvm-svn: 256319
* [Sema] Use available enum types instead of integers. As one is used in a ↵Craig Topper2015-12-231-3/+2
| | | | | | switch, this makes the compiler ensure the switch is fully covered. NFC llvm-svn: 256318
* Disable include sorting by default for Chromium style.Nico Weber2015-12-221-0/+1
| | | | | | | | | | | Include sorting generally can break .cc files, especially on Windows. Make this opt-in for Chromium style to give us some more time to roll this out. (Given that the Google style guide is used by many companies, some of them probably writing code on Windows, one could argue this should be opt-in in general...) llvm-svn: 256288
* Document that we recommend to turn off -gmodules when building a staticAdrian Prantl2015-12-221-1/+6
| | | | | | library for distribution to other machines on the clang man page. llvm-svn: 256287
* Make wasm-toolchain.c test pass on Windows.Nico Weber2015-12-221-1/+1
| | | | llvm-svn: 256286
* [ASTMatchers] Fix typo in booleanType() doc.Samuel Benzaquen2015-12-222-1/+23
| | | | | | | Fix typo in booleanType() doc and recreate the LibASTMatchersReference.html reference document. llvm-svn: 256284
* [ASTMatchers] Add booleanType() matcher.Samuel Benzaquen2015-12-223-0/+20
| | | | llvm-svn: 256278
* clang-format: [JS] Support arrays of object-type literals.Daniel Jasper2015-12-222-1/+6
| | | | | | | | | | | | | | | Before: interface I { o: {} []; } After: interface I { o: {}[]; } llvm-svn: 256247
* clang-format: [JS] Conservatively introduce column layout for JS arrayDaniel Jasper2015-12-222-4/+23
| | | | | | | | initializers. For now, only use it for 20 items or more. Otherwise, clang-format formats these one-per-line and thus increases the vertical code size a lot. llvm-svn: 256246
* clang-format: [JS] "operator" is not a keyword in Java/JavaScript.Daniel Jasper2015-12-223-2/+10
| | | | llvm-svn: 256245
* [OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointerAnastasia Stulova2015-12-223-5/+28
| | | | | | | | | | | If there are two pointers passed to an atomic Builtin, Clang doesn't allow the second (non-atomic) one to be qualified with an address space. Remove this restriction by recording the address space of passed pointers in atomics type diagnostics. llvm-svn: 256243
* [mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.Daniel Sanders2015-12-222-0/+20
| | | | | | | This fixes the 'pure virtual function called' failure with ThreadPool in a clang-built clang. This fixes the llvm-mips-linux builder. llvm-svn: 256240
* [OPENMP] Revert r256238 to fix the problem with tests on Linux.Alexey Bataev2015-12-228-250/+55
| | | | llvm-svn: 256239
* [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.Alexey Bataev2015-12-228-55/+250
| | | | | | OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause. llvm-svn: 256238
* Pull out a bunch of duplicated option handling code into its ownEric Christopher2015-12-221-41/+24
| | | | | | function and use for the targets that can easily support it. llvm-svn: 256230
* Use -no-canonical-prefixes to make sure binaries names are easier to match.Eric Christopher2015-12-221-1/+1
| | | | llvm-svn: 256228
* [WebAssembly] Remove the -target command-line flag from the ld commandline.Dan Gohman2015-12-212-2/+3
| | | | | | | | This flag isn't needed, or permitted, with the "ld" flavor of lld. Also, add a basic ld commandline test. llvm-svn: 256216
* [clang-cl] Add support for /BreproDavid Majnemer2015-12-219-3/+61
| | | | | | | | | | | | The /Brepro flag controls whether or not the compiler should embed timestamps into the object file. Object files which do not embed timestamps are not suitable for incremental linking but are suitable for hermetic build systems and staged self-hosts of clang. A normal clang spelling of this flag has been added, -mincremental-linker-compatible. llvm-svn: 256204
* Tweak myriad-toolchain test.James Y Knight2015-12-211-2/+2
| | | | | | | The test failed when run on a SPARC host, since it was finding the native gcc installation by accident. llvm-svn: 256191
* Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure"Vedant Kumar2015-12-213-0/+20
| | | | | | | | | | | | | | | | | | | When using blocks, a byref structure is created to represent the closure. The "byref.layout" field of this structure is an i8*. However, some 'inline' layouts are represented as i64's, not i8*'s. Prior to r246985 we cast the i64 'inline' layout to an i8* before assigning it into the byref structure. This patch brings the cast back and adds a regression test. The original version of this patch was too invasive. This version only adds the cast to BuildByrefLayout. Differential Revision: http://reviews.llvm.org/D15674 rdar://23713871 llvm-svn: 256190
* Revert "[CodeGen] Fix assignments of inline layouts into the byref structure"Vedant Kumar2015-12-213-20/+1
| | | | | | This reverts commit r256185. It breaks CodeGenObjC/fragile-arc.m. llvm-svn: 256186
* [CodeGen] Fix assignments of inline layouts into the byref structureVedant Kumar2015-12-213-1/+20
| | | | | | | | | | | | | | When using blocks, a byref structure is created to represent the closure. The "byref.layout" field of this structure is an i8*. However, some 'inline' layouts are represented as i64's, not i8*'s. Prior to r246985 we cast the i64 'inline' layout to an i8* before assigning it into the byref structure. This patch brings the cast back and adds a regression test. rdar://23713871 llvm-svn: 256185
* clang-format: Properly set the BlockKind for more blocks.Daniel Jasper2015-12-212-2/+10
| | | | | | | | | | | | | | | Before: void f() { struct Dummy { }; f(); } After: void f() { struct Dummy {}; f(); } llvm-svn: 256175
* clang-format: Only consider the first #include that looks right to beDaniel Jasper2015-12-212-3/+17
| | | | | | the main #include. llvm-svn: 256170
* clang-format: [JS] Change Google-style default for aligning operands.Daniel Jasper2015-12-212-8/+9
| | | | | | The style guide allows both, but apparently, this is the more dominant use. llvm-svn: 256154
* clang-format: Only try to find the "main" include in the first block ofDaniel Jasper2015-12-212-1/+17
| | | | | | includes. llvm-svn: 256153
* [scan-view] replace deprecated optparse with argparseAlexander Kornienko2015-12-211-45/+48
| | | | | | | | | | | | | | Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8 Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna Subscribers: cfe-commits Patch by Kirill Bobyrev! Differential Revision: http://reviews.llvm.org/D15370 llvm-svn: 256150
* clang-format: Extend detection of the "main" #include to use the filenameDaniel Jasper2015-12-212-23/+41
| | | | | | | | | | | Before, the first (non-system) header in a file was considered to be the main include. This is conservative as it makes clang-format change the #include order less often. Instead implement some basic usage of the filename itself. With this patch, clang-format considers every header to be a main include if the header file's basename is a prefix to the filename the #include is in. llvm-svn: 256148
* [Driver] Pass -O* to the gold plugin via -plugin-optJames Molloy2015-12-212-3/+19
| | | | | | The gold plugin understands -O0..-O3, but these are not currently being passed to it. llvm-svn: 256146
* [Sema] Use range-based for loops. NFCCraig Topper2015-12-211-56/+39
| | | | llvm-svn: 256135
* [Cygwin] Enable TLS as emutls.NAKAMURA Takumi2015-12-214-5/+0
| | | | | | | | It resolves clang selfhosting with std::once() for Cygwin. FIXME: It may be EmulatedTLS-generic also for X86-Android. FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls. llvm-svn: 256134
* [X86] Add missing m64/int64 conversionsMichael Kuperstein2015-12-202-0/+14
| | | | | | | | Define the 64-bit equivalents of _m_to_int and _m_from_int. Differential Revision: http://reviews.llvm.org/D15572 llvm-svn: 256122
* [X86] Add signed aliases for popcnt intrinsicsMichael Kuperstein2015-12-202-2/+24
| | | | | | | | | The Intel manual documents both an unsigned form (_mm_popcnt_u32) and a signed form (_popcnt32) of the intrinsic. Add the missing signed form. Differential Revision: http://reviews.llvm.org/D15568 llvm-svn: 256121
* Driver part of debugger tuning.Paul Robinson2015-12-197-42/+153
| | | | | | | | | | | | | | | | Adds driver options named -glldb and -gsce to mean -g plus tuning for lldb and SCE debuggers respectively; the existing -ggdb option does the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into -ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The tuning gets a target-specific default in the driver, and is passed into cc1 with the new -debugger-tuning option. As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part on Linux. Differential Revision: http://reviews.llvm.org/D15651 llvm-svn: 256104
* Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"Chris Bieneman2015-12-194-62/+8
| | | | | | | This reverts commit r256069, which was an unintentional tag along on another commit. llvm-svn: 256088
* Test for diagnostic quality improvement in r256049.Richard Smith2015-12-191-0/+7
| | | | llvm-svn: 256083
* 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
OpenPOWER on IntegriCloud