summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Fix a #include cycle when building a module for our builtin headers.Richard Smith2015-05-142-0/+14
| | | | | | | | | | xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break this cycle for a modules build, and instead make the xmmintrin.h module re-export the immintrin.h module. Also included is a fix for an assert in the serialization code if a module exports another module that was declared later in the same module map. llvm-svn: 237321
* Break \# in a depfile the same way as gcc.Paul Robinson2015-05-131-3/+4
| | | | | | | | Backslash followed by # in a filename should have both characters escaped, if you do it the way GNU Make wants. GCC doesn't, so we do it the way GCC does rather than the way GNU Make wants. llvm-svn: 237304
* Make GNUInline consistent with whether we use traditional GNU inline semantics.Peter Collingbourne2015-05-132-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were setting LangOptions::GNUInline (which controls whether we use traditional GNU inline semantics) if the language did not have the C99 feature flag set. The trouble with this is that C++ family languages also do not have that flag set, so we ended up setting this flag in C++ modes (and working around it in a few places downstream by also checking CPlusPlus). The fix is to check whether the C89 flag is set for the target language, rather than whether the C99 flag is cleared. This also lets us remove most CPlusPlus checks. We continue to test CPlusPlus when deciding whether to pre-define the __GNUC_GNU_INLINE__ macro for consistency with GCC. There is a change in semantics in two other places where we weren't checking both CPlusPlus and GNUInline (FunctionDecl::doesDeclarationForceExternallyVisibleDefinition and FunctionDecl::isInlineDefinitionExternallyVisible), but this change seems to put us back into line with GCC's semantics (test case: test/CodeGen/inline.c). While at it, forbid -fgnu89-inline in C++ modes, as GCC doesn't support it, it didn't have any effect before, and supporting it just makes things more complicated. Differential Revision: http://reviews.llvm.org/D9333 llvm-svn: 237299
* Fix dependency file escaping.Paul Robinson2015-05-131-0/+8
| | | | | | | | | | | | | | When writing a dependency (.d) file, if space or # is immediately preceded by one or more backslashes, escape the backslashes as well as the space or # character. Otherwise leave backslash alone. This straddles the fence between BSD Make (which does no escaping at all, and does not support space or # in filespecs) and GNU Make (which does support escaping, but will fall back to the filespec as-written if the escaping doesn't match an existing file). Differential Revision: http://reviews.llvm.org/D9208 llvm-svn: 237296
* [OPENMP] Fixed codegen for firstprivate variables, also marked as lastprivate.Alexey Bataev2015-05-131-0/+38
| | | | | | In some rare cases shared copies of lastprivate/firstprivate variables were not updated after the loop directive. llvm-svn: 237243
* Have '__have_extension(cxx_variadic_templates)' return true for any C++ ↵Eric Fiselier2015-05-121-0/+5
| | | | | | standard. llvm-svn: 237202
* Add a new error for unexpected semi-colon before closing delimiter.Richard Trieu2015-05-122-3/+17
| | | | | | | | | Previously, if a semi-colon is unexpectedly added before a closing ')', ']' or '}', two errors and one note would emitted, and the parsing would get confused to which scope it was in. This change consumes the semi-colon, recovers parsing better, and emits only one error with a fix-it. llvm-svn: 237192
* InstrProf: Update name of compiler-rt routine for setting filenameJustin Bogner2015-05-121-2/+2
| | | | | | Patch by Teresa Johnson. llvm-svn: 237187
* Fixed double-free in case of module loading error.Artem Belevich2015-05-121-0/+5
| | | | | | | | | | | | | GetOutputStream() owns the stream it returns pointer to and the pointer should never be freed by us. When we fail to load and exit early, unique_ptr still holds the pointer and frees it which leads to compiler crash when CompilerInstance attempts to free it again. Added regression test for failed bitcode linking. Differential Revision: http://reviews.llvm.org/D9625 llvm-svn: 237159
* Changed renaming of local symbols by inserting a dot vefore the numeric suffixSunil Srivastava2015-05-1235-82/+82
| | | | | | | details in http://reviews.llvm.org/D9483 goes with llvm checkin r237150 llvm-svn: 237151
* [OPENMP] Allow using of threadprivate variables as loop-control variables in ↵Alexey Bataev2015-05-125-12/+6
| | | | | | lop based directives. llvm-svn: 237102
* [OPENMP] Fixed support for 'schedule' clause with non-constant chunk size.Alexey Bataev2015-05-121-1/+25
| | | | | | 'schedule' clause for combined directives requires additional processing. Special helper variable is generated, that is captured in the outlined parallel region for 'parallel for' region. This captured variable is used to store chunk expression from the 'schedule' clause in this 'parallel for' region. llvm-svn: 237100
* Driver: Fix a -Wshadow issue from r237091Justin Bogner2015-05-121-0/+8
| | | | | | | | | | The MachO toolchain has an isTargetIOSBased method, but it isn't virtual so it isn't very meaningful to call it. After thinking about this, I guess that putting this logic in the MachO class is a bit of a layering violation anyway. Do this more like how we handle AddLinkRuntimeLibArgs instead. llvm-svn: 237095
* Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-0/+25
| | | | | | | | This time without a stray "true" in an argument list. This reverts r237077, restoring r237074. llvm-svn: 237091
* Remove the code that pulled soft float attributes out of the featureEric Christopher2015-05-121-2/+3
| | | | | | | strings and remove the setting of TargetOptions::UseSoftFloat to match the code change in llvm r237079. llvm-svn: 237080
* Revert "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-25/+0
| | | | | | This revert r237074. These tests are failing all over the place. llvm-svn: 237077
* Driver: Make profiling flags work with -nostdlib on DarwinJustin Bogner2015-05-121-0/+25
| | | | | | | | | | | | | Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib shouldn't prevent it from being linked. This makes Darwin behave like other toolchains, and link in the profile runtime irrespective of -nostdlib, since the resulting program can't be run unless you link this. I've also added a test to show that other toolchains already behave like this. llvm-svn: 237074
* Allow empty assembly string literal with -fno-gnu-inline-asmSteven Wu2015-05-121-0/+3
| | | | | | | | | Empty assembly string will not introduce assembly code in the output binary and it is often used as a trick in the header to disable optimizations. It doesn't conflict with the purpose of the option so it is allowed with -fno-gnu-inline-asm flag. llvm-svn: 237073
* PR20625: Instantiate static constexpr member function of a local struct in a ↵Richard Smith2015-05-111-0/+15
| | | | | | | | | | | | | | | function template earlier. This is necessary in order to allow the use of a constexpr member function, or a member function with deduced return type, of a local class within a surrounding instantiated function template specialization. Patch by Michael Park! This re-commits r236063, which was reverted in r236134, along with a fix for a delayed template parsing bug that was exposed by this change. llvm-svn: 237064
* Allow AsmLabel with -fno-gnu-inline-asmSteven Wu2015-05-111-0/+4
| | | | | | | | | | | | | | | | | | | Summary: AsmLabel is heavily used in system level and firmware to redirect function and access platform specific labels. They are also extensively used in system headers which makes this option unusable for many users. Since AsmLabel doesn't introduce any assembly code into the output binary, it shouldn't be considered as inline-asm. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9679 llvm-svn: 237048
* [cuda] Fixed test case failure on s390xArtem Belevich2015-05-111-2/+2
| | | | llvm-svn: 237007
* Revert "Allow -target= and --target options"Richard Barton2015-05-111-6/+0
| | | | | | | | | After mailing list discussion on 11-13 March we would prefer to stick to a single spelling of the long option. This reverts commit 30035fe1a7c759c89ee62eb46efce6b3790fcc08. llvm-svn: 237003
* [Sparc] Add support for 'sparcel' to clang.Douglas Katzman2015-05-113-2/+50
| | | | | | Differential Revision: http://reviews.llvm.org/D8784 llvm-svn: 237001
* Disable __has_cpp_attribute when not compiling in C++ mode. As this feature ↵Aaron Ballman2015-05-111-1/+4
| | | | | | | | test macro only supports C++ style attributes, it doesn't apply to code compiled as C code, and can lead to diagnostics when given a scoped attribute. This addresses PR23435. llvm-svn: 236996
* AVX-512: Changed CC parameter in "cmp" intrinsicElena Demikhovsky2015-05-114-285/+285
| | | | | | from i8 to i32 according to the Intel Spec llvm-svn: 236980
* [MS ABI] Import move assignment operatorsDavid Majnemer2015-05-111-2/+4
| | | | | | | MSVC 2015 changed behavior from 2013; it imports move assignment operators. llvm-svn: 236966
* [MS ABI] Form member pointers from virtual funcs overriding vbasesDavid Majnemer2015-05-101-0/+12
| | | | | | | | | | | | | | | We didn't supporting taking the address of virtual member functions which overrode a method in a virtual base. We simply need to encode the virtual base index in the member pointer. This fixes PR23452. N.B. There is no data member pointer side to this change because taking the address of a virtual bases' data member gives you a member pointer whose type is derived from the virtual bases' type, not the most derived type. llvm-svn: 236962
* [MS ABI] Update EH emission for MSVC 2015 compatibilityDavid Majnemer2015-05-101-0/+15
| | | | | | | | | | | | | MSVC 2015 renamed the symbol found by name lookup for 'std::terminate' so we cannot rely on using '?terminate@@YAXXZ'. Furthermore, it seems that 2015 will be the first release of MSVC which permits inlining a function which is noexcept into a function which isn't. This is implemented by creating a cleanup for the invoker which jumps to __std_terminate. Clang's implementation of this aspect of the MSVC scheme is slightly less efficient in this respect because we use a catch handler configured as a catch-all handler instead. llvm-svn: 236961
* Reapply r236854 and fixed r236867.Daniel Jasper2015-05-102-1/+9
| | | | | | | Makes emacs show a different message when clang-format encountered a syntax error. llvm-svn: 236943
* Revert r236879, "Do not emit thunks with available_externally linkage in ↵NAKAMURA Takumi2015-05-091-26/+1
| | | | | | | | comdats" It broke pecoff, at least i686-cygwin. llvm-svn: 236937
* Revert "Make emacs show when clang-format encountered a syntax error."Tobias Grosser2015-05-082-9/+1
| | | | | | | | | | | This reverts commit 236854, which caused clang-format to always print '{ "IncompleteFormat": false }' at the top of an incompletely formatted file. This output causes problems e.g. in Polly's automatic formatting checks. Daniel tried to fix this in 236867, but this fix had to be reverted due to buildbot failures. I revert this change as well for now as it is Friday night and unlikely to be fixed immediately. llvm-svn: 236908
* Using ARMTargetParser in ClangRenato Golin2015-05-081-7/+6
| | | | | | | | | | | | | | | | This is a starting point for using the TargetParser in Clang, in a simple enough part of the code that can be used without disrupting the crazy platform support that we need to be compatible with other toolchains. Also adding a few FIXME on obvious places that need replacing, but those cases will indeed break a few of the platform assumptions, as arch/cpu names change multiple times in the driver. Finally, I'm changing the "neon-vfpv3" behaviour to match standard NEON, since -mfpu=neon implies vfpv3 by default in both Clang and LLVM. That option string is still supported as an alias to "neon". llvm-svn: 236901
* Fix BackendConsumer::EmitOptimizationMessage()Diego Novillo2015-05-081-0/+21
| | | | | | | | | | | Patch from Geoff Berry <gberry@codeaurora.org> Fix BackendConsumer::EmitOptimizationMessage() to check if the DiagnosticInfoOptimizationBase object has a valid location before calling getLocation() to avoid dereferencing a null pointer inside getLocation() when no debug info is present. llvm-svn: 236898
* Add the test case from PR 14044 to ensure it doesn't regress.Kaelyn Takata2015-05-081-0/+12
| | | | | | | The test started working at some point, presumably fixed through the delayed typo correction work. llvm-svn: 236883
* Revert "clang-format: Only output IncompleteFormat if -cursor is given."Renato Golin2015-05-081-2/+2
| | | | | | | This reverts commit r236867, as it was breaking multiple buildbots. Daniel will look into it later. llvm-svn: 236882
* Do not emit thunks with available_externally linkage in comdatsDerek Schuff2015-05-081-1/+26
| | | | | | | | | | | | | | Functions with available_externally linkage will not be emitted to object files (they will just be undefined symbols), so it does not make sense to put them in comdats. Creates a second overload of maybeSetTrivialComdat that uses the GlobalObject instead of the Decl, and uses that in several places that had the faulty logic. Differential Revision: http://reviews.llvm.org/D9580 llvm-svn: 236879
* Revert "Allow case-insensitive values for -mcpu for ARM and AArch64"Renato Golin2015-05-082-22/+0
| | | | | | | This reverts commit r236859, as it broke multiple builds. I'll investigate and reapply when safe. llvm-svn: 236869
* clang-format: Only output IncompleteFormat if -cursor is given.Daniel Jasper2015-05-081-2/+2
| | | | | | This is only for editor integrations. llvm-svn: 236867
* Allow case-insensitive values for -mcpu for ARM and AArch64Renato Golin2015-05-082-0/+22
| | | | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mcpu option. Patch by Gabor Ballabas. llvm-svn: 236859
* Make emacs show when clang-format encountered a syntax error.Manuel Klimek2015-05-082-1/+9
| | | | | | | Propagate the 'incomplete-format' state back through clang-format's command line interace and adapt the emacs integration to show a better result. llvm-svn: 236854
* [ARM] Give an error on invalid -march valuesJohn Brawn2015-05-081-3/+3
| | | | | | | | | | llvm::Triple::getARMCPUForArch now returns nullptr for invalid -march values, instead of silently translating it to arm7tdmi. Use this to give an error message, which is consistent with how gcc behaves. Differential Revision: http://reviews.llvm.org/D9602 llvm-svn: 236846
* [OPENMP] Fixed atomic construct with non-integer expressions.Alexey Bataev2015-05-081-0/+3
| | | | | | Do not emit 'atomicrmw' instruction for simple atomic constructs with non-integer expressions. llvm-svn: 236828
* [OPENMP] Code cleanup for capturing of variables in OpenMP regions.Alexey Bataev2015-05-081-1/+14
| | | | llvm-svn: 236821
* [SanitizerCoverage] Implement user-friendly -fsanitize-coverage= flags.Alexey Samsonov2015-05-071-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Possible coverage levels are: * -fsanitize-coverage=func - function-level coverage * -fsanitize-coverage=bb - basic-block-level coverage * -fsanitize-coverage=edge - edge-level coverage Extra features are: * -fsanitize-coverage=indirect-calls - coverage for indirect calls * -fsanitize-coverage=trace-bb - tracing for basic blocks * -fsanitize-coverage=trace-cmp - tracing for cmp instructions * -fsanitize-coverage=8bit-counters - frequency counters Levels and features can be combined in comma-separated list, and can be disabled by subsequent -fno-sanitize-coverage= flags, e.g.: -fsanitize-coverage=bb,trace-bb,8bit-counters -fno-sanitize-coverage=trace-bb is equivalient to: -fsanitize-coverage=bb,8bit-counters Original semantics of -fsanitize-coverage flag is preserved: * -fsanitize-coverage=0 disables the coverage * -fsanitize-coverage=1 is a synonym for -fsanitize-coverage=func * -fsanitize-coverage=2 is a synonym for -fsanitize-coverage=bb * -fsanitize-coverage=3 is a synonym for -fsanitize-coverage=edge * -fsanitize-coverage=4 is a synonym for -fsanitize-coverage=edge,indirect-calls Driver tries to diagnose invalid flag usage, in particular: * At most one level (func,bb,edge) must be specified. * "trace-bb" and "8bit-counters" features require some level to be specified. See test case for more examples. Test Plan: regression test suite Reviewers: kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9577 llvm-svn: 236790
* [MS ABI] Make sure we number thread_local statics seperatelyDavid Majnemer2015-05-071-1/+11
| | | | | | | The thread_local variables need their own numbers, they can't share with the other static local variables. llvm-svn: 236774
* Fixed test failure on machines with 32-bit size_t.Artem Belevich2015-05-071-1/+1
| | | | llvm-svn: 236773
* [cuda] Include GPU binary into host object file and generate init/deinit code.Artem Belevich2015-05-071-1/+40
| | | | | | | | | | | | - added -fcuda-include-gpubinary option to incorporate results of device-side compilation into host-side one. - generate code to register GPU binaries and associated kernels with CUDA runtime and clean-up on exit. - added test case for init/deinit code generation. Differential Revision: http://reviews.llvm.org/D9507 llvm-svn: 236765
* Replace the broken LambdaCapture::isInitCapture API.James Dennett2015-05-071-1/+24
| | | | | | | | | | | | | | | A LambdaCapture does not have sufficient information to correctly determine whether it is an init-capture or not. Doing so requires knowledge held in the LambdaExpr itself. It the case of a nested capture of an init-capture it is not sufficient to check (as LambdaCapture::isInitCapture did) whether the associated VarDecl was from an init-capture. This patch moves isInitCapture to LambdaExpr and updates Capture->isInitCapture() to Lambda->isInitCapture(Capture). llvm-svn: 236760
* [SanitizerCoverage] Give clang-cc1 the power to precisly specify needed ↵Alexey Samsonov2015-05-072-26/+26
| | | | | | | | | | | | | | | | | | sanitizier coverage mode. Summary: The next step is to add user-friendly control over these options to driver via -fsanitize-coverage= option. Test Plan: regression test suite Reviewers: kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9545 llvm-svn: 236756
* AVX-512: FP compare intrinsics - changed type of CC parameter from i8 to i32 ↵Elena Demikhovsky2015-05-071-0/+47
| | | | | | | | according to the spec. Added FP compare intrinsics for SKX. llvm-svn: 236715
OpenPOWER on IntegriCloud