]> granicus.if.org Git - clang/log
clang
9 years agoMake 'arm' cover both 32 and 64 bit architecutres
Ben Langmuir [Fri, 7 Aug 2015 01:59:56 +0000 (01:59 +0000)]
Make 'arm' cover both 32 and 64 bit architecutres

... and add aarch32 to specifically refer to the 32-bit ones.

Previously, 'arm' meant only 32-bit architectures and there was no way
for a module to build with both 32 and 64 bit ARM architectures.

Now a module that is intended to work on both architectures can specify
    requires arm
whereas a module only for 32-bit platforms can say
    requires aarch32
and just like before, 64-bit only can say
    requires aarch64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244306 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRange-forify a loop, delete trailing whitespace. NFC
Douglas Katzman [Thu, 6 Aug 2015 22:36:24 +0000 (22:36 +0000)]
Range-forify a loop, delete trailing whitespace. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244290 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Remove unused ModuleManager::visitDepthFirst function.
Richard Smith [Thu, 6 Aug 2015 22:14:35 +0000 (22:14 +0000)]
[modules] Remove unused ModuleManager::visitDepthFirst function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244289 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Fix use-after-iterator-invalidation bug.
Richard Smith [Thu, 6 Aug 2015 22:14:12 +0000 (22:14 +0000)]
[modules] Fix use-after-iterator-invalidation bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244288 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoContinue the work from r243908 by adding a Features field to Builtin::Info
Eric Christopher [Thu, 6 Aug 2015 22:11:54 +0000 (22:11 +0000)]
Continue the work from r243908 by adding a Features field to Builtin::Info
so that we can populate it on a per-target basis with required features.

Future commits will start using this information for warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244286 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Stop walking all modules when looking for lexical decls for a
Richard Smith [Thu, 6 Aug 2015 22:07:25 +0000 (22:07 +0000)]
[modules] Stop walking all modules when looking for lexical decls for a
DeclContext. These only ever come from the owning module file for the Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244285 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix alignment of TemplateArgumentList.
James Y Knight [Thu, 6 Aug 2015 21:22:02 +0000 (21:22 +0000)]
Fix alignment of TemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244280 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Remove now-unused MergedLookups map.
Richard Smith [Thu, 6 Aug 2015 21:09:44 +0000 (21:09 +0000)]
[modules] Remove now-unused MergedLookups map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244277 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Remove redundant lookups into non-primary DeclContexts. These were made...
Richard Smith [Thu, 6 Aug 2015 21:05:21 +0000 (21:05 +0000)]
[modules] Remove redundant lookups into non-primary DeclContexts. These were made unnecessary by r244192.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244271 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ItaniumCXXABI] Don't import RTTI data for classes with key functions
David Majnemer [Thu, 6 Aug 2015 20:56:55 +0000 (20:56 +0000)]
[ItaniumCXXABI] Don't import RTTI data for classes with key functions

MinGW has some pretty strange behvaior around RTTI and
dllimport/dllexport:
- RTTI data is never imported
- RTTI data is only exported if the class has no key function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244266 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConvert a few classes over to use the new TrailingObjects helper.
James Y Knight [Thu, 6 Aug 2015 20:26:32 +0000 (20:26 +0000)]
Convert a few classes over to use the new TrailingObjects helper.

This initial commit serves as an example -- the remainder of the
classes using pointer arithmetic for trailing objects will be
converted in subsequent changes.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244262 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused 'Owned' flag from TemplateArgumentList.
James Y Knight [Thu, 6 Aug 2015 20:26:18 +0000 (20:26 +0000)]
Remove unused 'Owned' flag from TemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244261 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Frontend] Fix crash when serializing diagnostics with really long text.
Argyrios Kyrtzidis [Thu, 6 Aug 2015 18:46:36 +0000 (18:46 +0000)]
[Frontend] Fix crash when serializing diagnostics with really long text.

rdar://21896690

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244245 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix memory ownership in the NeonEmitter by using values instead of pointers (smart...
David Blaikie [Thu, 6 Aug 2015 18:29:32 +0000 (18:29 +0000)]
Fix memory ownership in the NeonEmitter by using values instead of pointers (smart or otherwise)

Improvement to the memory leak fix in 244196.

Address validity is required for the Intrinsic objects, but since the
collections only ever grow (no elements are removed), deque provides
sufficient guarantees (that the objects will never be reallocated/moved
around) for this use case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244241 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.1] Allow references in init expression for loop-based constructs.
Alexey Bataev [Thu, 6 Aug 2015 12:30:57 +0000 (12:30 +0000)]
[OPENMP 4.1] Allow references in init expression for loop-based constructs.

OpenMP 4.1 allows to use variables with reference types in private clauses and, therefore, in init expressions of the cannonical loop forms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244209 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMark calls in thunk functions as tail-call optimization candidates
Michael Kuperstein [Thu, 6 Aug 2015 11:57:15 +0000 (11:57 +0000)]
Mark calls in thunk functions as tail-call optimization candidates

When a thunk is generated with a call to the original adjusted function,
the thunk appears in the debugger call stack. We want the backend to perform
tail-call optimization on the call, to make it invisible to the debugger.

This fixes PR24235

Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D11476

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244207 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Add support for _MM_ALIGN16
Michael Kuperstein [Thu, 6 Aug 2015 08:24:38 +0000 (08:24 +0000)]
[X86] Add support for _MM_ALIGN16

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244201 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPlug a memory leak in NeonEmitter: Intrinsics allocated were never released.
Yaron Keren [Thu, 6 Aug 2015 07:28:36 +0000 (07:28 +0000)]
Plug a memory leak in NeonEmitter: Intrinsics allocated were never released.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244196 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ObjC] Circular containers: add support of subclasses
Alex Denisov [Thu, 6 Aug 2015 04:51:14 +0000 (04:51 +0000)]
[ObjC] Circular containers: add support of subclasses

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244193 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Defer setting up the lookup table for a DeclContext until we can
Richard Smith [Thu, 6 Aug 2015 04:23:48 +0000 (04:23 +0000)]
[modules] Defer setting up the lookup table for a DeclContext until we can
determine the primary context, rather than sometimes registering the lookup
table on the wrong context.

This exposed a couple of bugs:
 * the odr violation check didn't deal properly with mergeable declarations
   if the declaration retained by name lookup wasn't in the canonical
   definition of the class
 * the (broken) RewriteDecl mechanism would emit two name lookup tables for
   the same DeclContext into the same module file (one as part of the
   rewritten declaration and one as a visible update for the old declaration)
These are both fixed too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244192 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[test] Another attempt to fix the test.
Argyrios Kyrtzidis [Thu, 6 Aug 2015 01:06:55 +0000 (01:06 +0000)]
[test] Another attempt to fix the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244187 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRename the non-coding style conformant functions in namespace Builtins
Eric Christopher [Thu, 6 Aug 2015 01:01:12 +0000 (01:01 +0000)]
Rename the non-coding style conformant functions in namespace Builtins
to match the rest of their brethren and reformat the bits that need it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244186 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts
Justin Bogner [Wed, 5 Aug 2015 23:49:44 +0000 (23:49 +0000)]
Driver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts

These two arguments tend to refer to a local path that won't exist
when we try to reproduce a bug. Strip them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244179 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRename DescriptionString -> DataLayoutString as it matches the actual
Eric Christopher [Wed, 5 Aug 2015 23:48:05 +0000 (23:48 +0000)]
Rename DescriptionString -> DataLayoutString as it matches the actual
use of the string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244178 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[test] Fix tests in non-darwin bots.
Argyrios Kyrtzidis [Wed, 5 Aug 2015 23:44:06 +0000 (23:44 +0000)]
[test] Fix tests in non-darwin bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244176 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd -fno-coverage-mapping flag.
Diego Novillo [Wed, 5 Aug 2015 23:27:40 +0000 (23:27 +0000)]
Add -fno-coverage-mapping flag.

This new flag allows the user to disable a previous instance of
-fcoverage-mapping, if needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244170 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agofunction_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
Richard Smith [Wed, 5 Aug 2015 22:41:45 +0000 (22:41 +0000)]
function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove its
useless return value. Switch to using it directly when completing the
redeclaration chain for an anonymous declaration, and reduce the set of
declarations that we load in the process to just those of the right kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244161 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd flags to disable profile generation.
Diego Novillo [Wed, 5 Aug 2015 21:49:51 +0000 (21:49 +0000)]
Add flags to disable profile generation.

This patch adds flags -fno-profile-instr-generate and
-fno-profile-instr-use, and the GCC aliases -fno-profile-generate and
-fno-profile-use.

These flags are used in situations where users need to disable profile
generation or use for specific files in a build, without affecting other
files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244153 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReword a comment about IncludeDirGroup. NFC
Douglas Katzman [Wed, 5 Aug 2015 21:31:54 +0000 (21:31 +0000)]
Reword a comment about IncludeDirGroup. NFC

Referring to the groups by mixing the enumerated name
with the command-line flag was not as clear as could be.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244150 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused header includes.
Eric Christopher [Wed, 5 Aug 2015 21:11:56 +0000 (21:11 +0000)]
Remove unused header includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244131 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRename builtin_lang -> Langs to match the rest of the code a bit better.
Eric Christopher [Wed, 5 Aug 2015 21:04:28 +0000 (21:04 +0000)]
Rename builtin_lang -> Langs to match the rest of the code a bit better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244126 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused function GetBuiltinNames.
Eric Christopher [Wed, 5 Aug 2015 21:04:24 +0000 (21:04 +0000)]
Remove unused function GetBuiltinNames.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244125 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDocumentation: fix another typo, "arrays types" -> "array types".
James Dennett [Wed, 5 Aug 2015 20:58:23 +0000 (20:58 +0000)]
Documentation: fix another typo, "arrays types" -> "array types".

Thanks to Kim Gräsman <kim.grasman@gmail.com> for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244124 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Add USES_TERMINAL 1 to ExternalProject_Add_Step calls on 3.3.20150708 and...
Chris Bieneman [Wed, 5 Aug 2015 20:46:39 +0000 (20:46 +0000)]
[CMake] Add USES_TERMINAL 1 to ExternalProject_Add_Step calls on 3.3.20150708 and later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244119 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused comparison operators from the Builtin Info struct.
Eric Christopher [Wed, 5 Aug 2015 20:11:04 +0000 (20:11 +0000)]
Remove unused comparison operators from the Builtin Info struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244111 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unnecessary ClangLibdirSuffix variable.
Yaron Keren [Wed, 5 Aug 2015 20:06:56 +0000 (20:06 +0000)]
Remove unnecessary ClangLibdirSuffix variable.
Twine + const char * is supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244110 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDocumentation: fix a typo, "This flag is determines" -> "This flag determines".
James Dennett [Wed, 5 Aug 2015 19:44:47 +0000 (19:44 +0000)]
Documentation: fix a typo, "This flag is determines" -> "This flag determines".

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244104 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd -gcodeview and -gdwarf to control which type Clang emits
Reid Kleckner [Wed, 5 Aug 2015 18:51:13 +0000 (18:51 +0000)]
Add -gcodeview and -gdwarf to control which type Clang emits

Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview.  You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.

Reviewers: dblaikie, hans

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244097 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Enable thread sanitizer on clang
Renato Golin [Wed, 5 Aug 2015 18:42:41 +0000 (18:42 +0000)]
[AArch64] Enable thread sanitizer on clang

With this option, clang can use -fsanitize=thread on AArch64.

Patch by Adhemerval Zanella.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244091 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoClaim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'
Douglas Katzman [Wed, 5 Aug 2015 18:03:47 +0000 (18:03 +0000)]
Claim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'

This seems preferable to printing two warnings per unsupported option-
one warning about not supporting it, and one about not using it.
It also makes the '-Wno-' option do what you mean.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244079 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[test] Attempt a change to see if it fixes the test for the windows bot.
Argyrios Kyrtzidis [Wed, 5 Aug 2015 17:52:57 +0000 (17:52 +0000)]
[test] Attempt a change to see if it fixes the test for the windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244076 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] First pass at adding support for clang bootstrap builds to CMake
Chris Bieneman [Wed, 5 Aug 2015 17:38:12 +0000 (17:38 +0000)]
[CMake] First pass at adding support for clang bootstrap builds to CMake

Summary:
This patch adds a new CLANG_ENABLE_BOOTSTRAP option to CMake which adds targets for building a stage2 bootstrap compiler. The targets are:

bootstrap-configure
bootstrap-build
bootstrap (same as bootstrap-configure and bootstrap-build)
bootstrap-install
bootstrap-check-llvm
bootstrap-check-clang
bootstrap-check-all

If you are using 3.3.20150708 or greater it utilizes the ninja USES_TERMINAL_* settings on the external project so that the output is properly buffered.

Reviewers: bogner, chandlerc

Subscribers: filcab, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244070 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[test/Index] Update libclang tests to use libclang for creating PCH files.
Argyrios Kyrtzidis [Wed, 5 Aug 2015 17:23:59 +0000 (17:23 +0000)]
[test/Index] Update libclang tests to use libclang for creating PCH files.

This is consistent and tests the primary configuration we want to test, libclang
creating and consuming PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244066 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a tiny bug in -no-canonical-prefixes that somehow we have never
Chandler Carruth [Wed, 5 Aug 2015 17:07:33 +0000 (17:07 +0000)]
Fix a tiny bug in -no-canonical-prefixes that somehow we have never
noticed until now.

The code for setting up the driver's InstalledDir didn't respect
-no-canonical-prefixes. Because of this, there are a few places in the
driver where we would unexpectedly form absolute paths, notably when
searching for and finding GCC installations to use, etc. The fix is
straightforward, and I've added this path to '-v' both so we can test it
sanely and so that it will be substantially more obvious the next time
someone has to debug something here.

Note that there is another bug that we don't actually *canonicalize* the
installed directory! I don't really want to fix that because I don't
have a realistic way to test the usage of this mode. I suspect that
folks using the shared module cache would care about getting this right
though, and so they might want to address it. I've left the appropriate
FIXMEs so that it is clear what to change, and I've updated the test
code to make it clear what is happening here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244065 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd missing atomic libcall support.
James Y Knight [Wed, 5 Aug 2015 16:57:36 +0000 (16:57 +0000)]
Add missing atomic libcall support.

Support for emitting libcalls for __atomic_fetch_nand and
__atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some
test cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244063 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SHAVE] uppercase the CHECK prefixes in 'lit' tests. NFC
Douglas Katzman [Wed, 5 Aug 2015 15:08:54 +0000 (15:08 +0000)]
[SHAVE] uppercase the CHECK prefixes in 'lit' tests. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244052 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDelete trailing whitespace
Douglas Katzman [Wed, 5 Aug 2015 15:08:53 +0000 (15:08 +0000)]
Delete trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244051 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOfficially end my reign as owner of the driver.
Chad Rosier [Wed, 5 Aug 2015 14:52:01 +0000 (14:52 +0000)]
Officially end my reign as owner of the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244049 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd AST matchers for narrowing constructors that are default, copy, or move construct...
Aaron Ballman [Wed, 5 Aug 2015 12:11:30 +0000 (12:11 +0000)]
Add AST matchers for narrowing constructors that are default, copy, or move constructors, as well as functionality to determine whether a ctor initializer is a base initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244036 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] ArrayRefize template param list info setters. No functionality change intended.
Benjamin Kramer [Wed, 5 Aug 2015 09:40:49 +0000 (09:40 +0000)]
[AST] ArrayRefize template param list info setters. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244028 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended.
Benjamin Kramer [Wed, 5 Aug 2015 09:40:35 +0000 (09:40 +0000)]
[AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244027 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] ArrayRefize template argument packs. No functionality change intended.
Benjamin Kramer [Wed, 5 Aug 2015 09:40:22 +0000 (09:40 +0000)]
[AST] ArrayRefize template argument packs. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244026 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Comments] Replace custom ArrayRef copying with ArrayRef::copy. NFC.
Benjamin Kramer [Wed, 5 Aug 2015 09:40:04 +0000 (09:40 +0000)]
[Comments] Replace custom ArrayRef copying with ArrayRef::copy. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244025 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Parse] ArrayRefize PragmaLoopHintInfo. No functionality change.
Benjamin Kramer [Wed, 5 Aug 2015 09:39:57 +0000 (09:39 +0000)]
[Parse] ArrayRefize PragmaLoopHintInfo. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244024 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't repeat function names in comments. NFC.
Filipe Cabecinhas [Wed, 5 Aug 2015 06:19:26 +0000 (06:19 +0000)]
Don't repeat function names in comments. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244018 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate mailing list references to lists.llvm.org
Tanya Lattner [Wed, 5 Aug 2015 03:55:23 +0000 (03:55 +0000)]
Update mailing list references to lists.llvm.org

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244000 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Fold memcpy into SmallVector initializer. No functionality change.
Benjamin Kramer [Tue, 4 Aug 2015 15:38:49 +0000 (15:38 +0000)]
[CodeGen] Fold memcpy into SmallVector initializer. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243992 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Add a crazy test case for r243987
Benjamin Kramer [Tue, 4 Aug 2015 15:18:16 +0000 (15:18 +0000)]
[Sema] Add a crazy test case for r243987

It's not valid code (maybe it can be made valid, but I'm not sure how).
To trigger the crash fixed in r243987 requires a friend function with
more than four template parameter lists. With this test we have at least
some coverage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243989 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Allocate SmallVector to the right size.
Benjamin Kramer [Tue, 4 Aug 2015 14:46:06 +0000 (14:46 +0000)]
[Sema] Allocate SmallVector to the right size.

SmallVector::set_size does not reallocate the vector. Sadly I have no
idea how to test this. The vector never has more than one member in all
of the regression tests.

Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243987 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] Really allocate a SmallVector to the right size.
Benjamin Kramer [Tue, 4 Aug 2015 13:34:50 +0000 (13:34 +0000)]
[AST] Really allocate a SmallVector to the right size.

set_size only resets the end pointer and asserts if it is used to grow
the buffer. This would crash when mangling a float with more than 80 bits,
add a test with a ppc double double (128 bits).

Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243979 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] Simplify code by letting ArrayRef do the copying.
Benjamin Kramer [Tue, 4 Aug 2015 12:59:41 +0000 (12:59 +0000)]
[AST] Simplify code by letting ArrayRef do the copying.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243974 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Don't write into a SmallVector's uninitialized memory.
Benjamin Kramer [Tue, 4 Aug 2015 12:34:30 +0000 (12:34 +0000)]
[CodeGen] Don't write into a SmallVector's uninitialized memory.

That's just ugly and not needed in this case. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243973 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ASTContext] Add a templated convenience wrapper for Allocate.
Benjamin Kramer [Tue, 4 Aug 2015 12:34:23 +0000 (12:34 +0000)]
[ASTContext] Add a templated convenience wrapper for Allocate.

This brings ASTContext closer to LLVM's Allocator concept. Ideally we
would just derive ASTContext from llvm::AllocatorBase, but that does
not work because ASTContext's allocator is mutable and we allocate using
const ASTContext& everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243972 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FileManager] Use StringRef::copy to store canonical paths.
Benjamin Kramer [Tue, 4 Aug 2015 11:27:08 +0000 (11:27 +0000)]
[FileManager] Use StringRef::copy to store canonical paths.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243970 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP 4.1] Support for 'linear' clause in loop directives.
Alexey Bataev [Tue, 4 Aug 2015 11:18:19 +0000 (11:18 +0000)]
[OPENMP 4.1] Support for  'linear' clause in loop directives.

OpenMP 4.1 allows 'linear' clause in loop directives. Patch adds support for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243969 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Edit] Use StringRef's copy method. No functional change intended.
Benjamin Kramer [Tue, 4 Aug 2015 11:18:09 +0000 (11:18 +0000)]
[Edit] Use StringRef's copy method. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243968 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AST] Use StringRef's convenient copy method. No functionality change.
Benjamin Kramer [Tue, 4 Aug 2015 10:22:38 +0000 (10:22 +0000)]
[AST] Use StringRef's convenient copy method. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243966 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Fix compiler crash during data-sharing attributes analysis.
Alexey Bataev [Tue, 4 Aug 2015 08:10:48 +0000 (08:10 +0000)]
[OPENMP] Fix compiler crash during data-sharing attributes analysis.

If a global variable is marked as private in OpenMP construct and then is used in of the private clauses of the same construct, it might cause compiler crash because of incorrect capturing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243964 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] Avoid a really broken call to realloc that would later result in
Chandler Carruth [Tue, 4 Aug 2015 03:53:04 +0000 (03:53 +0000)]
[UB] Avoid a really broken call to realloc that would later result in
a bad call to memcpy.

When we only have a buffer from one of the two reparse calls, we can
just return that buffer rather than going through the realloc/memcpy
dance.

Found with UBsan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243950 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] Guard two calls to memcpy in generated attribute code to handle
Chandler Carruth [Tue, 4 Aug 2015 03:53:01 +0000 (03:53 +0000)]
[UB] Guard two calls to memcpy in generated attribute code to handle
null StringRef objects as inputs.

Found by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243949 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] Another place where we were trying to put string data into
Chandler Carruth [Tue, 4 Aug 2015 03:53:00 +0000 (03:53 +0000)]
[UB] Another place where we were trying to put string data into
a BumpPtrAllocator. This at least now handles the case where there is no
concatentation without calling memcpy on a null pointer. It might be
interesting to handle the case where everything is empty without
round-tripping through the allocator, but it wasn't clear to me if the
pointer returned is significant in any way, so I've left it in
a conservatively more-correct state.

Again, found with UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243948 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] When attaching empty strings to the AST, use an empty StringRef
Chandler Carruth [Tue, 4 Aug 2015 03:52:58 +0000 (03:52 +0000)]
[UB] When attaching empty strings to the AST, use an empty StringRef
rather than forcing the bump pointer allocator to produce a viable
pointer. This also fixes UB when we would try to memcpy from the null
incoming StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243947 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] Fix the two ways that we would try to memcpy from a null buffer in
Chandler Carruth [Tue, 4 Aug 2015 03:52:56 +0000 (03:52 +0000)]
[UB] Fix the two ways that we would try to memcpy from a null buffer in
the nested name specifier code.

First, skip the entire thing when the input is empty.

Next, handle the case where we started off with a null buffer and a zero
capacity to skip copying and freeing.

This was found with UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243946 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[UB] Fix two cases of UB in copy/pasted code from SmallVector.
Chandler Carruth [Tue, 4 Aug 2015 03:52:52 +0000 (03:52 +0000)]
[UB] Fix two cases of UB in copy/pasted code from SmallVector.

We should really stop copying and pasting code around. =/

Found by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243945 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when the same...
Richard Smith [Tue, 4 Aug 2015 02:05:09 +0000 (02:05 +0000)]
[modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when the same anonymous union is defined across multiple modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243940 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused header include.
Argyrios Kyrtzidis [Tue, 4 Aug 2015 01:44:13 +0000 (01:44 +0000)]
Remove unused header include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243938 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDtor callback emitted when msan attribute not repressed for this function.
Naomi Musgrave [Mon, 3 Aug 2015 22:53:11 +0000 (22:53 +0000)]
Dtor callback emitted when msan attribute not repressed for this function.

Summary: In addition to checking compiler flags, the front-end also examines the attributes of the destructor definition to ensure that the SanitizeMemory attribute is attached.

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

refactored test into new file, revised how function attribute examined

modified test to examine default dtor with and without attribute

removed attribute check

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243912 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoX86: Teach X86 builtins which target features they require
Justin Bogner [Mon, 3 Aug 2015 22:26:06 +0000 (22:26 +0000)]
X86: Teach X86 builtins which target features they require

This adds the required target feature names to x86 builtins that need
particular features. Most have exactly one ("avx", "aes", etc), but some
of the avx512 features have multiple requirements, eg "avx512vl,avx512bw".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243908 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoGrammar: Don't imply that a program wouldn't want a person as its output.
Douglas Katzman [Mon, 3 Aug 2015 20:41:31 +0000 (20:41 +0000)]
Grammar: Don't imply that a program wouldn't want a person as its output.

(Because, hey, who wouldn't?)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243901 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.
Douglas Katzman [Mon, 3 Aug 2015 14:34:22 +0000 (14:34 +0000)]
[SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243878 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CONCEPTS] Add concept to VarDecl and diagnostic for uninitialized variable concept
Nathan Wilson [Mon, 3 Aug 2015 14:25:45 +0000 (14:25 +0000)]
[CONCEPTS] Add concept to VarDecl and diagnostic for uninitialized variable concept

Summary: Add IsConcept bit to VarDecl::NonParmVarDeclBitfields and associated isConcept/setConcept member functions. Set IsConcept to true when 'concept' specifier is in variable declaration. Create diagnostic when variable concept is not initialized.

Reviewers: fraggamuffin, hubert.reinterpretcast, faisalv, aaron.ballman, rsmith

Subscribers: aemerson, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243876 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdditional fix for PR14269: Crash on vector elements / global register vars in inline...
Andrey Bokhanko [Mon, 3 Aug 2015 10:38:10 +0000 (10:38 +0000)]
Additional fix for PR14269: Crash on vector elements / global register vars in inline assembler.

Compiler crashed when vector elements / global register vars were used in inline assembler with "m" restriction. This patch fixes this.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243870 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX512VLBW] add pack, cvt, mulhi and madd intrinsics
Asaf Badouh [Mon, 3 Aug 2015 07:51:00 +0000 (07:51 +0000)]
[X86][AVX512VLBW] add pack, cvt, mulhi and madd intrinsics

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243867 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix invalid shufflevector operands
Simon Pilgrim [Sun, 2 Aug 2015 15:28:10 +0000 (15:28 +0000)]
Fix invalid shufflevector operands

This patch fixes bug 23800 ( https://llvm.org/bugs/show_bug.cgi?id=23800#c2 ). There existed a case where the index operand from extractelement was directly used to create a shufflevector mask. Since the index can be of any integral type but the mask must only contain 32 bit integers a 64 bit index operand led to an assertion error later on.

Committed on behalf of mpflanzer (Moritz Pflanzer)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243851 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX512VLDQ] add reduce/range/cvt intrinsics
Asaf Badouh [Sun, 2 Aug 2015 12:43:08 +0000 (12:43 +0000)]
[X86][AVX512VLDQ] add reduce/range/cvt intrinsics
add 128 & 256 width intrinsic versions of reduce/range and cvt i64 to FP and vice versa

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243848 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRangify for loops, NFC.
Yaron Keren [Sat, 1 Aug 2015 19:11:36 +0000 (19:11 +0000)]
Rangify for loops, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243841 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r243827.
Davide Italiano [Sat, 1 Aug 2015 18:25:03 +0000 (18:25 +0000)]
Revert r243827.

Until I figure out what's the right way of updating this file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243840 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SemaExpr] Factor out common diagnostic code for remainder/division.
Davide Italiano [Sat, 1 Aug 2015 10:13:39 +0000 (10:13 +0000)]
[SemaExpr] Factor out common diagnostic code for remainder/division.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243832 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Create a mangling for extended vector types
David Majnemer [Sat, 1 Aug 2015 05:51:55 +0000 (05:51 +0000)]
[MS ABI] Create a mangling for extended vector types

Extended vector types are mangled just like normal vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243828 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConvertibility of nullptr_t to bool is available in clang. Note it.
Davide Italiano [Sat, 1 Aug 2015 05:48:03 +0000 (05:48 +0000)]
Convertibility of nullptr_t to bool is available in clang. Note it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243827 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse the reserved keyword spelling of 'typeof'
David Majnemer [Sat, 1 Aug 2015 05:31:56 +0000 (05:31 +0000)]
Use the reserved keyword spelling of 'typeof'

No functional change intended, just a drive-by cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243826 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Tests] Add explicit -std=lang option to a number of tests.
Yunzhong Gao [Sat, 1 Aug 2015 02:55:59 +0000 (02:55 +0000)]
[Tests] Add explicit -std=lang option to a number of tests.

This patch should not change the test results, but it is useful if clang's
default C++ language is ever changed from gnu++98.

Patch by: Charles Li

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150727/134667.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243819 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[libFuzzer] minimal documentation on data-flow-guided fuzzing
Kostya Serebryany [Fri, 31 Jul 2015 21:48:10 +0000 (21:48 +0000)]
[libFuzzer] minimal documentation on data-flow-guided fuzzing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243793 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest commit; wrap ellipses in comment with brackets
Nathan Wilson [Fri, 31 Jul 2015 20:00:02 +0000 (20:00 +0000)]
test commit; wrap ellipses in comment with brackets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243776 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDI: Update testcases for LLVM assembly change
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 18:59:37 +0000 (18:59 +0000)]
DI: Update testcases for LLVM assembly change

Update testcases after LLVM change r243774.

Most of these had no need to check `tag:` field, but did so as a way of
getting to the `name:` field.  In a few cases I've converted the `tag:`
checks to `arg:` or `CHECK-NOT: arg:`.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243775 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Hook clang up to the new EH instructions
David Majnemer [Fri, 31 Jul 2015 17:58:45 +0000 (17:58 +0000)]
[MS ABI] Hook clang up to the new EH instructions

The new EH instructions make it possible for LLVM to generate .xdata
tables that the MSVC personality routines will be happy about.  Because
this is experimental, hide it behind a -cc1 flag (-fnew-ms-eh).

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243767 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDI: Update for LLVM API change for local variables
Duncan P. N. Exon Smith [Fri, 31 Jul 2015 17:56:14 +0000 (17:56 +0000)]
DI: Update for LLVM API change for local variables

Adjust to LLVM DIBuilder API changes in r243764, using
`createAutoVariable()` and `createParameterVariable()` in place of
`createLocalVariable()`.  No real functionality change here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243765 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOutline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.
Alexey Bataev [Fri, 31 Jul 2015 08:42:25 +0000 (08:42 +0000)]
Outline function Parser::ParseCXXClassMemberDeclarationWithPragmas(), NFC.

Parsing of pragmas followed by a class member declaration is outlined into a separate function Parser::ParseCXXClassMemberDeclarationWithPragmas().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243739 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake sure the 2 method calls are sequenced.
Argyrios Kyrtzidis [Fri, 31 Jul 2015 01:39:23 +0000 (01:39 +0000)]
Make sure the 2 method calls are sequenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243727 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[modules] Fix issue where building a module from a relative path when -working-direct...
Argyrios Kyrtzidis [Fri, 31 Jul 2015 00:58:32 +0000 (00:58 +0000)]
[modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error.

The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://21330027

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243718 91177308-0d34-0410-b5e6-96231b3b80d8