]> granicus.if.org Git - clang/log
clang
9 years ago[SystemZ] Add support for z13 and its vector facility
Ulrich Weigand [Tue, 5 May 2015 19:35:52 +0000 (19:35 +0000)]
[SystemZ] Add support for z13 and its vector facility

This patch adds support for the z13 architecture type.  For compatibility
with GCC, a pair of options -mvx / -mno-vx can be used to selectively
enable/disable use of the vector facility.

When the vector facility is present, we default to the new vector ABI.
This is characterized by two major differences:
- Vector types are passed/returned in vector registers
  (except for unnamed arguments of a variable-argument list function).
- Vector types are at most 8-byte aligned.

The reason for the choice of 8-byte vector alignment is that the hardware
is able to efficiently load vectors at 8-byte alignment, and the ABI only
guarantees 8-byte alignment of the stack pointer, so requiring any higher
alignment for vectors would require dynamic stack re-alignment code.

However, for compatibility with old code that may use vector types, when
*not* using the vector facility, the old alignment rules (vector types
are naturally aligned) remain in use.

These alignment rules are not only implemented at the C language level,
but also at the LLVM IR level.  This is done by selecting a different
DataLayout string depending on whether the vector ABI is in effect or not.

Based on a patch by Richard Sandiford.

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

9 years agoAllow TransformTypos to ignore corrections to a specified VarDecl.
Kaelyn Takata [Tue, 5 May 2015 19:17:03 +0000 (19:17 +0000)]
Allow TransformTypos to ignore corrections to a specified VarDecl.

This is needed to prevent a TypoExpr from being corrected to a variable
when the TypoExpr is a subexpression of that variable's initializer.

Also exclude more keywords from the correction candidate pool when the
subsequent token is .* or ->* since keywords like "new" or "return"
aren't valid on the left side of those operators.

Fixes PR23140.

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

9 years ago[OPENMP] Allow use of macros in OpenMP directives/clauses.
Alexey Bataev [Tue, 5 May 2015 09:53:25 +0000 (09:53 +0000)]
[OPENMP] Allow use of macros in OpenMP directives/clauses.

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

9 years ago[OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 09:24:37 +0000 (09:24 +0000)]
[OPENMP] Fixed incorrect work with cleanups, NFC.

Destructors are never called for cleanups, so we can't use SmallVector as a member.
Differential Revision: http://reviews.llvm.org/D9399

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

9 years agoRevert revision 236487: [OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 08:48:39 +0000 (08:48 +0000)]
Revert revision 236487: [OPENMP] Fixed incorrect work with cleanups, NFC.

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

9 years agoclang-format: [JS] support optional methods.
Daniel Jasper [Tue, 5 May 2015 08:40:32 +0000 (08:40 +0000)]
clang-format: [JS] support optional methods.

Optional methods use ? tokens like this:

  interface X { y?(): z; }

It seems easiest to detect and disambiguate these from ternary
expressions by checking if the code is in a declaration context. Turns
out that that didn't quite work properly for interfaces in Java and JS,
and for JS file root contexts.

Patch by Martin Probst, thank you.

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

9 years ago[OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 08:38:22 +0000 (08:38 +0000)]
[OPENMP] Fixed incorrect work with cleanups, NFC.

Destructors are never called for cleanups, so we can't use SmallVector as a member.
Differential Revision: http://reviews.llvm.org/D9399

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

9 years agoclang-format: [JS] Do not collapse short interfaces.
Daniel Jasper [Tue, 5 May 2015 08:12:50 +0000 (08:12 +0000)]
clang-format: [JS] Do not collapse short interfaces.

Patch by Martin Probst.

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

9 years agoRevert revision 236482: [OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 06:32:45 +0000 (06:32 +0000)]
Revert revision 236482: [OPENMP] Fixed incorrect work with cleanups, NFC.

Due to some incompatibilities with Windows.

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

9 years ago[OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 06:21:01 +0000 (06:21 +0000)]
[OPENMP] Fixed incorrect work with cleanups, NFC.

Destructors are never called for cleanups, so we can't use SmallVector as a member.
Differential Revision: http://reviews.llvm.org/D9399

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

9 years agoRevert revision 236480: [OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 04:56:26 +0000 (04:56 +0000)]
Revert revision 236480: [OPENMP] Fixed incorrect work with cleanups, NFC.

Due to some incompatibilities with Windows.

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

9 years ago[OPENMP] Fixed incorrect work with cleanups, NFC.
Alexey Bataev [Tue, 5 May 2015 04:42:07 +0000 (04:42 +0000)]
[OPENMP] Fixed incorrect work with cleanups, NFC.

Destructors are never called for cleanups, so we can't use SmallVector as a member.
Differential Revision: http://reviews.llvm.org/D9399

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

9 years ago[OPENMP] Codegen for 'firstprivate' clause in 'task' directive.
Alexey Bataev [Tue, 5 May 2015 04:05:12 +0000 (04:05 +0000)]
[OPENMP] Codegen for 'firstprivate' clause in 'task' directive.

For tasks codegen for private/firstprivate variables are different rather than for other directives.

1. Build an internal structure of privates for each private variable:
struct .kmp_privates_t. {
  Ty1 var1;
  ...
  Tyn varn;
};
2. Add a new field to kmp_task_t type with list of privates.
struct kmp_task_t {
  void *              shareds;
  kmp_routine_entry_t routine;
  kmp_int32           part_id;
  kmp_routine_entry_t destructors;
  .kmp_privates_t.    privates;
};
3. Create a function with destructors calls for all privates after end of task region.
kmp_int32 .omp_task_destructor.(kmp_int32 gtid, kmp_task_t *tt) {
  ~Destructor(&tt->privates.var1);
  ...
  ~Destructor(&tt->privates.varn);
  return 0;
}
4. Perform initialization of all firstprivate fields (by simple copying for POD data, copy constructor calls for classes) + provide address of a destructor function after kmpc_omp_task_alloc() and before kmpc_omp_task() calls.
kmp_task_t *new_task = __kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry);

CopyConstructor(new_task->privates.var1, *new_task->shareds.var1_ref);
new_task->shareds.var1_ref = &new_task->privates.var1;
...
CopyConstructor(new_task->privates.varn, *new_task->shareds.varn_ref);
new_task->shareds.varn_ref = &new_task->privates.varn;

new_task->destructors = .omp_task_destructor.;
kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task)
Differential Revision: http://reviews.llvm.org/D9370

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

9 years ago[MS ABI] Cleanup selectBasePath
David Majnemer [Tue, 5 May 2015 01:39:20 +0000 (01:39 +0000)]
[MS ABI] Cleanup selectBasePath

Handle some common cases quickly when deeper introspection into the path
has no effect on the final result.

No functional change intended.

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

9 years agoFix buffer overflow in Lexer
Kostya Serebryany [Mon, 4 May 2015 22:30:29 +0000 (22:30 +0000)]
Fix buffer overflow in Lexer

Summary:
Fix PR22407, where the Lexer overflows the buffer when parsing
 #include<\
(end of file after slash)

Test Plan:
Added a test that will trigger in asan build.
This case is also covered by the clang-fuzzer bot.

Reviewers: rnk

Reviewed By: rnk

Subscribers: cfe-commits

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

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

9 years ago[clang-fuzzer] make clang-fuzzer slightly faster by removing one redundant directory...
Kostya Serebryany [Mon, 4 May 2015 21:14:45 +0000 (21:14 +0000)]
[clang-fuzzer] make clang-fuzzer slightly faster by removing one redundant directory scan

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

9 years agoUpdate MSVC compatibility doc note about exceptions
Reid Kleckner [Mon, 4 May 2015 20:53:51 +0000 (20:53 +0000)]
Update MSVC compatibility doc note about exceptions

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

9 years ago[modules] Don't bother registering loaded macros if there are none.
Richard Smith [Mon, 4 May 2015 19:58:00 +0000 (19:58 +0000)]
[modules] Don't bother registering loaded macros if there are none.

We don't yet have a reduced testcase for this.

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

9 years agoR600: Add fma and ldexp asic specific feature macros
Jan Vesely [Mon, 4 May 2015 19:53:36 +0000 (19:53 +0000)]
R600: Add fma and ldexp asic specific feature macros

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236453 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MS ABI] Fix a crash in vptr path calculation
David Majnemer [Mon, 4 May 2015 18:47:54 +0000 (18:47 +0000)]
[MS ABI] Fix a crash in vptr path calculation

I discovered a case where the old algorithm would crash.  Instead of
trying to patch the algorithm, rewrite it.  The new algorithm operates
in three phases:
1. Find all paths to the subobject with the vptr.
2. Remove paths which are subsets of other paths.
3. Select the best path where 'best' is defined as introducing the most
   covariant overriders.  If two paths introduce different overriders,
   raise a diagnostic.

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

9 years agoGet rid of compiler warning.
Serge Pavlov [Mon, 4 May 2015 17:39:55 +0000 (17:39 +0000)]
Get rid of compiler warning.

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

9 years agoInstantiate incomplete class used in template method.
Serge Pavlov [Mon, 4 May 2015 16:44:39 +0000 (16:44 +0000)]
Instantiate incomplete class used in template method.

If a class is absent from instantiation and is incomplete, instantiate it as
an incomplete class thus avoiding compiler crash.

This change fixes PR18653.

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

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

9 years agoReapply "Frontend: Stop leaking when not -disable-free"
Duncan P. N. Exon Smith [Mon, 4 May 2015 14:59:20 +0000 (14:59 +0000)]
Reapply "Frontend: Stop leaking when not -disable-free"

This reverts commit r236422, effectively reapplying r236419.  ASan
helped me diagnose the problem: the non-leaking logic would free the
ASTConsumer before freeing Sema whenever `isCurrentASTFile()`, causing a
use-after-free in `Sema::~Sema()`.

This version unconditionally frees Sema and the ASTContext before
freeing the ASTConsumer.  Without the fix, these were either being freed
before the ASTConsumer was freed or leaked after, but they were always
spiritually released so this isn't really a functionality change.

I ran all of check-clang with ASan locally this time, so I'm hoping
there aren't any more problems lurking.

Original commit message:

    Try again to plug a leak that's been around since at least r128011
    after coming across the FIXME.  Nico Weber tried something similar
    in r207065 but had to revert in r207070 due to a bot failure.

    The build failure isn't visible anymore so I'm not sure what went
    wrong.  I'm doing this slightly differently -- when not
    -disable-free I'm still resetting the members (just not leaking
    them) -- so maybe it will work out this time?  Tests pass locally,
    anyway.

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

9 years ago[analyzer] scan-build: support spaces in compiler path and arguments.
Anton Yartsev [Mon, 4 May 2015 13:37:36 +0000 (13:37 +0000)]
[analyzer] scan-build: support spaces in compiler path and arguments.

This fixes errors that occur if a path to the default compiler has spaces or if an argument with spaces is given to compiler (e.g. via -I). (http://reviews.llvm.org/D9357)

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

9 years agoRevert "Frontend: Stop leaking when not -disable-free"
Duncan P. N. Exon Smith [Mon, 4 May 2015 13:01:42 +0000 (13:01 +0000)]
Revert "Frontend: Stop leaking when not -disable-free"

This reverts commit r236419, since it caused some bots to fail.  On:

http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/26124
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/35086

these tests:

FAIL: Clang::import-decl.cpp
FAIL: Clang::floating-literal.c
FAIL: Clang::x86_64-linux-android.c

fail with this output:

Command Output (stderr):
--
Stack dump:
0.  Program arguments: /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/clang -cc1 -internal-isystem /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/../lib/clang/3.7.0/include -nostdsysteminc -ast-print -x ast -
/var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/tools/clang/test/Modules/Output/import-decl.cpp.script: line 3:  9665 Segmentation fault      (core dumped) /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/clang -cc1 -internal-isystem /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/../lib/clang/3.7.0/include -nostdsysteminc -ast-print -x ast - < /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/tools/clang/test/Modules/Output/import-decl.cpp.tmp.ast
      9666 Done                    | /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.obj/Release+Asserts/bin/FileCheck /var/lib/buildbot/slaves/hexagon-build-03/clang-hexagon-elf/llvm.src/tools/clang/test/Modules/import-decl.cpp

--

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

9 years agoFrontend: Stop leaking when not -disable-free
Duncan P. N. Exon Smith [Mon, 4 May 2015 12:36:56 +0000 (12:36 +0000)]
Frontend: Stop leaking when not -disable-free

Try again to plug a leak that's been around since at least r128011 after
coming across the FIXME.  Nico Weber tried something similar in r207065
but had to revert in r207070 due to a bot failure.

The build failure isn't visible anymore so I'm not sure what went wrong.
I'm doing this slightly differently -- when not -disable-free I'm still
resetting the members (just not leaking them) -- so maybe it will work
out this time?  Tests pass locally, anyway.

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

9 years agoclang-format: NFC: Delete FormatToken::IsForEachMacro. Use a TokenType instead.
Daniel Jasper [Mon, 4 May 2015 09:22:29 +0000 (09:22 +0000)]
clang-format: NFC: Delete FormatToken::IsForEachMacro. Use a TokenType instead.

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

9 years agoclang-format: NFC: Use default member initializers and other cleanups.
Daniel Jasper [Mon, 4 May 2015 08:51:40 +0000 (08:51 +0000)]
clang-format: NFC: Use default member initializers and other cleanups.

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

9 years agoclang-format: Force aligning different brackets relative to each other.
Daniel Jasper [Mon, 4 May 2015 07:39:00 +0000 (07:39 +0000)]
clang-format: Force aligning different brackets relative to each other.

Before:
  void SomeFunction(vector< // break
      int> v);

After:
  void SomeFunction(vector< // break
                        int> v);

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

9 years agoMention PPCallbacks interface change in release notes.
Richard Smith [Mon, 4 May 2015 03:18:47 +0000 (03:18 +0000)]
Mention PPCallbacks interface change in release notes.

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

9 years agoSwitch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in...
Richard Smith [Mon, 4 May 2015 03:15:40 +0000 (03:15 +0000)]
Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion.

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

9 years agoRename MacroDefinition -> MacroDefinitionRecord, Preprocessor::MacroDefinition -...
Richard Smith [Mon, 4 May 2015 02:25:31 +0000 (02:25 +0000)]
Rename MacroDefinition -> MacroDefinitionRecord, Preprocessor::MacroDefinition -> MacroDefinition.

clang::MacroDefinition now models the currently-defined value of a macro. The
previous MacroDefinition type, which represented a record of a macro definition
directive for a detailed preprocessing record, is now called MacroDefinitionRecord.

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

9 years agoclang-format function definition header. NFC.
Yaron Keren [Sat, 2 May 2015 19:29:29 +0000 (19:29 +0000)]
clang-format function definition header. NFC.

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

9 years agoReplace GetNumBytesInBuffer() in MicrosoftCXXNameMangler::mangleArgumentType by tell().
Yaron Keren [Sat, 2 May 2015 15:31:08 +0000 (15:31 +0000)]
Replace GetNumBytesInBuffer() in MicrosoftCXXNameMangler::mangleArgumentType by tell().

Using GetNumBytesInBuffer() assumes that the stream was not flushed between
the GetNumBytesInBuffer() calls, which may happen to be true or not,
depending on stream policy. tell() always reports the correct stream location.

Do note there are only two more uses of GetNumBytesInBuffer() in LLVM+clang, in
lib/MC/MCAsmStreamer.cpp and lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp.
The former may be replacable by tell (needs testing) but while the later can
not be immediatly replaced by tell() as it uses the absolute value of
GetNumBytesInBuffer() rather than the real stream position. Both uses seems
to depend upon flush policy and thus may not work correctly depending upon the
stream behaviour.

Going forward, GetNumBytesInBuffer() should probably be protected, non-accessible
to raw_ostream clients.

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

9 years agoclang-format: [JS] Fix calculation of template string width.
Daniel Jasper [Sat, 2 May 2015 08:05:38 +0000 (08:05 +0000)]
clang-format: [JS] Fix calculation of template string width.

OriginalColumn might not be set, so fall back to Location and SourceMgr
in case it is missing. Also initialize end column in case the token is
multi line, but it's the ` token itself that starts the multi line.

Patch by Martin Probst, thank you!

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

9 years agoclang-format: [JS] Fix templated parameter default values.
Daniel Jasper [Sat, 2 May 2015 07:54:58 +0000 (07:54 +0000)]
clang-format: [JS] Fix templated parameter default values.

Parameters can have templated types and default values (= ...), which is
another location in which a template closer should be followed by
whitespace.

Patch by Martin Probst, thank you.

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

9 years ago[MS ABI] Add testcase which was missing from r236354
David Majnemer [Sat, 2 May 2015 05:12:53 +0000 (05:12 +0000)]
[MS ABI] Add testcase which was missing from r236354

This test verifies that we can detect when the inheritance paths are
ambiguous due to covariant thunks, ensuring we don't regress PR16759.

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

9 years agoInstrProf: Cede ownership of createProfileWeights to CGF
Justin Bogner [Sat, 2 May 2015 05:00:55 +0000 (05:00 +0000)]
InstrProf: Cede ownership of createProfileWeights to CGF

The fact that PGO has a say in how these branch weights are determined
isn't interesting to most of CodeGen, so it makes more sense for this
API to be accessible via CodeGenFunction rather than CodeGenPGO.

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

9 years ago[modules] Remove dead code from Module for tracking macro import locations.
Richard Smith [Sat, 2 May 2015 02:08:26 +0000 (02:08 +0000)]
[modules] Remove dead code from Module for tracking macro import locations.

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

9 years ago[modules] Don't bother creating a ModuleMacro representing a #undef that overrides...
Richard Smith [Sat, 2 May 2015 01:14:40 +0000 (01:14 +0000)]
[modules] Don't bother creating a ModuleMacro representing a #undef that overrides nothing.

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

9 years agoFix -fobjc-arc doesn't work with -save-temps
Steven Wu [Sat, 2 May 2015 00:56:15 +0000 (00:56 +0000)]
Fix -fobjc-arc doesn't work with -save-temps

The underlying problem is that there is currently no way to run
ObjCARCContract from llvm bitcode which is required by ObjC ARC.
This fix the problem by always enable ObjCARCContract pass if
optimization is enabled. The ObjCARC Contract pass has almost no
overhead on code that is not using ARC.

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

9 years agoDiagnose delayed typos when parsing a postfix expression with an
Kaelyn Takata [Sat, 2 May 2015 00:49:18 +0000 (00:49 +0000)]
Diagnose delayed typos when parsing a postfix expression with an
unmatched l_paren before setting the LHS to ExprError().

Fixes PR23285.

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

9 years agoInstrProf: Use a locally tracked current count in ComputeRegionCounts
Justin Bogner [Sat, 2 May 2015 00:48:27 +0000 (00:48 +0000)]
InstrProf: Use a locally tracked current count in ComputeRegionCounts

No functional change. This just makes it more obvious that the logic
in ComputeRegionCounts only depends on the counter map and local
state.

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

9 years ago[modules] If a module #includes a modular header that #undef's its macro, it
Richard Smith [Sat, 2 May 2015 00:45:56 +0000 (00:45 +0000)]
[modules] If a module #includes a modular header that #undef's its macro, it
should not export the macro.

... at least, not unless we have local submodule visibility enabled.

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

9 years agoInstrProf: Replace the RegionCounter class with a simpler direct approach
Justin Bogner [Fri, 1 May 2015 23:41:09 +0000 (23:41 +0000)]
InstrProf: Replace the RegionCounter class with a simpler direct approach

This removes the RegionCounter class, which is only used as a helper
in teh ComputeRegionCounts stmt visitor. This class is just an extra
layer of abstraction that makes the code harder to follow at this
point, and removing it makes the logic quite a bit more direct.

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

9 years agoInstrProf: Add a couple of checks to this test
Justin Bogner [Fri, 1 May 2015 22:52:48 +0000 (22:52 +0000)]
InstrProf: Add a couple of checks to this test

"Don't crash" tests are silly, we might as well check that the
counters are consistent here.

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

9 years agoRemove some code left around for debugging purposes
David Majnemer [Fri, 1 May 2015 21:42:19 +0000 (21:42 +0000)]
Remove some code left around for debugging purposes

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

9 years ago[MS ABI] Detect and diagnose vftables which cannot be created
David Majnemer [Fri, 1 May 2015 21:35:45 +0000 (21:35 +0000)]
[MS ABI] Detect and diagnose vftables which cannot be created

The MSVC ABI has a bug introduced by appending to the end of vftables
which come from virtual bases: covariant thunks introduces via
non-overlapping regions of the inheritance lattice both append to the
same slot in the vftable.

It is possible to generate correct vftables in cases where one node in
the lattice completely dominates the other on the way to the base with
the vfptr; in all other cases, we must raise a diagnostic in order to
prevent the illusion that we succeeded in laying out the vftable.

This fixes PR16759.

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

9 years ago[MS ABI] NV bases may indirectly contain covariant thunks from V Bases
David Majnemer [Fri, 1 May 2015 21:35:41 +0000 (21:35 +0000)]
[MS ABI] NV bases may indirectly contain covariant thunks from V Bases

A class might contain multiple ways of getting to a vbase, some of which
are virtual and other non-virtual.  It may be the case that a
non-virtual base contains an override of a method in a vbase.  This
means that we must carefully pick between a set of nvbases to determine
which is the best.

As a consequence, the findPathForVPtr algorithm is considerably simpler.

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

9 years ago[modules] Add -fmodules-local-submodule-visibility flag.
Richard Smith [Fri, 1 May 2015 21:22:17 +0000 (21:22 +0000)]
[modules] Add -fmodules-local-submodule-visibility flag.

This flag specifies that the normal visibility rules should be used even for
local submodules (submodules of the currently-being-built module). Thus names
will only be visible if a header / module that declares them has actually been
included / imported, and not merely because a submodule that happened to be
built earlier declared those names. This also removes the need to modularize
bottom-up: textually-included headers will be included into every submodule
that includes them, since their include guards will not leak between modules.

So far, this only governs visibility of macros, not of declarations, so is not
ready for real use yet.

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

9 years agoARM: merge Cyclone into other ARMv8 CPUs and add tests for features.
Tim Northover [Fri, 1 May 2015 21:17:25 +0000 (21:17 +0000)]
ARM: merge Cyclone into other ARMv8 CPUs and add tests for features.

Cyclone actually supports all the goodies you'd expect to come with an AArch64
CPU, so it doesn't need its own clause. Also we should probably be testing
these clauses.

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

9 years agoAlso correct typos in the middle of a ternary expression when the RHS is invalid.
Kaelyn Takata [Fri, 1 May 2015 20:59:18 +0000 (20:59 +0000)]
Also correct typos in the middle of a ternary expression when the RHS is invalid.

The LHS was already being corrected before being set to ExprError when
the RHS is invalid, but when it was present the middle of a ternary
expression would be dropped in the error paths.

Fixes PR23350.

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

9 years agoAdjust the wording of the "brackets go after the unqualified-id" error message. It...
Nick Lewycky [Fri, 1 May 2015 20:47:19 +0000 (20:47 +0000)]
Adjust the wording of the "brackets go after the unqualified-id" error message. It applies in cases that aren't unqualified-ids.

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

9 years agoSuppress clang/test/OpenMP/task_private_codegen.cpp on win32 for now. Investigating.
NAKAMURA Takumi [Fri, 1 May 2015 19:44:13 +0000 (19:44 +0000)]
Suppress clang/test/OpenMP/task_private_codegen.cpp on win32 for now. Investigating.

I'm dubious in weird behavior with CHECK-DAG.

Also, it won't "REQUIRE non-ms-sdk". All of RUNs have "-triple darwin".

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

9 years agoEagerly correct typos in ParenExprs that may be type casts for non-C++ code.
Kaelyn Takata [Fri, 1 May 2015 19:36:25 +0000 (19:36 +0000)]
Eagerly correct typos in ParenExprs that may be type casts for non-C++ code.

This is needed to ensure the type casts are parsed properly. Fixes
PR23101.

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

9 years agoInstrProf: Fix a coverage crash where a macro begins in an unreachable block
Justin Bogner [Fri, 1 May 2015 19:23:34 +0000 (19:23 +0000)]
InstrProf: Fix a coverage crash where a macro begins in an unreachable block

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

9 years agoR600: Report fp64 on all capable asics
Jan Vesely [Fri, 1 May 2015 17:38:13 +0000 (17:38 +0000)]
R600: Report fp64 on all capable asics

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236325 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake helper functions static. NFC.
Benjamin Kramer [Fri, 1 May 2015 13:59:53 +0000 (13:59 +0000)]
Make helper functions static. NFC.

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

9 years agoASTReader.h: Prune "\param Complain" since r236300. [-Wdocumentation]
NAKAMURA Takumi [Fri, 1 May 2015 08:38:41 +0000 (08:38 +0000)]
ASTReader.h: Prune "\param Complain" since r236300. [-Wdocumentation]

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

9 years agoFix a few line endings. NFC.
Yunzhong Gao [Fri, 1 May 2015 02:04:32 +0000 (02:04 +0000)]
Fix a few line endings. NFC.

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

9 years ago[modules] Start moving the module visibility information off the Module itself.
Richard Smith [Fri, 1 May 2015 01:53:09 +0000 (01:53 +0000)]
[modules] Start moving the module visibility information off the Module itself.

It has no place there; it's not a property of the Module, and it makes
restoring the visibility set when we leave a submodule more difficult.

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

9 years agoInstrProf: This call does nothing, remove it
Justin Bogner [Fri, 1 May 2015 01:02:17 +0000 (01:02 +0000)]
InstrProf: This call does nothing, remove it

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

9 years agoInstrProf: Support for setting profile output from command line
Justin Bogner [Thu, 30 Apr 2015 23:49:42 +0000 (23:49 +0000)]
InstrProf: Support for setting profile output from command line

This change is the third of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.

This patch adds the necessary support to the clang frontend, and adds a
new test.

The compiler-rt and llvm parts are r236055 and r236288, respectively.

Patch by Teresa Johnson. Thanks!

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

9 years agoMake macro dumping robust against a nonexistent macro.
Richard Smith [Thu, 30 Apr 2015 23:42:10 +0000 (23:42 +0000)]
Make macro dumping robust against a nonexistent macro.

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

9 years agoFix -Wpessimizing-move by removing call to std::move
Richard Trieu [Thu, 30 Apr 2015 23:13:52 +0000 (23:13 +0000)]
Fix -Wpessimizing-move by removing call to std::move

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

9 years ago[modules] Add a mechanism to dump information about a macro.
Richard Smith [Thu, 30 Apr 2015 23:10:40 +0000 (23:10 +0000)]
[modules] Add a mechanism to dump information about a macro.

Wire this up to "#pragma clang __debug macro <name>".

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

9 years agoInstrProf: Fix handling of profile counters in the body of range based for
Justin Bogner [Thu, 30 Apr 2015 22:58:28 +0000 (22:58 +0000)]
InstrProf: Fix handling of profile counters in the body of range based for

We were assigning the counter for the body of the loop to the loop
variable initialization for some reason here, but our tests completely
lacked coverage for range-for loops. This fixes that and makes the
logic generally more similar to the logic for a regular for.

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

9 years agoRe-commit the test fix that went with r236274
Reid Kleckner [Thu, 30 Apr 2015 22:42:45 +0000 (22:42 +0000)]
Re-commit the test fix that went with r236274

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

9 years agoRevert most of r236271, leaving only the datalayout change in lib/Basic/Targets.cpp
Reid Kleckner [Thu, 30 Apr 2015 22:29:25 +0000 (22:29 +0000)]
Revert most of r236271, leaving only the datalayout change in lib/Basic/Targets.cpp

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

9 years agoUse 4 byte preferred aggregate alignment in datalayout on x86 Win32
Reid Kleckner [Thu, 30 Apr 2015 22:13:05 +0000 (22:13 +0000)]
Use 4 byte preferred aggregate alignment in datalayout on x86 Win32

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

9 years agoInstrProf: Make sure coverage propagates out of foreach loops correctly
Justin Bogner [Thu, 30 Apr 2015 21:31:02 +0000 (21:31 +0000)]
InstrProf: Make sure coverage propagates out of foreach loops correctly

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

9 years agoPR19691: initialize MacroDirective::DefInfo::IsPublic member in "invalid" state.
Richard Smith [Thu, 30 Apr 2015 20:53:28 +0000 (20:53 +0000)]
PR19691: initialize MacroDirective::DefInfo::IsPublic member in "invalid" state.

No functionality change; no-one inspects this field yet, and probably no-one
will ever inspect it in the "invalid" state, but ubsan could be unhappy about
this if such a DefInfo is copied.

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

9 years agoPR22354: Add a test that we emit copy-ctors for captures in generic lambdas.
Richard Smith [Thu, 30 Apr 2015 20:51:03 +0000 (20:51 +0000)]
PR22354: Add a test that we emit copy-ctors for captures in generic lambdas.

The bug was fixed by r235921.

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

9 years agoFix the end location of init-capture annotations in ObjC++
Ben Langmuir [Thu, 30 Apr 2015 18:40:23 +0000 (18:40 +0000)]
Fix the end location of init-capture annotations in ObjC++

And thereby stop asserting.

In ObjC++ modes, we tentatively parse the lambda introducer twice: once
to disambiguate designators, which we also do in C++, and a second time
to disambiguate objc message expressions. During the second tentative
parse, the last cached token will be the annotation token we built in
the first parse. So use getLastLoc() to get the correct end location
for the rebuilt annotation.

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

9 years agoRemove some leftover debugging code.
David Majnemer [Thu, 30 Apr 2015 18:16:38 +0000 (18:16 +0000)]
Remove some leftover debugging code.

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

9 years agoDon't warn about use of deprecated API when the containing context is unavailable.
Jordan Rose [Thu, 30 Apr 2015 17:20:35 +0000 (17:20 +0000)]
Don't warn about use of deprecated API when the containing context is unavailable.

This probably won't come up much, but it seems tidier.

Related to rdar://problem/20713550

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

9 years agoBatch up access-related diagnostics on enum constants until the whole enum is parsed.
Jordan Rose [Thu, 30 Apr 2015 17:20:30 +0000 (17:20 +0000)]
Batch up access-related diagnostics on enum constants until the whole enum is parsed.

That way we can take any trailing availability attributes into account.

rdar://problem/20713550

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

9 years ago[MS ABI] Correctly make paths through covariant virtual bases
David Majnemer [Thu, 30 Apr 2015 17:15:48 +0000 (17:15 +0000)]
[MS ABI] Correctly make paths through covariant virtual bases

There can be multiple virtual bases which are on the path to a vfptr
when one vbase virtually inherits from another.  We should prefer the
most derived virtual base which covariantly overrides a method in the
vfptr class;  if we do not lengthen the path this way, we will end up
with too few vftable entries.

This fixes PR21073.

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

9 years ago[AST] Fix some typos
David Majnemer [Thu, 30 Apr 2015 17:15:46 +0000 (17:15 +0000)]
[AST] Fix some typos

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

9 years agoAVX-512: Added AVX-512 intrinsics and tests
Elena Demikhovsky [Thu, 30 Apr 2015 09:24:29 +0000 (09:24 +0000)]
AVX-512: Added AVX-512 intrinsics and tests
by Asaf Badouh (asaf.badouh@intel.com)

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

9 years agoclang-format: Don't merge short else blocks.
Daniel Jasper [Thu, 30 Apr 2015 09:24:17 +0000 (09:24 +0000)]
clang-format: Don't merge short else blocks.

Before (with the appropriate flags settings):
  if (a) {
    f();
  } else { g(); }

Before (with other appropriate flags settings):
  if (a) { f(); } else {
    g();
  }

After:
  if (a) {
    f();
  } else {
    g();
  }

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

9 years ago[OPENMP] Mark test as not compatible with MS Windows.
Alexey Bataev [Thu, 30 Apr 2015 08:35:10 +0000 (08:35 +0000)]
[OPENMP] Mark test as not compatible with MS Windows.

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

9 years ago[OPENMP] Codegen for 'private' clause in 'task' directive.
Alexey Bataev [Thu, 30 Apr 2015 06:51:57 +0000 (06:51 +0000)]
[OPENMP] Codegen for 'private' clause in 'task' directive.

For tasks codegen for private/firstprivate variables are different rather than for other directives.

1. Build an internal structure of privates for each private variable:
struct .kmp_privates_t. {
  Ty1 var1;
  ...
  Tyn varn;
};
2. Add a new field to kmp_task_t type with list of privates.
struct kmp_task_t {
  void *              shareds;
  kmp_routine_entry_t routine;
  kmp_int32           part_id;
  kmp_routine_entry_t destructors;
  .kmp_privates_t.    privates;
};
3. Create a function with destructors calls for all privates after end of task region.
kmp_int32 .omp_task_destructor.(kmp_int32 gtid, kmp_task_t *tt) {
  ~Destructor(&tt->privates.var1);
  ...
  ~Destructor(&tt->privates.varn);
  return 0;
}
4. Perform default initialization of all private fields (no initialization for POD data, default constructor calls for classes) + provide address of a destructor function after kmpc_omp_task_alloc() and before kmpc_omp_task() calls.
kmp_task_t *new_task = __kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry);

DefaultConstructor(new_task->privates.var1);
new_task->shareds.var1_ref = &new_task->privates.var1;
...
DefaultConstructor(new_task->privates.varn);
new_task->shareds.varn_ref = &new_task->privates.varn;

new_task->destructors = .omp_task_destructor.;
kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task)

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

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

9 years ago[OPENMP] Allow to use global variables as lcv in loop-based directives.
Alexey Bataev [Thu, 30 Apr 2015 04:23:23 +0000 (04:23 +0000)]
[OPENMP] Allow to use global variables as lcv in loop-based directives.

For proper codegen we need to capture variable in the OpenMP region. In loop-based directives loop control variables are private by default and they must be captured in this region. There was a problem with capturing of globals, used as lcv, as they was not marked as private by default.
Differential Revision: http://reviews.llvm.org/D9336

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

9 years ago[OPENMP] Fixed codegen for 'copyprivate' clause.
Alexey Bataev [Thu, 30 Apr 2015 03:47:32 +0000 (03:47 +0000)]
[OPENMP] Fixed codegen for 'copyprivate' clause.

Fixed initialization of 'single' region completion + changed type of the third argument of __kmpc_copyprivate() runtime function to size_t.

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

9 years agoRemove dead code: a MacroDirective can't be imported or ambiguous any more.
Richard Smith [Thu, 30 Apr 2015 02:16:23 +0000 (02:16 +0000)]
Remove dead code: a MacroDirective can't be imported or ambiguous any more.

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

9 years agoRemove XFAIL now that this test passes (fixed by r236184).
Richard Smith [Thu, 30 Apr 2015 01:15:19 +0000 (01:15 +0000)]
Remove XFAIL now that this test passes (fixed by r236184).

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

9 years agoFix use of uninitialized variable, found by ubsan selfhost.
Richard Smith [Thu, 30 Apr 2015 00:57:08 +0000 (00:57 +0000)]
Fix use of uninitialized variable, found by ubsan selfhost.

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

9 years agoUse a more reliable method to determine whether
Sean Callanan [Thu, 30 Apr 2015 00:44:21 +0000 (00:44 +0000)]
Use a more reliable method to determine whether
a FileID corresponds to a real file or to a
memory buffer.  The old method didn't work when
Clang was built Release, which meant it wasn't
a very good method at all.

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

9 years agoUpdate clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp to pass for targeting...
NAKAMURA Takumi [Wed, 29 Apr 2015 23:55:46 +0000 (23:55 +0000)]
Update clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp to pass for targeting i686.

r236155 missed the suffix in "@llvm.memcpy.p0i8.p0i8.i32".

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

9 years agoAdd an assert to get information on buildbot failure.
Richard Smith [Wed, 29 Apr 2015 23:40:48 +0000 (23:40 +0000)]
Add an assert to get information on buildbot failure.

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

9 years agoPropagate a terrible hack to the sparc target feature handling code
Eric Christopher [Wed, 29 Apr 2015 23:32:17 +0000 (23:32 +0000)]
Propagate a terrible hack to the sparc target feature handling code
by erasing the soft-float target feature if the rest of the front
end added it because of defaults or the soft float option.

Add some testing for some of the targets that implement this hack.

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

9 years agoFix unused variable warning.
Richard Smith [Wed, 29 Apr 2015 23:26:13 +0000 (23:26 +0000)]
Fix unused variable warning.

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

9 years ago[modules] Stop trying to fake up a linear MacroDirective history.
Richard Smith [Wed, 29 Apr 2015 23:20:19 +0000 (23:20 +0000)]
[modules] Stop trying to fake up a linear MacroDirective history.

Modules builds fundamentally have a non-linear macro history. In the interest
of better source fidelity, represent the macro definition information
faithfully: we have a linear macro directive history within each module, and at
any point we have a unique "latest" local macro directive and a collection of
visible imported directives. This also removes the attendent complexity of
attempting to create a correct MacroDirective history (which we got wrong
in the general case).

No functionality change intended.

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

9 years agoXFAIL Hexagon until more codegen in place.
Rick Foos [Wed, 29 Apr 2015 22:54:40 +0000 (22:54 +0000)]
XFAIL Hexagon until more codegen in place.

Summary:
Hexagon is being updated, but there is not enough to pass these tests.
These sections are now on top of Colin's list.

Test Plan: Ran changes on hexagon-build-03.

Reviewers: colinl, rfoos

Reviewed By: rfoos

Subscribers: cfe-commits

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

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

9 years agoRevert r236128, LLVM isn't falling back in the right way
Reid Kleckner [Wed, 29 Apr 2015 21:55:21 +0000 (21:55 +0000)]
Revert r236128, LLVM isn't falling back in the right way

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

9 years ago[opaque pointer type] update for LLVM API change
David Blaikie [Wed, 29 Apr 2015 21:22:47 +0000 (21:22 +0000)]
[opaque pointer type] update for LLVM API change

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

9 years agoRevert r236060, it caused PR23375.
Nico Weber [Wed, 29 Apr 2015 21:16:40 +0000 (21:16 +0000)]
Revert r236060, it caused PR23375.

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

9 years agoStop assuming a 64-bit target here.
Richard Smith [Wed, 29 Apr 2015 20:49:22 +0000 (20:49 +0000)]
Stop assuming a 64-bit target here.

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

9 years agoPR23373: A defaulted union copy constructor that is not trivial must still be
Richard Smith [Wed, 29 Apr 2015 19:26:57 +0000 (19:26 +0000)]
PR23373: A defaulted union copy constructor that is not trivial must still be
emitted as a memcpy.

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