Commit Graph

60251 Commits

Author SHA1 Message Date
Nico Weber
d1a9125cdd clang-format: Remove ChromiumStyle.MacroBlockBegin.
We prefer setting these in our .clang-format file as the macros change over
time.  (Also, the code was setting MacroBlockBegin twice and didn't set
MacroBlockEnd, so it wasn't doing what it tried to do anyways.)

llvm-svn: 248205
2015-09-21 20:06:42 +00:00
Akira Hatanaka
510d7c71e2 Remove attributes minsize and optsize, which conflict with optnone.
This commit fixes an assert that is triggered when optnone is being
added to an IR function that is already marked with minsize and optsize.

rdar://problem/22723716

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

llvm-svn: 248191
2015-09-21 18:52:24 +00:00
Adrian Prantl
68448fe00c Add a belated testcase for the skeleton CU behavior in r248062.
llvm-svn: 248185
2015-09-21 17:48:42 +00:00
Adrian Prantl
85d938aadb Debug Info: When building a module, emit skeleton CUs for imported modules.
llvm-svn: 248184
2015-09-21 17:48:37 +00:00
James Molloy
93bd4e9979 Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"
This was committed without the code review (http://reviews.llvm.org/D12938) being approved.

This reverts commit r248154.

llvm-svn: 248173
2015-09-21 16:34:58 +00:00
Alexander Musman
8e261be911 Fix assertion in inline assembler IR gen
Several inputs may not refer to one output constraint in inline assembler
insertions, clang was failing on assertion on such test case.

llvm-svn: 248158
2015-09-21 14:41:00 +00:00
Michael Kuperstein
a10dff946e [X86] Make f16c intrinsics accessible through emmintrin.h, per Intel docs
Differential Revision: http://reviews.llvm.org/D13015

llvm-svn: 248156
2015-09-21 13:34:47 +00:00
Artyom Skrobov
7428f1ef64 [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def
Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in
a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME:
attached.

http://reviews.llvm.org/D12937 moved the handling of +t2dsp over to
ARMTargetParser.def in LLVM, to be in line with other architecture extensions.

This is the corresponding patch to clang, to clear the FIXME: and update
the tests.

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

llvm-svn: 248154
2015-09-21 13:19:25 +00:00
Michael Kuperstein
5c2cb0eee2 [X86] Fix some non-reserved parameter names in intrinsic headers
Differential Revision: http://reviews.llvm.org/D13009

llvm-svn: 248150
2015-09-21 11:45:27 +00:00
Daniel Jasper
368369b453 clang-format: Fix merging short case labels with comments.
This fixes llvm.org/PR24877.

Patch by Benjamin Daly, thank you!

llvm-svn: 248145
2015-09-21 09:50:01 +00:00
NAKAMURA Takumi
2fbdb68073 clang/test/Modules/DebugInfoSubmodules.c REQUIRES asserts due to -debug-only.
llvm-svn: 248142
2015-09-21 06:57:36 +00:00
Craig Topper
9cd5e4f080 Pass SourceLocation by value instead of by const reference since its just a 32-bit integer. NFC
llvm-svn: 248138
2015-09-21 01:23:32 +00:00
Craig Topper
3db9ba4248 Don't pass StringRefs around by const reference. Pass by value instead per coding standards. NFC
llvm-svn: 248137
2015-09-21 00:20:04 +00:00
Adrian Prantl
9402cef0ae Module debugging: Support submodules in the PCM/PCH debug info.
llvm-svn: 248127
2015-09-20 16:51:35 +00:00
Adrian Prantl
1e63b2bdc3 Further simplify the interface of PCHContainerGenerator
by dropping the const qualifier on the CI.

NFC

llvm-svn: 248101
2015-09-19 21:42:52 +00:00
Nico Weber
fb80f961df Convert two loops to range-based loops. No behavior change.
llvm-svn: 248100
2015-09-19 21:36:51 +00:00
Saleem Abdulrasool
06f6f995a1 Driver: alter the getARMFloatABI signature
This changes getARMFloatABI to use the ToolChain and Args instead of Driver,
Args, Triple.  Although this pushes the Triple calculation/parsing into the
function itself, it enables the use of the function for a future change.  The
reason to sink the triple calculation here is to avoid threading the Triple
through multiple layers in a future change.

llvm-svn: 248095
2015-09-19 20:40:16 +00:00
Saleem Abdulrasool
ce63ce947e Driver: tweak ARM target feature calculation
Rather than using re-calculating the effective triple, thread the already
calculated value down into AddARMTargetArgs.  This avoids both recreating the
triple, as well as re-parsing the triple as it was already done in the previous
frame.

llvm-svn: 248094
2015-09-19 18:19:44 +00:00
Simon Pilgrim
12919f7e49 [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR
128-bit vector integer sign extensions correctly lower to the pmovsx instructions even for debug builds.

This patch removes the builtins and reimplements the _mm_cvtepi*_epi* intrinsics __using builtin_shufflevector (to extract the bottom most subvector) and __builtin_convertvector (to actually perform the sign extension).

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

llvm-svn: 248092
2015-09-19 15:12:38 +00:00
Alexander Kornienko
39861b3eb5 [clang-tidy] Fix example comments.
Patch by don hinton!

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

llvm-svn: 248090
2015-09-19 13:01:57 +00:00
Serge Pavlov
c4e04a2964 [Modules] More descriptive diagnostics for misplaced import directive
If an import directive was put into wrong context, the error message was obscure,
complaining on misbalanced braces. To get more descriptive messages, annotation
tokens related to modules are processed where they must not be seen.

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

llvm-svn: 248085
2015-09-19 05:32:57 +00:00
Saleem Abdulrasool
d5556e34e4 Driver: avoid unnecessary string ops
Use an enumeration for the Floating Point ABIs supported on MIPS.  This is
replicating the ARM change to avoid string based tracking of the floating point
ABI.  NFC.

llvm-svn: 248083
2015-09-19 04:33:38 +00:00
Richard Smith
664798c034 Add test that we correctly allow some non-letter unicode characters in
identifiers, and extend existing test to also cover C++.

llvm-svn: 248079
2015-09-19 02:14:12 +00:00
Adrian Prantl
2f957ac092 Further simplify CGDebugInfo::getOrCreateModuleRef().
DIBuilder ignoers DICompileUnits that are passed in as scopes anyway.

llvm-svn: 248077
2015-09-19 00:59:22 +00:00
Adrian Prantl
532365abe8 Use std::move on these arguments.
llvm-svn: 248076
2015-09-19 00:59:19 +00:00
Adrian Prantl
2d3d6dfe1c Rename ASTSourceDescriptor::ModuleName to FullModuleName for clarity.
llvm-svn: 248070
2015-09-19 00:10:37 +00:00
Adrian Prantl
c6458d6a4d Refactor ASTReader::getSourceDescriptor(const Module &) into a constructor
of ASTSourceDescriptor. It was effectively a static function.

NFC.

llvm-svn: 248069
2015-09-19 00:10:32 +00:00
Adrian Prantl
8bd4c13f67 Eliminate a redundant check.
llvm-svn: 248068
2015-09-19 00:10:25 +00:00
Gabor Horvath
659842d0fc [Static Analyzer] Fixed a false positive case in DynamicTypeChecker when dealing with forward declarations.
llvm-svn: 248065
2015-09-18 23:38:57 +00:00
Richard Trieu
324da7b207 Split off the binary literal warning into a subgroup of C++14 warnings
Binary literals predate C++14, but they are listed as a C++14 extension since
this was the first time they were standardized in the language.  Move the
warning into a subgroup so it can be selectively disabled when checking for
other C++14 features.

llvm-svn: 248064
2015-09-18 23:18:39 +00:00
Adrian Prantl
666892051c CGDebugInfo: Make creating a skeleton CU in getOrCreateModuleRef optional.
We don't want a skeleton CU when generating debug info for the module
itself.

NFC.

llvm-svn: 248062
2015-09-18 23:01:45 +00:00
Adrian Prantl
0391406e95 Simplify the interface of PCHContainerGenerator and friends
by passing in a CompilerInstance instead of all its individual members.

NFC.

llvm-svn: 248053
2015-09-18 22:10:59 +00:00
Rafael Espindola
54e9d238b6 Relax the test to get it passing with windows paths.
llvm-svn: 248051
2015-09-18 22:01:10 +00:00
Ismail Pazarbasi
d347e7a920 Analyzer: Fix a crasher in UbigraphViz
Summary:
Name `Out` refers to the parameter. It is moved into the member `Out`
in ctor-init. Dereferencing null pointer will crash clang, if user
passes '-analyzer-viz-egraph-ubigraph' argument.

Reviewers: zaks.anna, krememek

Subscribers: cfe-commits

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

llvm-svn: 248050
2015-09-18 21:54:47 +00:00
Eric Christopher
c48497a2f8 Reduce indentation in the TargetInfo implementations and fix up
a couple of macro builtin redefines.

llvm-svn: 248046
2015-09-18 21:26:24 +00:00
Chris Bieneman
cd53780cd4 [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

This re-lands r248015, with fixes for clang symlinks to always be generated as part of the clang and install-clang targets.

llvm-svn: 248043
2015-09-18 21:15:54 +00:00
Gabor Horvath
dce40c518d [Static Analyzer] General type checker based on dynamic type information.
Differential Revision: http://reviews.llvm.org/D12973

llvm-svn: 248041
2015-09-18 21:15:37 +00:00
Adrian Prantl
201e10d007 Debug Info: Use the full module name as a key when caching DIModules.
The signature may not have been computed at the time the module reference
is generated (e.g.: in the future while emitting debug info for a clang
module). Using the full module name is safe because each clang module may
only have a single definition.

NFC.

llvm-svn: 248037
2015-09-18 21:06:14 +00:00
Rafael Espindola
12d2a39c88 Handle lld not being found in PATH.
llvm-svn: 248035
2015-09-18 20:55:58 +00:00
Nico Weber
4cc796a614 clang-cl: Don't warn on /bigobj flag
LLVM r217812 made it so that clang-cl implicitly creates bigobj files when
needed, independent of this flag. It looks like cl has this flag to produce obj
flags compatible with MSVS 2003's linker by default, something we don't care
about. Since clang-cl always has /bigobj behavior, don't warn that the flag is
unused, just ignore it silently.

llvm-svn: 248034
2015-09-18 20:49:33 +00:00
Rafael Espindola
4859773a95 Yet another try at fixing this at every bot.
This time handle " and - after clang and lld.

llvm-svn: 248033
2015-09-18 20:44:09 +00:00
Rafael Espindola
df1b494404 Relax this test further to pass in other bots.
The problem this time was the /clang matching the InstalledDir line.

Now we just use regular expressions which are more flexible, if a bit less
readable, than CHECK+CHECK-SAME.

llvm-svn: 248031
2015-09-18 20:35:53 +00:00
Rafael Espindola
9b3ee4bf2c Fix test to pass when the directory name has lld in it.
CHECK-LABEL assumes that there is only one occurrence of the match.

The output looks like:

clang version 3.8.0 (trunk 247999)
....
/path/to/build/dir/bin/clang-3.8 ....

If the path contains lld, the second CHECK-LABEL matches it and we fail since
there is no -cc1as between clang and lld.

llvm-svn: 248029
2015-09-18 20:22:36 +00:00
Chris Bieneman
f41fe8b6f8 Revert "[CMake] Refactoring and cleaning up clang symlink generation."
This reverts commit r248015, because it broke bots. I'll revise and recommit.

llvm-svn: 248025
2015-09-18 19:59:51 +00:00
Gabor Horvath
c4b28a8f74 [analyzer] A fix for substraction of an integer from a pointer.
Patch by Artem Dergachev!

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

llvm-svn: 248021
2015-09-18 19:13:22 +00:00
Chris Bieneman
bca3d933ce [CMake] Set CLANG_LINKS_TO_CREATE in Apple-stage2.cmake so that we create cc and c++ links.
llvm-svn: 248016
2015-09-18 18:11:18 +00:00
Chris Bieneman
8a1030db9f [CMake] Refactoring and cleaning up clang symlink generation.
Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE.

llvm-svn: 248015
2015-09-18 18:09:15 +00:00
Hans Wennborg
0f0e8d624c clang-cl: Use 'pc' for the vendor field in the default triple
Leaving it unset can make the triple look confusing, especially
when using -m32 or -m64.

llvm-svn: 248005
2015-09-18 17:11:50 +00:00
Gabor Horvath
6165d31a83 [Static Analyzer] Use generics related information to infer dynamic types.
Differential Revision: http://reviews.llvm.org/D12916

llvm-svn: 248002
2015-09-18 16:43:27 +00:00
NAKAMURA Takumi
e7229f4921 Suppress amdgpu-toolchain.c for targeting ps4, for now. Investigating.
llvm-svn: 248000
2015-09-18 16:21:27 +00:00