]> granicus.if.org Git - clang/log
clang
10 years agotest: add -std=c++11
Saleem Abdulrasool [Fri, 24 Oct 2014 19:54:29 +0000 (19:54 +0000)]
test: add -std=c++11

This test uses C++11 features (r-value references) in ObjC++.  Add a -std=c++11
to silence a warning.  NFC.

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

10 years agoCodeGen: GLValue exprs in template parameters should have reference type
David Majnemer [Fri, 24 Oct 2014 19:49:04 +0000 (19:49 +0000)]
CodeGen: GLValue exprs in template parameters should have reference type

This fixes a corner-case where __uuidof as a template argument would
result in us trying to emit a GLValue as an RValue.  This would lead to
a crash down the road.

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

10 years agoFix windows-cross.c test on my machine
Reid Kleckner [Fri, 24 Oct 2014 17:55:29 +0000 (17:55 +0000)]
Fix windows-cross.c test on my machine

I suspect it will need a custom sysroot to pass reliably elsewhere.

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

10 years agoAdd frontend support for __vectorcall
Reid Kleckner [Fri, 24 Oct 2014 17:42:17 +0000 (17:42 +0000)]
Add frontend support for __vectorcall

Wire it through everywhere we have support for fastcall, essentially.

This allows us to parse the MSVC "14" CTP headers, but we will
miscompile them because LLVM doesn't support __vectorcall yet.

Reviewed By: Aaron Ballman

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

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

10 years agoUse enumerators instead of hardcoded integers when processing macro names.
Serge Pavlov [Fri, 24 Oct 2014 17:31:32 +0000 (17:31 +0000)]
Use enumerators instead of hardcoded integers when processing macro names.

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

10 years ago[Modules] Free modules that failed signature verification.
Benjamin Kramer [Fri, 24 Oct 2014 16:31:42 +0000 (16:31 +0000)]
[Modules] Free modules that failed signature verification.

The control flow and ownership is weird enough so unique_ptr doesn't help here :(

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

10 years ago[mips] Mark aggregate arguments passed in registers with the inreg attribute
Daniel Sanders [Fri, 24 Oct 2014 15:30:16 +0000 (15:30 +0000)]
[mips] Mark aggregate arguments passed in registers with the inreg attribute

Summary:
This allows us to easily identify them in the backend which in turn allows us
to handle them correctly for big-endian targets (where they must be shifted
into the upper bits of the register).

Depends on D5961

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

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

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

10 years ago[mips] Promote all integral/enumeration types to the GPR width
Daniel Sanders [Fri, 24 Oct 2014 14:42:42 +0000 (14:42 +0000)]
[mips] Promote all integral/enumeration types to the GPR width

Summary:
Ensure all integral/enumeration types are appropriately annotated with
signext/zeroext. In particular, i32 now has these attributes when using the
N32/N64 ABI. This paves the way for accurately representing the way the
N32/N64 ABI's promotes integer arguments to i64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits, theraven

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

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

10 years agoFix initializing TypeOfTypeLoc
Olivier Goffart [Fri, 24 Oct 2014 13:52:55 +0000 (13:52 +0000)]
Fix initializing TypeOfTypeLoc

This fixes a crash in the RecursiveASTVisitor on such code
 __typeof__(struct F*) var[invalid];

The UnderlyingTInfo of a TypeOfTypeLoc was left uninitialized when
created from ASTContext::getTrivialTypeSourceInfo
This lead to a crash in RecursiveASTVisitor when trying to access it.

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

10 years agoASTMatchers: Peel off a layer of indirection from true matcher. NFC.
Benjamin Kramer [Fri, 24 Oct 2014 13:29:21 +0000 (13:29 +0000)]
ASTMatchers: Peel off a layer of indirection from true matcher. NFC.

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

10 years agoASTMatchers: for-rangify loops. No functionality change.
Benjamin Kramer [Fri, 24 Oct 2014 13:29:15 +0000 (13:29 +0000)]
ASTMatchers: for-rangify loops. No functionality change.

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

10 years agoAdd arguments() to CXXConstructExpr so the same interface as with CallExpr can be...
Benjamin Kramer [Fri, 24 Oct 2014 13:29:07 +0000 (13:29 +0000)]
Add arguments() to CXXConstructExpr so the same interface as with CallExpr can be used.

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

10 years agoReport when a function-try-block does not return a value on all control paths. Fixed...
Aaron Ballman [Fri, 24 Oct 2014 13:19:19 +0000 (13:19 +0000)]
Report when a function-try-block does not return a value on all control paths. Fixed PR14620.

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

10 years ago[Thumb] Clang thinks "char" is signed when using a thumb triple
Oliver Stannard [Fri, 24 Oct 2014 11:28:47 +0000 (11:28 +0000)]
[Thumb] Clang thinks "char" is signed when using a thumb triple

'char' is unsigned on all ARM and Thumb architectures. Clang gets this
right for ARM, and for thumb when using and arm triple and the -mthumb
option, but gets it wrong for thumb triples. This fixes that.

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

10 years ago[CMake] clangRewrite: Roll back clangAST in libdeps, due to clang::Stmt::printPretty().
NAKAMURA Takumi [Fri, 24 Oct 2014 08:44:01 +0000 (08:44 +0000)]
[CMake] clangRewrite: Roll back clangAST in libdeps, due to clang::Stmt::printPretty().

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

10 years agoDriver: add missed file from previous commit
Saleem Abdulrasool [Fri, 24 Oct 2014 03:24:33 +0000 (03:24 +0000)]
Driver: add missed file from previous commit

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

10 years agoDriver: add CrossWindowsToolChain
Saleem Abdulrasool [Fri, 24 Oct 2014 03:13:37 +0000 (03:13 +0000)]
Driver: add CrossWindowsToolChain

This is a very basic toolchain.  It supports cross-compiling Windows (primarily
inspired by the WoA target).  It is meant to use clang with the LLVM IAS and a
binutils ld-compatible interface for the linker (eventually to be lld).  It does
not perform any "standard" GCC lookup, nor does it perform any special
adjustments given that it is expected to be used in an environment where the
user is using MSVCRT (and as such Visual Studio headers) and the Windows SDK.
The primary runtime library is expected to be compiler-rt and the C++
implementation to be libc++.

It also expects that a sysroot has been setup given the usual Unix semantics
(standard C headers in /usr/include, all the import libraries available in
/usr/lib).  It also expects that an entry point stub is present in /usr/lib
(crtbegin.obj for executables, crtbeginS.obj for shared libraries).

The entry point stub is responsible for running any GNU constructors.

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

10 years agoAdd a new -fmerge-functions -cc1 flag that enables function merging.
Nick Lewycky [Fri, 24 Oct 2014 00:49:29 +0000 (00:49 +0000)]
Add a new -fmerge-functions -cc1 flag that enables function merging.

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

10 years agoDon't emit strong vtable definitions for imported classes with key functions (PR21355)
Hans Wennborg [Thu, 23 Oct 2014 22:40:46 +0000 (22:40 +0000)]
Don't emit strong vtable definitions for imported classes with key functions (PR21355)

Clang would previously assert on the following code when targeting MinGW:

  struct __declspec(dllimport) S {
      virtual ~S();
  };
  S::~S() {}

Because ~S is a key function and the class is dllimport, we would try to emit a
strong definition of the vtable, with dllimport - which is a conflict. We
should not emit strong vtable definitions for imported classes.

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

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

10 years agoDriver: Include driver diagnostics when we --serialize-diagnostics
Justin Bogner [Thu, 23 Oct 2014 22:20:11 +0000 (22:20 +0000)]
Driver: Include driver diagnostics when we --serialize-diagnostics

Currently, when --serialize-diagnostics is passed this only includes
the diagnostics from clang -cc1, and driver diagnostics are
dropped. This causes issues for tools that use the serialized
diagnostics, since stderr is lost and these diagnostics aren't seen at
all.

We handle this by merging the diagnostics from the CC1 process and the
driver diagnostics into a single file when the driver invokes CC1.

Fixes rdar://problem/10585062

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

10 years ago[modules] Simplify reading of INPUT_FILE_OFFSETS record and make it robust against...
Richard Smith [Thu, 23 Oct 2014 22:18:29 +0000 (22:18 +0000)]
[modules] Simplify reading of INPUT_FILE_OFFSETS record and make it robust against changes to record order.

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

10 years agoFactor out common checks from module map deserialization. No functionality change.
Richard Smith [Thu, 23 Oct 2014 22:12:14 +0000 (22:12 +0000)]
Factor out common checks from module map deserialization. No functionality change.

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

10 years agoclang-format: Fix incorrect space after "<".
Daniel Jasper [Thu, 23 Oct 2014 20:22:22 +0000 (20:22 +0000)]
clang-format: Fix incorrect space after "<".

Before:
  bool a = 2 <::SomeFunction();

After:
  bool a = 2 < ::SomeFunction();

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

10 years agoRemove code duplication and cut dependency from clangRewrite on
Daniel Jasper [Thu, 23 Oct 2014 19:47:36 +0000 (19:47 +0000)]
Remove code duplication and cut dependency from clangRewrite on
clangAST.

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

10 years agopatch to issue warning on comparing parameters with
Fariborz Jahanian [Thu, 23 Oct 2014 19:00:10 +0000 (19:00 +0000)]
patch to issue warning on comparing parameters with
nonnull attribute when comparison is always
true/false. Patch by Steven Wu with few fixes and minor
refactoring and adding tests by me. rdar://18712242

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

10 years agoAdd a "signature" to AST files to verify that they haven't changed
Ben Langmuir [Thu, 23 Oct 2014 18:05:36 +0000 (18:05 +0000)]
Add a "signature" to AST files to verify that they haven't changed

Since the order of the IDs in the AST file (e.g. DeclIDs, SelectorIDs)
is not stable, it is not safe to load an AST file that depends on
another AST file that has been rebuilt since the importer was built,
even if "nothing changed". We previously used size and modtime to check
this, but I've seen cases where a module rebuilt quickly enough to foil
this check and caused very hard to debug build errors.

To save cycles when we're loading the AST, we just generate a random
nonce value and check that it hasn't changed when we load an imported
module, rather than actually hash the whole file.

This is slightly complicated by the fact that we need to verify the
signature inside addModule, since we might otherwise consider that a
mdoule is "OutOfDate" when really it is the importer that is out of
date. I didn't see any regressions in module load time after this
change.

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

10 years agoDebugInfo: Correctly describe the lexical decl context of static member variable...
David Blaikie [Thu, 23 Oct 2014 16:39:49 +0000 (16:39 +0000)]
DebugInfo: Correctly describe the lexical decl context of static member variable definitions.

The previous IR representation used the non-lexical decl context, which
placed the definitions in the same scope as the declarations (ie: within
the class) - this was hidden by the fact that LLVM currently doesn't
respect the context of global variable definitions at all, and always
puts them at the top level (as direct children of the compile_unit).
Having the correct lexical scope improves source fidelity and simplify
backend global variable emission (with changes coming shortly).

Doing something similar for non-member global variables would help
simplify/cleanup things further (see FIXME in the commit) and provide
similar source fidelity benefits to the final debug info.

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

10 years agoRevert accidentally-committed files in r220460.
Richard Smith [Thu, 23 Oct 2014 02:02:31 +0000 (02:02 +0000)]
Revert accidentally-committed files in r220460.

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

10 years agoRefactor implementation of 'exclude header'.
Richard Smith [Thu, 23 Oct 2014 02:01:19 +0000 (02:01 +0000)]
Refactor implementation of 'exclude header'.

This was not a real header role, and was never exposed to clients of ModuleMap.
Remove the enumeration value for it and track it as marking the header as
'known' rather than creating an extra KnownHeader entry that *every single*
client ignores.

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

10 years agoFix covered-switch warning.
Richard Smith [Thu, 23 Oct 2014 01:03:45 +0000 (01:03 +0000)]
Fix covered-switch warning.

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

10 years agoRevert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is...
Alexey Samsonov [Thu, 23 Oct 2014 00:46:10 +0000 (00:46 +0000)]
Revert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.

This is a sad thing to do, but all the alternatives look ugly.

Looks like there are legitimate cases when users may want to link
with sanitizer runtimes *and* -nodefaultlibs (and ensure they provide
replacements for system libraries). For example, this happens in libc++
test suite.

"-nodefaultlibs" is told to link only the libraries explicitly provided
by the user, and providing "-fsanitize=address" is a clear indication of
intention to link with ASan runtime.
We can't easily introduce analogue of "-print-libgcc-name": linking with
sanitizers runtimes is not trivial: some runtimes are split into several
archive libraries, which are required to be wrapped in
-whole-archive/-no-whole-archive.

If "-fsanitize=whatever" and "-nodefaultlibs" are provided, system library
dependencies of sanitizer runtimes (-lc/-ldl/-lpthread/-lrt) will *not* be
linked, and user would have to link them in manually. Note that this can
cause problems, as failing to provide "-lrt" might lead to crashes in runtime
during ASan initialization. But looks like we should bite this bullet.

See r218541 review thread for the discussion.

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

10 years agoUpdate the documentation for API change to CreateASTConsumer the rest of the way.
Nick Lewycky [Wed, 22 Oct 2014 23:57:14 +0000 (23:57 +0000)]
Update the documentation for API change to CreateASTConsumer the rest of the way.

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

10 years agoTest files I forgot to svn add in r220448.
Richard Smith [Wed, 22 Oct 2014 23:52:04 +0000 (23:52 +0000)]
Test files I forgot to svn add in r220448.

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

10 years ago[modules] Add support for 'textual header' directives.
Richard Smith [Wed, 22 Oct 2014 23:50:56 +0000 (23:50 +0000)]
[modules] Add support for 'textual header' directives.

This allows a module to specify that it logically contains a file, but that
said file is non-modular and intended for textual inclusion. This allows
layering checks to work properly in the presence of such files.

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

10 years agoBasic: Add ext_delete_void_ptr_operand to -Wdelete-incomplete
David Majnemer [Wed, 22 Oct 2014 23:03:58 +0000 (23:03 +0000)]
Basic: Add ext_delete_void_ptr_operand to -Wdelete-incomplete

This fixes PR21340.

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

10 years agoFix C++ compliance issue. string literals must be const char *
Zachary Turner [Wed, 22 Oct 2014 21:48:56 +0000 (21:48 +0000)]
Fix C++ compliance issue.  string literals must be const char *

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

10 years agoParse: Ignore "long" and "short" in #pragma section
David Majnemer [Wed, 22 Oct 2014 21:08:43 +0000 (21:08 +0000)]
Parse: Ignore "long" and "short" in #pragma section

This fixes PR21337.

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

10 years agoRemoving the setLBracLoc and setRBracLoc functions from CompoundStmt -- their only...
Aaron Ballman [Wed, 22 Oct 2014 21:06:18 +0000 (21:06 +0000)]
Removing the setLBracLoc and setRBracLoc functions from CompoundStmt -- their only use was with the AST reader, and friendship can be used to handle that. Drive-by rename of "Brac" to "Brace" for the private data members. NFC.

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

10 years agoFix up attribute documentation links to MSDN in a nicer way
Reid Kleckner [Wed, 22 Oct 2014 20:54:25 +0000 (20:54 +0000)]
Fix up attribute documentation links to MSDN in a nicer way

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

10 years agoMake a good guess about where MSVC and Windows SDK libraries are for linking.
Zachary Turner [Wed, 22 Oct 2014 20:40:43 +0000 (20:40 +0000)]
Make a good guess about where MSVC and Windows SDK libraries are for linking.

When a user has not configured a standard Visual Studio environment
by running vcvarsall, clang tries its best to find Visual Studio
include files and executables anyway.  This patch makes clang also
try to find system and Windows SDK libraries for linking against,
as well.

Reviewed by: Hans Wennborg
Differential Revision: http://reviews.llvm.org/D5873

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

10 years agoResubmit "Improve Windows toolchain support for non-standard environments."
Zachary Turner [Wed, 22 Oct 2014 20:40:28 +0000 (20:40 +0000)]
Resubmit "Improve Windows toolchain support for non-standard environments."

This resubmits change r220226.  That change broke the chromium
build bots because chromium it ships an hermetic MSVC toolchain
that it expects clang to fallback to by finding it on the path.

This patch fixes the issue by bumping up the prioritization of PATH
when looking for MSVC binaries.

Reviewed by: Hans Wennborg, Reid Kleckner
Differential Revision: http://reviews.llvm.org/D5892

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

10 years agoCreate a documentation category for the new calling convention documentation. Drive...
Aaron Ballman [Wed, 22 Oct 2014 20:33:24 +0000 (20:33 +0000)]
Create a documentation category for the new calling convention documentation. Drive-by fixing of duplicate target names from a previous commit.

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

10 years agoAdd support for profiling the matchers used.
Samuel Benzaquen [Wed, 22 Oct 2014 20:31:05 +0000 (20:31 +0000)]
Add support for profiling the matchers used.

Summary:
Add support for profiling the matchers used.
This will be connected with clang-tidy to generate a report to determine
and debug slow checks.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

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

10 years agoTry to fix link errors in mingw cmake -DBUILD_SHARED_LIBS=ON
Reid Kleckner [Wed, 22 Oct 2014 20:20:35 +0000 (20:20 +0000)]
Try to fix link errors in mingw cmake -DBUILD_SHARED_LIBS=ON

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

10 years agoAdd documentation for calling convention attributes
Reid Kleckner [Wed, 22 Oct 2014 20:14:27 +0000 (20:14 +0000)]
Add documentation for calling convention attributes

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

10 years agoRemove unused DiagnosticsEngine::NumErrorsSuppressed member.
Rafael Espindola [Wed, 22 Oct 2014 20:09:12 +0000 (20:09 +0000)]
Remove unused DiagnosticsEngine::NumErrorsSuppressed member.

Patch by Brad King!

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

10 years agoCorrect importing of the type of a TemplateArgument
David Blaikie [Wed, 22 Oct 2014 19:54:16 +0000 (19:54 +0000)]
Correct importing of the type of a TemplateArgument

It's not clear how this would be tested - I imagine we should have an
ASTImporter test that RAVs the new AST and checks that all the elements
in it are from this ASTContext and not the foreign one... but I know
little about the ASTImporter and how/where that testing might be done.

(post-commit review feedback from Richard Smith on r219900)

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

10 years agoDebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)
David Blaikie [Wed, 22 Oct 2014 19:34:33 +0000 (19:34 +0000)]
DebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)

I haven't done any actual impact analysis of this change as it's a
strict improvement, but I'd be curious to know how much it helps.

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

10 years agoFixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist.
Alexey Samsonov [Wed, 22 Oct 2014 19:34:25 +0000 (19:34 +0000)]
Fixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist.

This also handles the case where function name (not its body)
is obtained from macro expansion.

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

10 years agoSanitizerBlacklist: Use spelling location for blacklisting purposes.
Alexey Samsonov [Wed, 22 Oct 2014 18:26:07 +0000 (18:26 +0000)]
SanitizerBlacklist: Use spelling location for blacklisting purposes.

When SanitizerBlacklist decides if the SourceLocation is blacklisted,
we need to first turn it into a SpellingLoc before fetching the filename
and scanning "src:" entries. Otherwise we will fail to fecth the
correct filename for function definitions coming from macro expansion.

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

10 years agoReland r219810 "Fix late template parsing leak with incremental processing"
Reid Kleckner [Wed, 22 Oct 2014 17:50:19 +0000 (17:50 +0000)]
Reland r219810 "Fix late template parsing leak with incremental processing"

Original message:
Add a second late template parser callback meant to cleanup any
resources allocated by late template parsing.  Call it from the
Sema::ActOnEndOfTranslationUnit method after all pending template
instantiations have been completed.  Teach Parser::ParseTopLevelDecl to
install the cleanup callback when incremental processing is enabled so
that Parser::TemplateIds can be freed.

Patch by Brad King!

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

10 years agoMS ABI: Emit more canonical vbptr stores and loads
Reid Kleckner [Wed, 22 Oct 2014 17:26:00 +0000 (17:26 +0000)]
MS ABI: Emit more canonical vbptr stores and loads

This eliminates some i8* GEPs and makes the IR that clang emits a bit
more canonical. More work is needed for vftables, but that isn't a clear
win so I plan to send it for review.

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

10 years agoRemove unused StmtVector& parameters from declaration parsing functions.
Rafael Espindola [Wed, 22 Oct 2014 14:27:08 +0000 (14:27 +0000)]
Remove unused StmtVector& parameters from declaration parsing functions.

Patch by Eelis van der Weegen!

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

10 years agoSupport using sample profiles with partial debug info (driver)
Diego Novillo [Wed, 22 Oct 2014 13:00:05 +0000 (13:00 +0000)]
Support using sample profiles with partial debug info (driver)

Summary:
When using a profile, we used to require the use -gmlt so that we could
get access to the line locations. This is used to match line numbers in
the input profile to the line numbers in the function's IR.

But this is actually not necessary. The driver can provide source
location tracking without the emission of debug information. In these
cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
actual line location annotations are still present.

This patch tells the driver to only emit source location tracking
when -fprofile-sample-use is present in the command line.

Reviewers: echristo, dblaikie

Subscribers: llvm-commits

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

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

10 years agoclang-format: Fix tests after recent change to ObjC block formatting.
Daniel Jasper [Wed, 22 Oct 2014 09:50:23 +0000 (09:50 +0000)]
clang-format: Fix tests after recent change to ObjC block formatting.

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

10 years agoclang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.
Daniel Jasper [Wed, 22 Oct 2014 09:12:44 +0000 (09:12 +0000)]
clang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.

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

10 years agoclang-format: Fix broken test.
Daniel Jasper [Wed, 22 Oct 2014 09:01:12 +0000 (09:01 +0000)]
clang-format: Fix broken test.

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

10 years agoclang-format: Fix incorrect trailing return arrow detection.
Daniel Jasper [Wed, 22 Oct 2014 08:42:58 +0000 (08:42 +0000)]
clang-format: Fix incorrect trailing return arrow detection.

Before:
  auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}

After:
  auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}

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

10 years agoFix style issue from r220363. No functional change.
Richard Trieu [Wed, 22 Oct 2014 05:21:59 +0000 (05:21 +0000)]
Fix style issue from r220363.  No functional change.

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

10 years agoDisable the uninitialized field warning in uninstantiated classes.
Richard Trieu [Wed, 22 Oct 2014 02:52:00 +0000 (02:52 +0000)]
Disable the uninitialized field warning in uninstantiated classes.

If a templated class is not instantiated, then the AST for it could be missing
some things that would throw the field checker off.  Wait until specialization
before emitting these warnings.

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

10 years agoDriver: rename Windows to MSVCToolChain
Saleem Abdulrasool [Wed, 22 Oct 2014 02:37:29 +0000 (02:37 +0000)]
Driver: rename Windows to MSVCToolChain

This renames the Windows toolchain to MSVCToolChain.  This is a preparatory step
for adding a CrossWindowsToolChain which uses clang/libc++/(ld/lld) without the
standard GCC toolchain lookup.  NFC.

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

10 years ago[modules] Initial support for explicitly loading .pcm files.
Richard Smith [Wed, 22 Oct 2014 02:05:46 +0000 (02:05 +0000)]
[modules] Initial support for explicitly loading .pcm files.

Implicit module builds are not well-suited to a lot of build systems. In
particular, they fare badly in distributed build systems, and they lead to
build artifacts that are not tracked as part of the usual dependency management
process. This change allows explicitly-built module files (which are already
supported through the -emit-module flag) to be explicitly loaded into a build,
allowing build systems to opt to manage module builds and dependencies
themselves.

This is only the first step in supporting such configurations, and it should
be considered experimental and subject to change or removal for now.

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

10 years ago<float.h>: Don't seek #include_next if -ffreestanding for targeting mingw.
NAKAMURA Takumi [Wed, 22 Oct 2014 01:25:49 +0000 (01:25 +0000)]
<float.h>: Don't seek #include_next if -ffreestanding for targeting mingw.

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

10 years agoPR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for one
Richard Smith [Tue, 21 Oct 2014 23:01:04 +0000 (23:01 +0000)]
PR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for one
complete object to a pointer to the start of another complete object does
not evaluate to the constant 'false'. All other comparisons between the
addresses of subobjects of distinct complete objects still do.

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

10 years agoR600: Update for div_fmas intrinsic change
Matt Arsenault [Tue, 21 Oct 2014 22:21:41 +0000 (22:21 +0000)]
R600: Update for div_fmas intrinsic change

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

10 years ago[modules] When building an injected-class-name type, we may have to insert it
Richard Smith [Tue, 21 Oct 2014 21:15:18 +0000 (21:15 +0000)]
[modules] When building an injected-class-name type, we may have to insert it
into multiple merged classes' TypeForDecl slots.

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

10 years agoRemoving unused variable (assigned into, but never read from); NFC.
Aaron Ballman [Tue, 21 Oct 2014 19:37:56 +0000 (19:37 +0000)]
Removing unused variable (assigned into, but never read from); NFC.

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

10 years agoFollow-up commit to r211657 which introduced these macros, but not for MSVC. This...
Aaron Ballman [Tue, 21 Oct 2014 19:24:06 +0000 (19:24 +0000)]
Follow-up commit to r211657 which introduced these macros, but not for MSVC. This turns out to break our freestanding tests on Windows when compiling in MSVC-compatible mode. It was decided (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141020/116942.html is the start of the thread) to support this as part of Clang's interface on all platforms.

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

10 years agoTreat -g1 as -gline-tables-only
Hal Finkel [Tue, 21 Oct 2014 19:20:21 +0000 (19:20 +0000)]
Treat -g1 as -gline-tables-only

-g1 on gcc (and also IBM's xlc) are documented to be very similar to
-gline-tables-only. Our -gline-tables-only might still be more verbose than -g1
on other compilers, but currently we treat -g1 as -g, and so we're producing
much more debug info at -g1 than everybody else. Treating -g1 as
-gline-tables-only brings us much closer to what everyone else is doing.

For more information, see the discussion on
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039649.html

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

10 years agoDriver: Quote the command in crash reproduction scripts.
Justin Bogner [Tue, 21 Oct 2014 18:03:08 +0000 (18:03 +0000)]
Driver: Quote the command in crash reproduction scripts.

This fixes crash report generation when filenames have spaces. It also
removes an awkward workaround that quoted *some* arguments when
generating crash reports.

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

10 years agoDriver: Move crash report command mangling into Command::Print
Justin Bogner [Tue, 21 Oct 2014 17:24:44 +0000 (17:24 +0000)]
Driver: Move crash report command mangling into Command::Print

This pushes the logic for generating a crash reproduction script
entirely into Command::Print, instead of Command doing half of the
work and then relying on textual substitution for the rest. This makes
this logic much easier to read and will simplify fixing a couple of
issues in this area.

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

10 years agoThe nodebug attribute has a C++11-style spelling supported by GCC as well. This modif...
Aaron Ballman [Tue, 21 Oct 2014 15:46:57 +0000 (15:46 +0000)]
The nodebug attribute has a C++11-style spelling supported by GCC as well. This modifies it so we support that spelling as well.

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

10 years agoFixing the MSVC build by removing friendship with CodeGenFunction; NFC.
Aaron Ballman [Tue, 21 Oct 2014 13:39:56 +0000 (13:39 +0000)]
Fixing the MSVC build by removing friendship with CodeGenFunction; NFC.

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

10 years ago[analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus package.
Anton Yartsev [Tue, 21 Oct 2014 12:41:36 +0000 (12:41 +0000)]
[analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus package.

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

10 years agoclang-format: [Java] Understand string literal concatenation.
Daniel Jasper [Tue, 21 Oct 2014 11:34:53 +0000 (11:34 +0000)]
clang-format: [Java] Understand string literal concatenation.

Before:
  String someString = "abc" + "cde";

After:
  String someString = "abc"
                      + "cde";

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

10 years agoclang-format: [Java] Fix formatting of multiple annotations.
Daniel Jasper [Tue, 21 Oct 2014 11:17:56 +0000 (11:17 +0000)]
clang-format: [Java] Fix formatting of multiple annotations.

Before:
  @SuppressWarnings(value = "unchecked")
  @Author(name = "abc") public void doSomething() {
  }

After:
  @SuppressWarnings(value = "unchecked")
  @Author(name = "abc")
  public void doSomething() {
  }

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

10 years agoclang-format: [Java] Fix space in generic method calls.
Daniel Jasper [Tue, 21 Oct 2014 11:13:31 +0000 (11:13 +0000)]
clang-format: [Java] Fix space in generic method calls.

Before:
  A.<B>doSomething();

After:
  A.<B>doSomething();

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

10 years agoclang-format: [Java] Improve annotation handling.
Daniel Jasper [Tue, 21 Oct 2014 10:58:14 +0000 (10:58 +0000)]
clang-format: [Java] Improve annotation handling.

Before:
@SuppressWarnings(
    value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") public static int iiiiiiiiiiiiiiiiiiiiiiii;

After:
  @SuppressWarnings(value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  public static int iiiiiiiiiiiiiiiiiiiiiiii;

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

10 years agoclang-format: [Java] Make annotation formatting more consistent.
Daniel Jasper [Tue, 21 Oct 2014 10:02:03 +0000 (10:02 +0000)]
clang-format: [Java] Make annotation formatting more consistent.

Before:
  DoSomething(new A() {
    @Override public String toString() {
    }
  });

After:
  DoSomething(new A() {
    @Override
    public String toString() {
    }
  });

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

10 years agoclang-format: [Java] Improve generic support.
Daniel Jasper [Tue, 21 Oct 2014 09:57:09 +0000 (09:57 +0000)]
clang-format: [Java] Improve generic support.

Before:
  Iterable< ? > a;
  Iterable< ? extends SomeObject > a;

After:
  Iterable<?> a;
  Iterable<? extends SomeObject> a;

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

10 years agoclang-format: [Java] Support extending inner classes.
Daniel Jasper [Tue, 21 Oct 2014 09:31:29 +0000 (09:31 +0000)]
clang-format: [Java] Support extending inner classes.

Before:
  class A extends B
  .C {}

After:
  class A extends B.C {}

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

10 years agoclang-format: [Java] Support annotations with parameters.
Daniel Jasper [Tue, 21 Oct 2014 09:25:39 +0000 (09:25 +0000)]
clang-format: [Java] Support annotations with parameters.

Before:
  @SuppressWarnings
  (value = "unchecked") public void doSomething() { .. }

After:
  @SuppressWarnings(value = "unchecked")
  public void doSomething() { .. }

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

10 years agoclang-format: [Java] Wrap after each function annotation.
Daniel Jasper [Tue, 21 Oct 2014 08:24:18 +0000 (08:24 +0000)]
clang-format: [Java] Wrap after each function annotation.

Before:
  @Override public String toString() { .. }

After:
  @Override
  public String toString() { .. }

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

10 years agoTest case B: fixed check rule
Evgeny Astigeevich [Tue, 21 Oct 2014 08:16:42 +0000 (08:16 +0000)]
Test case B: fixed check rule

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

10 years agoTest case B is updated to work for 32-bit and 64-bit platforms
Evgeny Astigeevich [Tue, 21 Oct 2014 08:01:37 +0000 (08:01 +0000)]
Test case B is updated to work for 32-bit and 64-bit platforms

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

10 years agoclang-format: [ObjC] Fix spacing in block variable parameters.
Daniel Jasper [Tue, 21 Oct 2014 07:57:50 +0000 (07:57 +0000)]
clang-format: [ObjC] Fix spacing in block variable parameters.

Before:
  { void (^block)(Object * x); }

After:
  { void (^block)(Object *x); }

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

10 years agoclang-format: Fix space in direct destructor calls.
Daniel Jasper [Tue, 21 Oct 2014 07:51:54 +0000 (07:51 +0000)]
clang-format: Fix space in direct destructor calls.

Before:
  void F(int& i) { i. ~int(); }

After:
  void F(int& i) { i.~int(); }

Also, some cleanups.

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

10 years agoAdd missing qualifier to documentation.
Nick Lewycky [Tue, 21 Oct 2014 06:44:23 +0000 (06:44 +0000)]
Add missing qualifier to documentation.

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

10 years agoUpdate documentation to match API change in r215323.
Nick Lewycky [Tue, 21 Oct 2014 06:43:08 +0000 (06:43 +0000)]
Update documentation to match API change in r215323.

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

10 years agoOpenMPClause.h: Fix a warning. [-Wdocumentation]
NAKAMURA Takumi [Tue, 21 Oct 2014 06:40:57 +0000 (06:40 +0000)]
OpenMPClause.h: Fix a warning. [-Wdocumentation]

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

10 years agoDriver: Tighten up crash report tests
Justin Bogner [Tue, 21 Oct 2014 05:13:09 +0000 (05:13 +0000)]
Driver: Tighten up crash report tests

These tests were a little bit too flexible in terms of filenames.

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

10 years agoRemove unused member variable.
Craig Topper [Tue, 21 Oct 2014 04:19:18 +0000 (04:19 +0000)]
Remove unused member variable.

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

10 years ago[OPENMP] Codegen for 'private' clause in 'parallel' directive.
Alexey Bataev [Tue, 21 Oct 2014 03:16:40 +0000 (03:16 +0000)]
[OPENMP] Codegen for 'private' clause in 'parallel' directive.
This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D4752

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

10 years agoRemove including <complex.h> in test case, and change to use _Complex instead.
Jiangning Liu [Tue, 21 Oct 2014 02:19:58 +0000 (02:19 +0000)]
Remove including <complex.h> in test case, and change to use _Complex instead.

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

10 years agoLower compound assignment for the missing type llvm::Type::FP128TyID.
Jiangning Liu [Tue, 21 Oct 2014 01:34:34 +0000 (01:34 +0000)]
Lower compound assignment for the missing type llvm::Type::FP128TyID.

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

10 years agoSwitch C compilations to C11 by default.
Richard Smith [Mon, 20 Oct 2014 23:26:58 +0000 (23:26 +0000)]
Switch C compilations to C11 by default.

This is long-since overdue, and matches GCC 5.0. This should also be
backwards-compatible, because we already supported all of C11 as an extension
in C99 mode.

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

10 years agoRevert "Improve Windows toolchain support for non-standard environments." (r220226)
Hans Wennborg [Mon, 20 Oct 2014 23:26:03 +0000 (23:26 +0000)]
Revert "Improve Windows toolchain support for non-standard environments." (r220226)

In environments where PATH was set to point to the VS installation, Clang would
override that by looking in the registry and finding the latest VS installation.

If the environment is set up to point to a VS installation, that should take
precedence.

Reverting this until we can fix it.

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

10 years agoDriver: Consolidate the logic for naming the module crashdump cache
Justin Bogner [Mon, 20 Oct 2014 22:47:23 +0000 (22:47 +0000)]
Driver: Consolidate the logic for naming the module crashdump cache

List the module cache we use for crashdumps as a tempfile. This
simplifies how we pick up this directory when generating the actual
crash diagnostic and removes some duplicate logic.

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

10 years agoDriver: Name crashdump scripts after the first temp file
Justin Bogner [Mon, 20 Oct 2014 21:47:56 +0000 (21:47 +0000)]
Driver: Name crashdump scripts after the first temp file

In practice there's only ever one temporary output file when
generating a crashdump, but even if there were many iterating over
each and creating a duplicate run script for each one wouldn't make
very much sense.

This updates the behaviour to only generate the script once, based on
the first filename.

This should make it more reasonable to generate extra output files to
include in the crashdump going forward, so I've also added a FIXME to
look into doing just that with the extra module crashdump files.

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

10 years agoDriver: Use an early return instead of a long if condition (NFC)
Justin Bogner [Mon, 20 Oct 2014 21:20:27 +0000 (21:20 +0000)]
Driver: Use an early return instead of a long if condition (NFC)

This just flattens an if block by returning early on the "else"
condition.

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