Commit Graph

204408 Commits

Author SHA1 Message Date
Reid Kleckner 3123eff5eb [clang-cl] Use /arch: to set the base target CPU
The main effect of this change is that /arch:IA32 will use i386 as the
CPU, while clang-cl will continue to default to pentium4 (aka SSE2 plus
the usual other features).

/arch:AVX and /arch:AVX2 will also now enable the other features
available in sandybridge and haswell respectively, which is consistent
with MSDN.

llvm-svn: 241077
2015-06-30 16:32:04 +00:00
Sanjay Patel 0ca438c6b1 use range-based for loops; NFCI
llvm-svn: 241076
2015-06-30 16:30:22 +00:00
Rafael Espindola 29efdd4a21 Update for llvm change.
llvm-svn: 241075
2015-06-30 15:34:00 +00:00
Rafael Espindola 2b5f841e98 Fix the name of the iterator functions to match the coding standards.
llvm-svn: 241074
2015-06-30 15:33:44 +00:00
Gabor Horvath 93fde94d81 [Static Analyzer] Minor improvements to SATest.
Differential Revision: http://reviews.llvm.org/D10812

llvm-svn: 241073
2015-06-30 15:31:17 +00:00
Alexander Potapenko 5e70fb13de [ASan] Add a regression test for r240960 (https://crbug.com/502974)
The test simulates a sandbox that prevents the program from calling readlink().
ASan is supposed to still be able to print the executable name regardless of that.

llvm-svn: 241072
2015-06-30 15:18:03 +00:00
Ewan Crawford 184d4df4d7 Fix windows build.
Windows build was broken in either r240983 or r240978 in the changes to FileSpec.cpp

llvm-svn: 241071
2015-06-30 15:03:31 +00:00
Rafael Espindola 350239c424 Report an error on invalid sh_entsize.
llvm-svn: 241070
2015-06-30 14:59:20 +00:00
Michael Kuperstein 8a6c9ccc98 [X86] Fix a bug in WIN_FTOL_32/64 handling.
Duplicating an FP register "as itself" is a bad idea, since it violates the
invariant that every FP register is mapped to at most one FPU stack slot.
Use the scratch FP register instead.

This fixes PR23957.

llvm-svn: 241069
2015-06-30 14:38:57 +00:00
Marshall Clow 660dcd9168 Implement LWG#2407: 'packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit'
llvm-svn: 241068
2015-06-30 14:16:49 +00:00
Marshall Clow f69ae47128 Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480
llvm-svn: 241067
2015-06-30 14:04:14 +00:00
Toma Tabacu 0f09313051 [mips] [IAS] Add support for the .module softfloat/hardfloat directives.
These directives are used to set the default value of the SoftFloat feature.
They have the same effect as setting -m{soft, hard}-float from the command line.

Differential Revision: http://reviews.llvm.org/D9073

llvm-svn: 241066
2015-06-30 13:46:03 +00:00
Michael Kuperstein e45af54cdb [X86] Rename DEFAULT_FN_ATTR macro to __DEFAULT_FN_ATTR
llvm-svn: 241065
2015-06-30 13:36:19 +00:00
Marshall Clow c9c86ca0a2 Mark LWG#2266 as complete. This is a tightening up the wording; no code changes required.
llvm-svn: 241064
2015-06-30 13:32:08 +00:00
Ewan Crawford 0c996a9a06 Change search order of target definition files.
Make the python target definition file have highest priority so that we can set 
the remote stub breakpoint pc offset using it.

Reviewers: clayborg
Subscribers: ted, deepak2427, lldb-commits 

Differential revision: http://reviews.llvm.org/D10775

llvm-svn: 241063
2015-06-30 13:08:44 +00:00
Toma Tabacu fc97d8a95a [mips] [IAS] Make .module directives change AssemblerOptions->front().
Differential Revision: http://reviews.llvm.org/D10643

llvm-svn: 241062
2015-06-30 12:41:33 +00:00
Ranjeet Singh 86ecbb7b54 Reverting r241058 because it's causing buildbot failures.
llvm-svn: 241061
2015-06-30 12:32:53 +00:00
Hubert Tong 375f00ad7b [CONCEPTS] Parsing of concept keyword
Summary: This change adds parsing for the concept keyword in a
declaration and tracks the location. Diagnostic testing added for
invalid use of concept keyword.

Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast

Reviewed By: rsmith, hubert.reinterpretcast

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D10528

Patch by Nathan Wilson!

llvm-svn: 241060
2015-06-30 12:14:52 +00:00
Daniel Jasper a87af7a326 clang-format: Properly parse parenthesis in braced lists.
Among other things, this makes clang-format understand arbitrary blocks
embedded in them, such as:

  SomeFunction({MACRO({ return output; }), b});

where MACRO could e.g. expand to a lambda.

llvm-svn: 241059
2015-06-30 11:32:22 +00:00
Ranjeet Singh 5b119091a1 There are a few places where subtarget features are still
represented by uint64_t, this patch replaces these
usages with the FeatureBitset (std::bitset) type.

Differential Revision: http://reviews.llvm.org/D10542

llvm-svn: 241058
2015-06-30 11:30:42 +00:00
Tamas Berghammer f256184693 Fix [vdso] handling on Android (x86 and aarch64)
* Add in-memory object file handling to the core dynamic loader
* Fix in memory object file handling in ObjectFileELF (previously
  only part of the file was loaded before parsing)
* Fix load address setting in ObjectFileELF for 32-bit targets
  when the load bias is negative
* Change hack in DYLDRendezvous.cpp to be more specific and not to
  interfere with object files with fixed load address

Differential revision: http://reviews.llvm.org/D10800

llvm-svn: 241057
2015-06-30 10:41:23 +00:00
Pavel Labath cd4994e925 Add a missing header
llvm-svn: 241056
2015-06-30 10:20:52 +00:00
Michael Kuperstein 9101a98bd0 [X86] Add missing undef of DEFAULT_FN_ATTRS in FXSR intrinsics
llvm-svn: 241055
2015-06-30 10:18:54 +00:00
David Majnemer 21a7cfec64 Correct a typo for a LoopVectorize test
I forgot to specify the correct pass.

llvm-svn: 241054
2015-06-30 10:05:43 +00:00
Michael Kuperstein a3c7b74208 [X86] Add FXSR intrinsics
Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64)

These were previously declared in Intrin.h for MSVC compatibility, but now
that we have them implemented, these declarations can be removed.

llvm-svn: 241053
2015-06-30 09:45:38 +00:00
Toma Tabacu 32c72aa099 [mips] [IAS] Add support for the .set oddspreg/nooddspreg directives.
Differential Revision: http://reviews.llvm.org/D10657

llvm-svn: 241052
2015-06-30 09:36:50 +00:00
Tamas Berghammer f366af309a Ignore "push/pop {sp}" in emulation based unwinding
These instructions confusing the unwind code because in case of a
push it assumes that the original valu of a register is pushed to
the stack what is not neccessarily true in case of SP. The same is
true for the pop (in the opposite way).

Differential revision: http://reviews.llvm.org/D10806

llvm-svn: 241051
2015-06-30 09:35:46 +00:00
Tamas Berghammer 0b736f1ed0 Fix LLDB build after r241035
llvm-svn: 241050
2015-06-30 09:26:52 +00:00
Michael Kuperstein 5aff75b92a [X86] Add FXSR intrinsics
Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64)

llvm-svn: 241049
2015-06-30 08:49:35 +00:00
Tobias Grosser 4db553199c Update isl to isl-0.15-30-g3518765
This updated contains various changes to isl, including improvements to the
AST generator. For Polly, the most important change is a fix that unbreaks
builds on darwin (reported by: Jack Howard)

llvm-svn: 241048
2015-06-30 08:22:14 +00:00
NAKAMURA Takumi 886fbad410 Fix a couple of tests in clang/test to match "x86_thiscallcc" introduced in r240971.
llvm-svn: 241047
2015-06-30 08:02:26 +00:00
Yaron Keren 180c167c98 Unbreak the Visual C++ 2013 build after r241032.
clang\lib\Parse\ParseDeclCXX.cpp(2396): error C3486: a parameter for a lambda cannot have a default argument 

llvm-svn: 241046
2015-06-30 07:35:19 +00:00
Mohit K. Bhakkad e0d8c422a0 [LLDB][MIPS] Getting correct flags for MIPS
Patch by Nitesh Jain

Reviewers: clayborg, ovyalov, emaste.
Subscribers: jaydeep, bhushan, dsanders, mohit.bhakkad, sagar, labath, tberghammer, lldb-commits.
Differential Revision: http://reviews.llvm.org/D10685

llvm-svn: 241045
2015-06-30 06:29:12 +00:00
NAKAMURA Takumi 28dbd3cca3 ELF.h: Prune obsolete comments removed in r240996. [-Wdocumentation]
FIXME: Should they be moved onto Elf_Sym_Impl::getNmae()?
llvm-svn: 241044
2015-06-30 05:59:13 +00:00
David Majnemer 64b0bdf88a [CodeGen] Tweak isTriviallyRecursive further
isTriviallyRecursive is a hack used to bridge a gap between the
expectations that source code assumes and the semantics that LLVM IR can
provide.  Specifically, asm labels on functions are treated as an
explicit name for a GlobalObject in Clang but treated like an
output-processing step in GCC.  Tweak this hack a little further to emit
calls to library functions instead of emitting an incorrect definition.
The definition in question would have available_externally linkage (this
is OK) but result in a call to itself which will either result in an
infinite loop or stack overflow.

This fixes PR23964.

llvm-svn: 241043
2015-06-30 04:41:18 +00:00
Rafael Espindola 41bb43252b Don't return error_code from a function that doesn't fail.
llvm-svn: 241042
2015-06-30 04:08:37 +00:00
Dan Gohman 8465c00762 Drop the OS from the WebAssembly target triple for now.
This unbreaks TripleTest.Normalization. We'll have to come up with a new
plan for the OS component of the target triple for WebAssembly.

llvm-svn: 241041
2015-06-30 03:52:25 +00:00
Rafael Espindola 0ad71d982c Move function to the only file that uses it.
llvm-svn: 241040
2015-06-30 03:41:26 +00:00
Rafael Espindola f69ac42ac4 Don't return error_code from a function that doesn't fail.
llvm-svn: 241039
2015-06-30 03:33:18 +00:00
David Majnemer 149e603132 [MS ABI] Workaround corner-case bug in the ABI for operator delete
MSVC only genreates array cookies if the class has a destructor.  This
is problematic when having to call T::operator delete[](void *, size_t)
because the second argument's argument is impossible to synthesize
correctly if the class has no destructor (because there will be no array
cookie).

Instead, MSVC passes the size of the class.  Do the same, for
compatibility, instead of crashing.

This fixes PR23990.

llvm-svn: 241038
2015-06-30 03:30:26 +00:00
Andrew Wilkins 6238c6f09a Sphinx-based clang man pages
Summary:
This diff introduces .rst files, Sphinx config, and a CMake target
for building clang man pages. This will deprecate the existing .pod-
based man page, and will integrate nicely with CMake. This diff does
not remove the existing man page; that will be done in a follow-up
once packagers have had a chance to react to the change.

For now, only clang(1) has been done; others can be added over time
by dropping additional files into the docs/CommandGuide directory.
The index page for CommandGuide has been copied from LLVM's
docs/CommandGuide.

The man page itself is mostly the same, with a few minor cosmetic
changes. The only major change is the SYNOPSIS section. I was unable
to get .rst/Sphinx produce the same style as in the existing man page.
Instead, I changed it to match the LLVM tools' relatively simple style.

To build the man pages, use the "docs-clang-man" target if building
with CMake. Otherwise, use "make -f Makefile.sphinx man".

Reviewers: cmatthews, silvas

Subscribers: dim, gaeke, beanz, cfe-commits

Differential Revision: http://reviews.llvm.org/D10562

llvm-svn: 241037
2015-06-30 02:52:38 +00:00
Adrian Prantl a106faaf09 Add two missing arguments.
I forgot to add this file to r241035.

llvm-svn: 241036
2015-06-30 02:34:37 +00:00
Adrian Prantl e74f525bc9 Pass HeaderSearchOptions and PreprocessorOptions into CodeGenModule.
In order to produce debug info for clang modules CGDebugInfo it needs
access to macros passed on the command line and the isysroot.

llvm-svn: 241035
2015-06-30 02:26:03 +00:00
Adrian Prantl 08a388ba8f Debug info: Add dwarf backend support for DIModule.
rdar://problem/20965932

llvm-svn: 241034
2015-06-30 02:13:04 +00:00
Rafael Espindola 99c041b72f Don't return error_code from a function that doesn't fail.
llvm-svn: 241033
2015-06-30 01:53:01 +00:00
Richard Smith 9ba0fec83e Rework parsing of pure-specifiers. Perform the grammar matching and
disambiguation in the parser rather than trying to do it in Sema.

llvm-svn: 241032
2015-06-30 01:28:56 +00:00
Peter Collingbourne a5cb389337 Add layout/triple to fix test on platforms where names are mangled.
llvm-svn: 241031
2015-06-30 01:15:54 +00:00
Dan Gohman ef46184b68 Fix LastArchType to point to the new last arch.
llvm-svn: 241030
2015-06-30 00:56:48 +00:00
Peter Collingbourne f7b27d15f2 COFF: Implement SymbolBody::getDebugName() for DefinedBitcode symbols.
Differential Revision: http://reviews.llvm.org/D10827

llvm-svn: 241029
2015-06-30 00:47:52 +00:00
Rafael Espindola 71784d611d Cleanup getRelocationAddend.
Realistically, this will be returning ErrorOr for some time as refactoring the
user code to check once per section will take some time.

Given that, use it for checking if a relocation has addend or not.

While at it, add ELFRelocationRef to simplify the users.

llvm-svn: 241028
2015-06-30 00:33:59 +00:00