]> granicus.if.org Git - clang/log
clang
10 years agoTemp XFAIL CodeGen/captured-statements-nested.c to fix the test
Alexey Bataev [Mon, 30 Jun 2014 03:14:43 +0000 (03:14 +0000)]
Temp XFAIL CodeGen/captured-statements-nested.c to fix the test

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

10 years agoUsing of variable length arrays in captured statements and OpenMP constructs.
Alexey Bataev [Mon, 30 Jun 2014 02:55:54 +0000 (02:55 +0000)]
Using of variable length arrays in captured statements and OpenMP constructs.
Differential Revision: http://reviews.llvm.org/D4067

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

10 years agotest: move test from CodeGen to Sema
Saleem Abdulrasool [Mon, 30 Jun 2014 02:14:37 +0000 (02:14 +0000)]
test: move test from CodeGen to Sema

Move test from CodeGen to Sema to more accurately reflect what is being tested
as pointed out by Alp.

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

10 years agoRemove some incorrect test suppressions
Alp Toker [Mon, 30 Jun 2014 01:34:09 +0000 (01:34 +0000)]
Remove some incorrect test suppressions

These don't actually require any registered backend to run.

This commit tests the water with a handful of fixes for what is a more
widespread problem.

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

10 years agoCodeGenAction::ExecuteAction(): check for invalid LLVM source locations
Alp Toker [Mon, 30 Jun 2014 01:33:59 +0000 (01:33 +0000)]
CodeGenAction::ExecuteAction(): check for invalid LLVM source locations

Add sign checks to deal with the fact that IR parser line/column pairs are
signed integers and sometimes invalid.

The crash path is potentially triggered by corrupt '.bc' files in practice,
though I don't have a binary input test case that can be checked-in right now.

(Unfortunately the backend itself crashes on various ill-formed '.bc' inputs so
this bandage isn't as helpful as it appears yet.)

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

10 years agoExtract an isReservedName() function
Alp Toker [Mon, 30 Jun 2014 01:33:53 +0000 (01:33 +0000)]
Extract an isReservedName() function

We'll want to share the implementation if anything else decides to check
for reserved names in future, so make this little snippet of code more
discoverable.

Also remove the __va_list_tag and __builtin_va_list special-case
checks. They're leftovers from before when the reserved name logic was
added.

No change in functionality.

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

10 years agoBasic: correct the va_list type on Windows on ARM
Saleem Abdulrasool [Sun, 29 Jun 2014 23:05:41 +0000 (23:05 +0000)]
Basic: correct the va_list type on Windows on ARM

Windows on ARM defines va_list as a typedef for char *.  Although the semantics
of argument passing for variadic functions matches AAPCS VFP, the wrapped
struct __va_list type is unused.  This makes the intrinsic definition for
va_list match that of Visual Studio.

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

10 years agoFix a stray semi-colon. (Found by a pedantic warning)
Chandler Carruth [Sun, 29 Jun 2014 22:42:51 +0000 (22:42 +0000)]
Fix a stray semi-colon. (Found by a pedantic warning)

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

10 years agoAdd a matcher for SubstNonTypeTemplateParmExpr.
Alexander Kornienko [Sun, 29 Jun 2014 22:18:53 +0000 (22:18 +0000)]
Add a matcher for SubstNonTypeTemplateParmExpr.

Reviewers: klimek, djasper

Reviewed By: djasper

Subscribers: klimek, aemerson, cfe-commits

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

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

10 years ago[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
Simon Atanasyan [Sun, 29 Jun 2014 16:51:16 +0000 (16:51 +0000)]
[Mips] Fix MIPS ABI name in the test. The name "64" is accepted by both gcc
and Clang drivers but internally LLVM/Clang use the name "n64".

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

10 years agoRevert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolc...
NAKAMURA Takumi [Sun, 29 Jun 2014 16:00:11 +0000 (16:00 +0000)]
Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32.

It reverts commits as follows:
  r211866: "Driver: use GNU::Link for the Generic_GCC toolchain"
  r211895: "Replace GetProgramPath("ld") with GetLinkerPath()."
  r211995: "Driver: add a cygwin linker tool"

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

10 years agoLibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:07:48 +0000 (11:07 +0000)]
LibclangTest.cpp: s/uint/unsigned/. I think 'uint' is not a standard type.

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

10 years agoclang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.
NAKAMURA Takumi [Sun, 29 Jun 2014 11:03:28 +0000 (11:03 +0000)]
clang/test/CodeGenCXX/windows-itanium-exceptions.cpp: Add REQUIRES:asserts for now.

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

10 years agoDriver: add a cygwin linker tool
Saleem Abdulrasool [Sun, 29 Jun 2014 06:11:14 +0000 (06:11 +0000)]
Driver: add a cygwin linker tool

This adds a linker tool for the Windows cygwin environment.  This linker
invocation is significantly different from the generic ld invocation.  It
requires additional parameters as well as does not accept some normal
parameters.  This should fix self-hosting on Cygwin.

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

10 years agotest: add a test for windows itanium exceptions
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:15 +0000 (23:34 +0000)]
test: add a test for windows itanium exceptions

Some time ago, I noticed that try would get resolved incorrectly for Windows
Itanium targets.  Add an explicit test to exsure that exceptions are handled
correctly for Windows Itanium environments.

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

10 years agoBasic: fix handling for Windows Itanium environment
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:11 +0000 (23:34 +0000)]
Basic: fix handling for Windows Itanium environment

This corrects the handling for i686-windows-itanium.  This environment is nearly
identical to Windows MSVC, except it uses the itanium ABI for C++.

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

10 years agoBasic: whitespace cleanup
Saleem Abdulrasool [Sat, 28 Jun 2014 23:34:07 +0000 (23:34 +0000)]
Basic: whitespace cleanup

Remove unnecessary separation of anonymous namespace.  NFC.

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

10 years agoExtend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
Richard Trieu [Sat, 28 Jun 2014 23:25:37 +0000 (23:25 +0000)]
Extend -Wtautological-undefined-compare and -Wundefined-bool-conversion to
trigger on taking the address of a reference that is returned from a function
call.

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

10 years agoImport MutableArrayRef into clang namespace.
Craig Topper [Sat, 28 Jun 2014 23:22:33 +0000 (23:22 +0000)]
Import MutableArrayRef into clang namespace.

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

10 years agoRemove llvm:: from uses of ArrayRef.
Craig Topper [Sat, 28 Jun 2014 23:22:23 +0000 (23:22 +0000)]
Remove llvm:: from uses of ArrayRef.

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

10 years ago[Driver][Mips] Fix else-after-return.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:08 +0000 (15:56 +0000)]
[Driver][Mips] Fix else-after-return.

No functional changes.

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

10 years ago[Driver][Mips] Remove redundant brackets.
Simon Atanasyan [Sat, 28 Jun 2014 15:56:03 +0000 (15:56 +0000)]
[Driver][Mips] Remove redundant brackets.

No functional changes.

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

10 years ago[Driver][Mips] Remove redundant abstract/override function.
Simon Atanasyan [Sat, 28 Jun 2014 15:55:55 +0000 (15:55 +0000)]
[Driver][Mips] Remove redundant abstract/override function.

No functional changes.

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

10 years agoGet arm_acle tests from r211962 working
Alp Toker [Sat, 28 Jun 2014 06:51:27 +0000 (06:51 +0000)]
Get arm_acle tests from r211962 working

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

10 years agoExtend -Wdynamic-class-memaccess to records containing dynamic classes
Reid Kleckner [Fri, 27 Jun 2014 23:58:21 +0000 (23:58 +0000)]
Extend -Wdynamic-class-memaccess to records containing dynamic classes

Reviewers: rtrieu

Subscribers: cfe-commits

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

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

10 years agoIntroduce arm_acle.h supporting existing LLVM builtin intrinsics
Yi Kong [Fri, 27 Jun 2014 21:25:42 +0000 (21:25 +0000)]
Introduce arm_acle.h supporting existing LLVM builtin intrinsics

Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64.

Reviewers: t.p.northover, compnerd, rengolin

Reviewed By: compnerd, rengolin

Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits

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

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

10 years agoRemove 'const' from MemoryBuffers used through the SourceManager
David Blaikie [Fri, 27 Jun 2014 17:40:03 +0000 (17:40 +0000)]
Remove 'const' from MemoryBuffers used through the SourceManager

This removes a const_cast added in r211884 that occurred due to an
inconsistency in how MemoryBuffers are handled between some parts of
clang and LLVM.

MemoryBuffers are immutable and the general convention in the LLVM
project is to omit const from immutable types as it's simply
redundant/verbose (see llvm::Type, for example). While this change
doesn't remove "const" from /every/ MemoryBuffer, it at least makes this
chain of ownership/usage consistent.

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

10 years agoAdd reparse test for libclang
Ben Langmuir [Fri, 27 Jun 2014 17:04:26 +0000 (17:04 +0000)]
Add reparse test for libclang

Adapted from a reproducer by Dan Schmidt, thanks!

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

10 years agoclang-cl: Map /EHs- to -fno-exceptions
Reid Kleckner [Fri, 27 Jun 2014 17:02:02 +0000 (17:02 +0000)]
clang-cl: Map /EHs- to -fno-exceptions

This isn't 100% compatible with MSVC, but it's close enough.  MSVC's /EH
flag doesn't really control exceptions so much as how to clean up after
an exception is thrown.  The upshot is that cl.exe /EHs- will compile
try, throw, and catch statements with a warning, but clang-cl will
reject such constructs with a hard error.  We can't compile such EH
constructs anyway, but this may matter to consumers of the AST.

Reviewers: hans

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

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

10 years agoCodeGen: Fix a typo in getThreadLocalWrapperLinkage
David Majnemer [Fri, 27 Jun 2014 16:56:27 +0000 (16:56 +0000)]
CodeGen: Fix a typo in getThreadLocalWrapperLinkage

The description had a misspelling.  No functionality change.

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

10 years agoFix a bug in my previous patch by restoring the behavior that the fatal
Chandler Carruth [Fri, 27 Jun 2014 16:37:27 +0000 (16:37 +0000)]
Fix a bug in my previous patch by restoring the behavior that the fatal
error handler is only registered once.

To avoid the use of std::call_once (the obvious way to do this) I've
wrapped everything up into a managed static and done the work in
a constructor. Silly, but it should be effective.

Some out-of-tree libclang users reported this to me, and I've asked them
to put together a test case which exhibits this behavior, but I wanted
to fix things ASAP since the nature of the fix is straight forward.

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

10 years agoThis fixes libclang to cope with the now compile-time multithreaded
Chandler Carruth [Fri, 27 Jun 2014 15:14:39 +0000 (15:14 +0000)]
This fixes libclang to cope with the now compile-time multithreaded
selection re-enabled in r211900 in LLVM.

The approach (unlike r211121) doesn't rely on std::mutex or
std::call_once to avoid breaknig cygwin bots.

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

10 years ago[ARM] Fix AAPCS non-compliance caused by very large structs
Oliver Stannard [Fri, 27 Jun 2014 13:59:27 +0000 (13:59 +0000)]
[ARM] Fix AAPCS non-compliance caused by very large structs

This is a fix to the code in clang which inserts padding arguments to
ensure that the ARM backend can emit AAPCS-VFP compliant code. This code
needs to track the number of registers which have been allocated in order
to do this. When passing a very large struct (>64 bytes) by value, clang
emits IR which takes a pointer to the struct, but the backend converts this
back to passing the struct in registers and on the stack. The bug was that
this was being considered by clang to only use one register, meaning that
there were situations in which padding arguments were incorrectly emitted
by clang.

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

10 years agoReplace GetProgramPath("ld") with GetLinkerPath().
Logan Chien [Fri, 27 Jun 2014 12:37:36 +0000 (12:37 +0000)]
Replace GetProgramPath("ld") with GetLinkerPath().

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

10 years ago[ARM-BE] Generate correct NEON intrinsics for big endian systems.
James Molloy [Fri, 27 Jun 2014 11:53:35 +0000 (11:53 +0000)]
[ARM-BE] Generate correct NEON intrinsics for big endian systems.

The NEON intrinsics in arm_neon.h are designed to work on vectors
"as-if" loaded by (V)LDR. We load vectors "as-if" (V)LD1, so the
intrinsics are currently incorrect.

This patch adds big-endian versions of the intrinsics that does the
"obvious but dumb" thing of reversing all vector inputs and all
vector outputs. This will produce extra REVs, but we trust the
optimizer to remove them.

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

10 years agoDon't check clang binary name, as it can be different in some test setups.
Alexander Kornienko [Fri, 27 Jun 2014 11:18:13 +0000 (11:18 +0000)]
Don't check clang binary name, as it can be different in some test setups.

Summary: This unbreaks our internal build after these tests were turned on in r211738.

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: benlangmuir, cfe-commits

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

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

10 years ago[OPENMP] Parsing and sema analysis for 'copyprivate' clause.
Alexey Bataev [Fri, 27 Jun 2014 10:37:06 +0000 (10:37 +0000)]
[OPENMP] Parsing and sema analysis for 'copyprivate' clause.

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

10 years agoconst_cast the memory MemoryBuffer following LLVM r211883
Alp Toker [Fri, 27 Jun 2014 09:24:27 +0000 (09:24 +0000)]
const_cast the memory MemoryBuffer following LLVM r211883

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

10 years agoDriver: Pass -ivfsoverlay to module crashdumps
Justin Bogner [Fri, 27 Jun 2014 06:35:05 +0000 (06:35 +0000)]
Driver: Pass -ivfsoverlay to module crashdumps

When we create a crashdump involving modules, we build a VFS to
reproduce the problem with. This updates the reproduction script to
use that VFS.

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

10 years agoAdd a FIXME for an unfortunate issue in ConvertBackendLocation()
Alp Toker [Fri, 27 Jun 2014 06:02:00 +0000 (06:02 +0000)]
Add a FIXME for an unfortunate issue in ConvertBackendLocation()

This function is copying the entire file contents into memory repeatedly and
allocating new file IDs *each time* a source location is processed.

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

10 years agoDriver: use GNU::Link for the Generic_GCC toolchain
Saleem Abdulrasool [Fri, 27 Jun 2014 05:06:41 +0000 (05:06 +0000)]
Driver: use GNU::Link for the Generic_GCC toolchain

This changes the behaviour of the driver for linking to match that of the
Generic_GCC::Assemble.    The default link should use "ld" rather than "gcc" for
the linker as gcc does.  This avoids the unnecessary round-tripping through gcc.
It also is much more reasonable behaviour from the user's perspective.  This
should have been updated with SVN r195554 which changed the behaviour of
Generic_GCC::Assemble.

The gcc_forward test needs to be updated to mark the fact that -march is a flag
for GCC not ld.  This was updated as a typo fix, but added a check for a flag
that is not a link flag.

The bindings test covers the change for testing, and thus no new test was added.

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

10 years agoCodeGenAction: don't duplicate entire .ll/.bc files into memory
Alp Toker [Fri, 27 Jun 2014 04:34:44 +0000 (04:34 +0000)]
CodeGenAction: don't duplicate entire .ll/.bc files into memory

Requires supporting changes from LLVM r211861.

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

10 years ago[OPENMP] Added several test cases in nesting of OpenMP regions test after review...
Alexey Bataev [Fri, 27 Jun 2014 03:33:10 +0000 (03:33 +0000)]
[OPENMP] Added several test cases in nesting of OpenMP regions test after review from Samuel F Antao.

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

10 years agoAccount for differences in grep implementations
Alp Toker [Fri, 27 Jun 2014 03:11:38 +0000 (03:11 +0000)]
Account for differences in grep implementations

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

10 years agoRestore test from r211844 skipping '.file' directives
Alp Toker [Fri, 27 Jun 2014 02:59:39 +0000 (02:59 +0000)]
Restore test from r211844 skipping '.file' directives

At least this answers the question of whether .bc/.ll input processed by the
frontend produces identical output to the original compilation.

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

10 years agoPartially disable test from r211844
Alp Toker [Fri, 27 Jun 2014 02:35:57 +0000 (02:35 +0000)]
Partially disable test from r211844

ELF assembly contains .line directives that differ based on the input filename.
Weaken the test while considering options.

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

10 years agoAdd test coverage for .bc input in the frontend
Alp Toker [Fri, 27 Jun 2014 02:04:28 +0000 (02:04 +0000)]
Add test coverage for .bc input in the frontend

Test that we can consume LLVM bitcode and additionally check that it produces
the same output as a direct compilation.

The feature is crashy and has gone untested until now, but we might as well
provide some coverage as long as it remains in tree.

Also test LL source input in the same way because the existing tests for that
don't look convincing.

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

10 years agoRemove .bc from test config.suffixes
Alp Toker [Fri, 27 Jun 2014 02:04:21 +0000 (02:04 +0000)]
Remove .bc from test config.suffixes

This was unused. Besides, a binary file can't really contain lit ShTests.

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

10 years agoclang/test/Driver/fuse-ld.c: Really fix to match dos path.
NAKAMURA Takumi [Fri, 27 Jun 2014 01:32:59 +0000 (01:32 +0000)]
clang/test/Driver/fuse-ld.c: Really fix to match dos path.

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

10 years agoDo not inline methods of C++ containers (coming from headers).
Anna Zaks [Fri, 27 Jun 2014 01:03:05 +0000 (01:03 +0000)]
Do not inline methods of C++ containers (coming from headers).

This silences false positives (leaks, use of uninitialized value) in simple
code that uses containers such as std::vector and std::list. The analyzer
cannot reason about the internal invariances of those data structures which
leads to false positives. Until we come up with a better solution to that
problem, let's just not inline the methods of the containers and allow objects
to escape whenever such methods are called.

This just extends an already existing flag "c++-container-inlining" and applies
the heuristic not only to constructors and destructors of the containers, but
to all of their methods.

We have a bunch of distinct user reports all related to this issue
(radar://16058651, radar://16580751, radar://16384286, radar://16795491
[PR19637]).

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

10 years agoAllow different path separator for windows build.
Logan Chien [Fri, 27 Jun 2014 00:19:33 +0000 (00:19 +0000)]
Allow different path separator for windows build.

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

10 years agoAvoid extra back reference key lookup in msmangler
Reid Kleckner [Thu, 26 Jun 2014 22:42:18 +0000 (22:42 +0000)]
Avoid extra back reference key lookup in msmangler

Avoid a second key lookup when the back reference key is going to be
inserted in the StringMap. The string lookups in the msmangler are the
main responsible for the huge overhead when compared to the itanium
mangler. This patch makes a small but noticeable improvement.

Reviewed by: rnk

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

Patch by Agustín Bergé!

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

10 years agoObjective-C ARC. Provide diagnostic and fix-it
Fariborz Jahanian [Thu, 26 Jun 2014 21:22:16 +0000 (21:22 +0000)]
Objective-C ARC. Provide diagnostic and fix-it
when casting a retainable object to a objc_bridge_related
CF type with the suggestion of applying the method
specified in the bridging attribute to the object.
// rdar://15932435

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

10 years agoDriver: Fix a misleading comment and test for what it actually did
Justin Bogner [Thu, 26 Jun 2014 20:59:39 +0000 (20:59 +0000)]
Driver: Fix a misleading comment and test for what it actually did

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

10 years agoDriver: Remove trailing whitespace
Justin Bogner [Thu, 26 Jun 2014 20:59:36 +0000 (20:59 +0000)]
Driver: Remove trailing whitespace

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

10 years agoclang-cl: Don't store the cl compiler Tool on the stack (PR20131)
Hans Wennborg [Thu, 26 Jun 2014 19:59:02 +0000 (19:59 +0000)]
clang-cl: Don't store the cl compiler Tool on the stack (PR20131)

The Command will refer back to the Tool as its source,
so it has to outlive the Command.

Having the Tool on the stack would cause us to crash
when using "clang-cl -GR -fallback", because if the
Command fails, Driver::ExecuteCompilation tries to
peek at the Command's source.

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

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

10 years agoARM: Correctly identify cortex-m4 as v7em.
Jim Grosbach [Thu, 26 Jun 2014 17:24:16 +0000 (17:24 +0000)]
ARM: Correctly identify cortex-m4 as v7em.

Get the predefined macro for the architecture correct.
cortex-m4: __ARM_ARCH_7EM__
cortex-m3: __ARM_ARCH_7M__
cortex-m0: __ARM_ARCH_6M__

rdar://17420090

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

10 years agoAdd a Visualizer for VarDecl.
Zachary Turner [Thu, 26 Jun 2014 16:26:42 +0000 (16:26 +0000)]
Add a Visualizer for VarDecl.

Reviewed by: Aaron Ballman

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

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

10 years agoPropset the executables for GetProgramPath().
Logan Chien [Thu, 26 Jun 2014 14:38:46 +0000 (14:38 +0000)]
Propset the executables for GetProgramPath().

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

10 years agoImplement the -fuse-ld= option.
Logan Chien [Thu, 26 Jun 2014 14:23:45 +0000 (14:23 +0000)]
Implement the -fuse-ld= option.

This commit implements the -fuse-ld= option, so that the user
can specify -fuse-ld=bfd to use ld.bfd.

This commit re-applies r194328 with some test case changes.
It seems that r194328 was breaking macosx or mingw build
because clang can't find ld.bfd or ld.gold in the given sysroot.
We should use -B to specify the executable search path instead.

Patch originally by David Chisnall.

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

10 years agoAdd ppc64/power8 as a target
Will Schmidt [Thu, 26 Jun 2014 13:34:10 +0000 (13:34 +0000)]
Add ppc64/power8 as a target

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

10 years ago[OPENMP] Initial parsing and sema analysis for 'single' directive.
Alexey Bataev [Thu, 26 Jun 2014 12:05:45 +0000 (12:05 +0000)]
[OPENMP] Initial parsing and sema analysis for 'single' directive.

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

10 years ago[OPENMP] Initial parsing and sema analysis for 'section' directive.
Alexey Bataev [Thu, 26 Jun 2014 08:21:58 +0000 (08:21 +0000)]
[OPENMP] Initial parsing and sema analysis for 'section' directive.

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

10 years agoSema: Allow dllimport entities in template args for mingw
David Majnemer [Thu, 26 Jun 2014 07:48:46 +0000 (07:48 +0000)]
Sema: Allow dllimport entities in template args for mingw

Previously dllimport variables inside of template arguments relied on
not using the C++11 codepath when -fms-compatibility was set.

While this allowed us to achieve compatibility with MSVC, it did so at
the expense of MingW.

Instead, try to use the DeclRefExpr we dig out of the template argument.
If it has the dllimport attribute, accept it and skip the C++11
null-pointer check.

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

10 years agoConvert some function arguments to use ArrayRef.
Craig Topper [Thu, 26 Jun 2014 04:58:53 +0000 (04:58 +0000)]
Convert some function arguments to use ArrayRef.

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

10 years agoConvert StringLiteralParser constructor to use ArrayRef instead of a pointer and...
Craig Topper [Thu, 26 Jun 2014 04:58:39 +0000 (04:58 +0000)]
Convert StringLiteralParser constructor to use ArrayRef instead of a pointer and count.

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

10 years agoMake test from r211758 portable
Alp Toker [Thu, 26 Jun 2014 02:07:06 +0000 (02:07 +0000)]
Make test from r211758 portable

It turns out the -fblocks option is determined by the default tooling target
and not implied by the other two flags.

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

10 years agoCodeGen: Improve warnings about uninstrumented files when profiling
Justin Bogner [Thu, 26 Jun 2014 01:45:07 +0000 (01:45 +0000)]
CodeGen: Improve warnings about uninstrumented files when profiling

Improve the warning when building with -fprofile-instr-use and a file
appears not to have been profiled at all. This keys on whether a
function is defined in the main file or not to avoid false negatives
when one includes a header with functions that have been profiled.

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

10 years agoReformat RAVs to sync up following recent updates
Alp Toker [Thu, 26 Jun 2014 01:42:30 +0000 (01:42 +0000)]
Reformat RAVs to sync up following recent updates

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

10 years agoRAV: visit copy expressions of captured variables in blocks (ObjC++11)
Alp Toker [Thu, 26 Jun 2014 01:42:24 +0000 (01:42 +0000)]
RAV: visit copy expressions of captured variables in blocks (ObjC++11)

Patch by Mathieu Baudet.

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

10 years agoForward -u to the linker on gnutools toolchains
Reid Kleckner [Thu, 26 Jun 2014 01:08:54 +0000 (01:08 +0000)]
Forward -u to the linker on gnutools toolchains

Summary:
The BSDs and Darwin all forward the whole 'u' group, but gcc only
forwards -u so far as I can tell.  I only forward -u, since that's a
minimal change, and many people object to magically recognizing and
forwarding linker arguments.

Reviewers: chandlerc, joerg

Subscribers: cfe-commits

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

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

10 years agoMake -Wincomplete-umbrella go through the VFS
Ben Langmuir [Wed, 25 Jun 2014 23:53:43 +0000 (23:53 +0000)]
Make -Wincomplete-umbrella go through the VFS

By using vfs::recursive_directory_iterator, this warning will now fire
when some or all of a module's headers are from VFS mappings.

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

10 years agoMake PR20038.cpp test case portable to non-Itanium ABIs
David Blaikie [Wed, 25 Jun 2014 23:19:58 +0000 (23:19 +0000)]
Make PR20038.cpp test case portable to non-Itanium ABIs

The only call in this function is to the dtor, so there's no need to
name a non-portable mangled function name to match it.

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

10 years agoRemove REQUIRES lines from portable tests
Alp Toker [Wed, 25 Jun 2014 22:46:44 +0000 (22:46 +0000)]
Remove REQUIRES lines from portable tests

These tests are target-independent and shouldn't ever be suppressed.

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

10 years agoDon't allow dllimport variables in constant initializers
Hans Wennborg [Wed, 25 Jun 2014 22:19:48 +0000 (22:19 +0000)]
Don't allow dllimport variables in constant initializers

This is a follow-up to David's r211677. For the following code,
we would end up referring to 'foo' in the initializer for 'arr',
and then fail to link, because 'foo' is dllimport and needs to be
accessed through the __imp_?foo.

  __declspec(dllimport) extern const char foo[];
  const char* f() {
    static const char* const arr[] = { foo };
    return arr[0];
  }

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

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

10 years agofixed typos in comment
Sanjay Patel [Wed, 25 Jun 2014 22:15:12 +0000 (22:15 +0000)]
fixed typos in comment

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

10 years agoAdd vfs::recursive_directory_iterator
Ben Langmuir [Wed, 25 Jun 2014 20:25:40 +0000 (20:25 +0000)]
Add vfs::recursive_directory_iterator

For now, this is only used by its unit tests.  It is similar to the API
in llvm::sys::fs::recursive_directory_iterator, but without some of the
more complex features like requesting that the iterator not recurse into
the next directory, for example.

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

10 years agoMS ABI: Propagate class-level DLL attributes to class template specialization bases...
Hans Wennborg [Wed, 25 Jun 2014 18:25:57 +0000 (18:25 +0000)]
MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)

Consider the following code:

  template <typename T> class Base {};
  class __declspec(dllexport) class Derived : public Base<int> {}

When the base of an exported or imported class is a class template
specialization, MSVC will propagate the dll attribute to the base.
In the example code, Base<int> becomes a dllexported class.

This commit makes Clang do the proopagation when the base hasn't been
instantiated yet, and warns about it being unsupported otherwise.
This is different from MSVC, which allows changing a specialization
back and forth between dllimport and dllexport and seems to let the
last one win. Changing the dll attribute after instantiation would be
hard for us, and doesn't seem to come up in practice, so I think this
is a reasonable limitation to have.

MinGW doesn't do this kind of propagation.

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

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

10 years agoPR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a conditional
David Blaikie [Wed, 25 Jun 2014 17:57:34 +0000 (17:57 +0000)]
PR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a conditional

With && at the top level of an expression, the last thing done when
emitting the expression was an unconditional jump to the cleanup block.
To reduce the amount of stepping, the DebugLoc is omitted from the
unconditional jump. This is done by clearing the IRBuilder's
"CurrentDebugLocation"*. If this is not set to some non-empty value
before the cleanup block is emitted, the cleanups don't get a location
either. If a call without a location is emitted in a function with debug
info, and that call is then inlined - bad things happen. (without a
location for the call site, the inliner would just leave the inlined
DebugLocs as they were - pointing to roots in the original function, not
inlined into the current function)

Follow up commit to LLVM will ensure that breaking the invariants of the
DebugLoc chains by having chains that don't lead to the current function
will fail assertions, so we shouldn't accidentally slip any of these
cases in anymore. Those assertions may reveal further cases that need to
be fixed in clang, though I've tried to test heavily to avoid that.

* See r128471, r128513 for the code that clears the
  CurrentDebugLocation. Simply removing this code or moving the code
  into IRBuilder to apply to all unconditional branches would regress
  desired behavior, unfortunately.

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

10 years agoFix treatment of types defined in function prototype
Serge Pavlov [Wed, 25 Jun 2014 17:09:41 +0000 (17:09 +0000)]
Fix treatment of types defined in function prototype

Types defined in function prototype are diagnosed earlier in C++ compilation.
They are put into declaration context where the prototype is introduced. Later on,
when FunctionDecl object is created, these types are moved into the function context.

This patch fixes PR19018 and PR18963.

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

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

10 years agoHeaders: be a bit more careful about inline asm
Saleem Abdulrasool [Wed, 25 Jun 2014 16:48:40 +0000 (16:48 +0000)]
Headers: be a bit more careful about inline asm

Conditionally include x86intrin.h if we are building for x86 or x86_64.
Conditionalise definition of inline assembly routines which use x86 or x86_64
inline assembly. This is needed as clang can target Windows on ARM where these
definitions may be included into user code.

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

10 years agoRename loop unrolling and loop vectorizer metadata to have a common prefix.
Eli Bendersky [Wed, 25 Jun 2014 15:42:16 +0000 (15:42 +0000)]
Rename loop unrolling and loop vectorizer metadata to have a common prefix.

[Clang part]

These patches rename the loop unrolling and loop vectorizer metadata
such that they have a common 'llvm.loop.' prefix.  Metadata name
changes:

llvm.vectorizer.* => llvm.loop.vectorizer.*
llvm.loopunroll.* => llvm.loop.unroll.*

This was a suggestion from an earlier review
(http://reviews.llvm.org/D4090) which added the loop unrolling
metadata.

Patch by Mark Heffernan.

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

10 years agoFixing the RST markup for the #pragma loop attribute documentation.
Aaron Ballman [Wed, 25 Jun 2014 12:49:05 +0000 (12:49 +0000)]
Fixing the RST markup for the #pragma loop attribute documentation.

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

10 years agoFixing the position of the supported syntax marker when generating attribute document...
Aaron Ballman [Wed, 25 Jun 2014 12:48:06 +0000 (12:48 +0000)]
Fixing the position of the supported syntax marker when generating attribute documentation.

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

10 years agoEscaping a literal character to fix an RST warning.
Aaron Ballman [Wed, 25 Jun 2014 12:41:28 +0000 (12:41 +0000)]
Escaping a literal character to fix an RST warning.

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

10 years agoAlign with new GCC options for x86 Android
Alexey Volkov [Wed, 25 Jun 2014 12:15:36 +0000 (12:15 +0000)]
Align with new GCC options for x86 Android
32-bit: +ssse3
64-bit: +sse4.2 +popcnt

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

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

10 years agoCHECK-LABEL'ify this test.
James Molloy [Wed, 25 Jun 2014 11:50:56 +0000 (11:50 +0000)]
CHECK-LABEL'ify this test.

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

10 years ago[AArch32] Fix a stupid error in an architectural guard
James Molloy [Wed, 25 Jun 2014 11:46:24 +0000 (11:46 +0000)]
[AArch32] Fix a stupid error in an architectural guard

The < 8 instead of <= 8 meant that a bunch of vreinterprets were not available on v8 AArch32. Simplify the guard to just !defined(aarch64) while we're at it, and enable some v8 AArch32 testing.

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

10 years ago[OPENMP] Initial support for 'sections' directive.
Alexey Bataev [Wed, 25 Jun 2014 11:44:49 +0000 (11:44 +0000)]
[OPENMP] Initial support for 'sections' directive.

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

10 years agoAST: Initialization with dllimport functions in C
David Majnemer [Wed, 25 Jun 2014 08:15:07 +0000 (08:15 +0000)]
AST: Initialization with dllimport functions in C

The C++ language requires that the address of a function be the same
across all translation units.  To make __declspec(dllimport) useful,
this means that a dllimported function must also obey this rule.  MSVC
implements this by dynamically querying the import address table located
in the linked executable.  This means that the address of such a
function in C++ is not constant (which violates other rules).

However, the C language has no notion of ODR nor does it permit dynamic
initialization whatsoever.  This requires implementations to _not_
dynamically query the import address table and instead utilize a wrapper
function that will be synthesized by the linker which will eventually
query the import address table.  The effect this has is, to say the
least, perplexing.

Consider the following C program:
__declspec(dllimport) void f(void);

typedef void (*fp)(void);

static const fp var = &f;

const fp fun() { return &f; }

int main() { return fun() == var; }

MSVC will statically initialize "var" with the address of the wrapper
function and "fun" returns the address of the actual imported function.
This means that "main" will return false!

Note that LLVM's optimizers are strong enough to figure out that "main"
should return true.  However, this result is dependent on having
optimizations enabled!

N.B.  This change also permits the usage of dllimport declarators inside
of template arguments; they are sufficiently constant for such a
purpose.  Add tests to make sure we don't regress here.

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

10 years agoAdded a test to ensure -Wimplicit-fallthrough works with -fblocks correctly.
Alexander Kornienko [Wed, 25 Jun 2014 08:09:35 +0000 (08:09 +0000)]
Added a test to ensure -Wimplicit-fallthrough works with -fblocks correctly.

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

10 years ago[OPENMP] OMPSimdDirective and OMPForDirective: added initialization for CollapsedNum...
Alexey Bataev [Wed, 25 Jun 2014 06:52:00 +0000 (06:52 +0000)]
[OPENMP] OMPSimdDirective and OMPForDirective: added initialization for CollapsedNum member.

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

10 years agoDon't go through the TypeSourceInfo when getting the SourceRange.
Zachary Turner [Wed, 25 Jun 2014 05:37:25 +0000 (05:37 +0000)]
Don't go through the TypeSourceInfo when getting the SourceRange.

VarDecl provides a method getSourceRange(), which provides a more
robust way of getting the SourceRange since the TypeSourceInfo can
be null in certain cases.

Reviewed by: majnemer

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

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

10 years ago[Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
Simon Atanasyan [Wed, 25 Jun 2014 05:00:59 +0000 (05:00 +0000)]
[Driver] Follow-up to r211598, r211663. Do not build a dynamic linker
path using sub-strings concatenation. Return the whole string explicitly.

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

10 years agoTools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since...
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:20 +0000 (04:34 +0000)]
Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since r211598 has introduced manipulation of return string.

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

10 years agoVirtualFileSystemTest.cpp: Get rid of initializer list on std::vector, to appease...
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:10 +0000 (04:34 +0000)]
VirtualFileSystemTest.cpp: Get rid of initializer list on std::vector, to appease msc17.

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

10 years agoReformat.
NAKAMURA Takumi [Wed, 25 Jun 2014 04:34:00 +0000 (04:34 +0000)]
Reformat.

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

10 years ago[OPENMP] Improved code and replaced struct by lambda.
Alexey Bataev [Wed, 25 Jun 2014 04:09:13 +0000 (04:09 +0000)]
[OPENMP] Improved code and replaced struct by lambda.

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

10 years agoImplement predefined stdint macros
JF Bastien [Wed, 25 Jun 2014 01:31:33 +0000 (01:31 +0000)]
Implement predefined stdint macros

Add predefined stdint macros that match the given patterns:

U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE}
U?INT{PTR,MAX}_{MAX,TYPE}

http://reviews.llvm.org/D4141

Author: binji

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

10 years agoFix parsing nested __if_exists blocks
Reid Kleckner [Wed, 25 Jun 2014 00:28:35 +0000 (00:28 +0000)]
Fix parsing nested __if_exists blocks

Rather than having kw___if_exists be a special case of
ParseCompoundStatementBody, we can look for kw___if_exists in the big
switch over for valid statement tokens in ParseStatementOrDeclaration.

Nested __if_exists blocks are used in the DECLARE_REGISTRY_RESOURCEID
macro from atlcom.h.

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