]> granicus.if.org Git - clang/log
clang
10 years agoGCC compatibility: Create a Group to ignore unsupported optimization.
Sylvestre Ledru [Fri, 11 Jul 2014 11:43:57 +0000 (11:43 +0000)]
GCC compatibility: Create a Group to ignore unsupported optimization.

Returns a warning when using an unknown optimization flag.
This patch includes -finline-limit as one of those ignored flags.
More options will be moved in this group

Patch by Arthur Marble <arthur@info9.net> in the context of
Debian Google Summer of code 2014.

Reviewers: rnk, Sylvestre

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

10 years ago[OPENMP] Parsing and sema analysis for 'omp task' directive.
Alexey Bataev [Fri, 11 Jul 2014 11:25:16 +0000 (11:25 +0000)]
[OPENMP] Parsing and sema analysis for 'omp task' directive.

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

10 years agoDon't assume StringRef.data() is null-terminated
Ben Langmuir [Fri, 11 Jul 2014 00:43:47 +0000 (00:43 +0000)]
Don't assume StringRef.data() is null-terminated

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

10 years agoTestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in msc17.
NAKAMURA Takumi [Fri, 11 Jul 2014 00:32:35 +0000 (00:32 +0000)]
TestAfterDivZeroChecker.cpp: Avoid member initializer. It is unsupported in msc17.

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

10 years ago[modules] Don't try to merge template specializations by performing name lookup
Richard Smith [Fri, 11 Jul 2014 00:20:06 +0000 (00:20 +0000)]
[modules] Don't try to merge template specializations by performing name lookup
into their container; we won't find them there. These things are already being
merged when they're added to their primary template's folding set, so this
merging is redundant (and causes us to reject-valid because we think we've
found an odr violation).

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

10 years agoclang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to incompatibility...
NAKAMURA Takumi [Fri, 11 Jul 2014 00:18:29 +0000 (00:18 +0000)]
clang/test/CodeGenCXX/PR20038.cpp: Appease targeting msvc due to incompatibility of dw.

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

10 years agoReturn a FixItHint instead of taking a diagnostic builder
Reid Kleckner [Fri, 11 Jul 2014 00:16:51 +0000 (00:16 +0000)]
Return a FixItHint instead of taking a diagnostic builder

Addressing review comments from r212784.

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

10 years agoMSVC compat: Allow lookup of friend types in enclosing namespaces
Reid Kleckner [Thu, 10 Jul 2014 23:44:52 +0000 (23:44 +0000)]
MSVC compat: Allow lookup of friend types in enclosing namespaces

The relevant portion of C++ standard says [namespace.memdef]p3:

  If the name in a friend declaration is neither qualified nor a
  template-id and the declaration is a function or an
  elaborated-type-specifier, the lookup to determine whether the entity
  has been previously declared shall not consider any scopes outside the
  innermost enclosing namespace.

MSVC does not implement that rule for types.  If there is a type in an
enclosing namespace, they consider an unqualified tag declaration with
the same name to be a redeclaration of the type from another namespace.

Implementing compatibility is a simple matter of disabling our
implementation of this rule for types, which was added in r177473.

Reviewers: rsmith

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

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

10 years agoEnable -gcolumn-info by default.
Diego Novillo [Thu, 10 Jul 2014 23:29:28 +0000 (23:29 +0000)]
Enable -gcolumn-info by default.

This patch flips the default value for -gcolumn-info to be on by
default. I discussed the rationale and provided compile/size data
in:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html

This also updates the documentation and some tests that relied on
the lack of column information. Some tests had column information
in the expected output, but it was wrong (the tsan tests). Others
were using the driver to execute.

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

10 years agoAdd AST dumping for VarDecl init kind.
Richard Smith [Thu, 10 Jul 2014 22:54:03 +0000 (22:54 +0000)]
Add AST dumping for VarDecl init kind.

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

10 years ago[UBSan] Introduce type-based blacklisting.
Alexey Samsonov [Thu, 10 Jul 2014 22:34:19 +0000 (22:34 +0000)]
[UBSan] Introduce type-based blacklisting.

Teach UBSan vptr checker to ignore technically invalud down-casts on
blacklisted types.

Based on http://reviews.llvm.org/D4407 by Byoungyoung Lee!

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

10 years agoBe more specific about return types of some methods.
Alexey Samsonov [Thu, 10 Jul 2014 22:18:36 +0000 (22:18 +0000)]
Be more specific about return types of some methods.

This would allow to call addCompilerUsedGlobal on some
Clang-generated globals.

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

10 years agoPR20256: don't accidentally instantiate non-dependent default-initialization as
Richard Smith [Thu, 10 Jul 2014 20:53:43 +0000 (20:53 +0000)]
PR20256: don't accidentally instantiate non-dependent default-initialization as
value-initialization.

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

10 years agoFix the dtor location issues in PR20038 harder.
David Blaikie [Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)]
Fix the dtor location issues in PR20038 harder.

Originally committed in r211722, this fixed one case of dtor calls being
emitted without locations (this causes problems for debug info if the
call is then inlined), this caught only some of the cases.

Instead of trying to re-enable the location before the cleanup, simply
re-enable the location immediately after the unconditional branches in
question using a scoped device to ensure the no-location state doesn't
leak out arbitrarily.

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

10 years agoFix (and reenable) ppc64-align-struct.c test for non-assert builds.
Ulrich Weigand [Thu, 10 Jul 2014 19:19:03 +0000 (19:19 +0000)]
Fix (and reenable) ppc64-align-struct.c test for non-assert builds.

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

10 years agoRemove use of uniform initialization ({}) introduced in r212725 since this isn't...
David Blaikie [Thu, 10 Jul 2014 18:46:15 +0000 (18:46 +0000)]
Remove use of uniform initialization ({}) introduced in r212725 since this isn't supported in MSVC.

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

10 years agoAvoid definining more GCC specific predefined macros in clang-cl
Ehsan Akhgari [Thu, 10 Jul 2014 18:44:24 +0000 (18:44 +0000)]
Avoid definining more GCC specific predefined macros in clang-cl

Reviewers: hansw, rnk

Subscribers: cfe-commits

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

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

10 years agoQuick (attempted) fix for non-asserts builds for a test introduced in r212743.
David Blaikie [Thu, 10 Jul 2014 18:40:54 +0000 (18:40 +0000)]
Quick (attempted) fix for non-asserts builds for a test introduced in r212743.

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

10 years ago[Driver/Unittests] Follow up for r212666, add unit test for the newly exposed getARMC...
Argyrios Kyrtzidis [Thu, 10 Jul 2014 18:38:38 +0000 (18:38 +0000)]
[Driver/Unittests] Follow up for r212666, add unit test for the newly exposed getARMCPUForMArch() function.

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

10 years ago[PowerPC] ABI support for aligned by-value aggregates
Ulrich Weigand [Thu, 10 Jul 2014 17:20:07 +0000 (17:20 +0000)]
[PowerPC] ABI support for aligned by-value aggregates

This patch adds support for respecting the ABI and type alignment
of aggregates passed by value.  Currently, all aggregates are aligned
at 8 bytes in the parameter save area.  This is incorrect for two
reasons:

- Aggregates that need alignment of 16 bytes or more should be aligned
  at 16 bytes in the parameter save area.  This is implemented by
  using an appropriate "byval align" attribute in the IR.

- Aggregates that need alignment beyond 16 bytes need to be dynamically
  realigned by the caller.  This is implemented by setting the Realign
  flag of the ABIArgInfo::getIndirect call.

In addition, when expanding a va_arg call accessing a type that is
aligned at 16 bytes in the argument save area (either one of the
aggregate types as above, or a vector type which is already aligned
at 16 bytes), code needs to align the va_list pointer accordingly.

Reviewed by Hal Finkel.

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

10 years agoProvide -verify support to match "any" line for diagnostics in included files.
Andy Gibbs [Thu, 10 Jul 2014 16:43:29 +0000 (16:43 +0000)]
Provide -verify support to match "any" line for diagnostics in included files.

Allow diagnostic checks that originate in included files to be matched without necessarily determining the line number that the diagnostic occurs on.  The new syntax replaces the line number with '*'.  This extension is limited to diagnostics in included files and may be used where the include file is not part of the test-suite itself.

Expected uses are for diagnostics originating in system headers, or for users who use -verify in testing 3rd-party library code where the location of diagnostics in header files may change from revision to revision and their precise location is not important to the success of the test-case.

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

10 years ago[PowerPC] ABI support for non-Altivec vector types
Ulrich Weigand [Thu, 10 Jul 2014 16:39:01 +0000 (16:39 +0000)]
[PowerPC] ABI support for non-Altivec vector types

This patch adds support for passing arguments of non-Altivec vector type
(i.e. defined via attribute ((vector_size (...)))) on powerpc64-linux.

While such types are not mentioned in the formal ABI document, this
patch implements a calling convention compatible with GCC:

- Vectors of size < 16 bytes are passed in a GPR
- Vectors of size > 16 bytes are passed via reference

Note that vector types with a number of elements that is not a power
of 2 are not supported by GCC, so there is no pre-existing ABI to
follow.  We choose to pass those (of size < 16) as if widened to the
next power of two, so they might end up in a vector register or
in a GPR.  (Sizes > 16 are always passed via reference as well.)

Reviewed by Hal Finkel.

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

10 years agoFix clang tests to be compliant with LLVM IR aliases
David Majnemer [Thu, 10 Jul 2014 16:26:19 +0000 (16:26 +0000)]
Fix clang tests to be compliant with LLVM IR aliases

Comdat IR references were mistakenly printed for aliases when they
passed through the IR/AsmWriter code.

This makes clang's tests not check for the existance of these wrongly
printed comdat references.

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

10 years ago[analyzer] Check for code testing a variable for 0 after using it as a denominator.
Jordan Rose [Thu, 10 Jul 2014 16:10:52 +0000 (16:10 +0000)]
[analyzer] Check for code testing a variable for 0 after using it as a denominator.

This new checker, alpha.core.TestAfterDivZero, catches issues like this:

  int sum = ...
  int avg = sum / count; // potential division by zero...
  if (count == 0) { ... } // ...caught here

Because the analyzer does not necessarily explore /all/ paths through a program,
this check is restricted to only work on zero checks that immediately follow a
division operation (/ % /= %=). This could later be expanded to handle checks
dominated by a division operation but not necessarily in the same CFG block.

Patch by Anders Rönnholm! (with very minor modifications by me)

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

10 years ago[Codestyle][x32] Cosmetic codestyle fix.
Zinovy Nis [Thu, 10 Jul 2014 15:42:35 +0000 (15:42 +0000)]
[Codestyle][x32] Cosmetic codestyle fix.

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

10 years ago[x32] Adding X32 target support to driver, including TargetInfo,DescriptionString...
Zinovy Nis [Thu, 10 Jul 2014 15:27:19 +0000 (15:27 +0000)]
[x32] Adding X32 target support to driver, including TargetInfo,DescriptionString, flags, paths lookup, etc. Cover changes with new tests. The author of the patch is Pavel Chupin (@pavel.v.chupin).
The changes enable "hello world" on x32 target (x86_64-*-linux-gnux32). s/isX32/IsX32/ also fixed.

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

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

10 years ago[mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains
Daniel Sanders [Thu, 10 Jul 2014 14:40:57 +0000 (14:40 +0000)]
[mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains

Summary:
* Support the multilib layout used by the mips-img-linux-gnu
* Recognize mips{,64}{,el}-img-linux-gnu as being aliases of mips-img-linux-gnu
* Use the correct dynamic linker for mips-img-linux-gnu
* Make mips32r6/mips64r6 the default CPU for mips-img-linux-gnu

Subscribers: mpf

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

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

10 years ago[mips] Add support for -modd-spreg/-mno-odd-spreg
Daniel Sanders [Thu, 10 Jul 2014 10:39:51 +0000 (10:39 +0000)]
[mips] Add support for -modd-spreg/-mno-odd-spreg

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

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

10 years agoAdd clang headers that fix machine-dependent definitions on FreeBSD 9.2
Viktor Kutuzov [Thu, 10 Jul 2014 08:43:39 +0000 (08:43 +0000)]
Add clang headers that fix machine-dependent definitions on FreeBSD 9.2
Differential Revision: http://reviews.llvm.org/D3908

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

10 years agoPrevent link warnings due to -Wframe-larger-than=
Alp Toker [Thu, 10 Jul 2014 02:13:29 +0000 (02:13 +0000)]
Prevent link warnings due to -Wframe-larger-than=

Although this is nominally a -W option, we actually handle it in the driver
exactly as an f-group flag that's translated directly to -mllvm.

That means f_Group (and unintuitively, not W_Group) has the semantics we want
to make it behave like a standard warning flag: no automatic forwarding, no
warning for link invocations and compile-only.

Silences diagnostics like:

  [691/1545] Linking CXX executable bin/llvm-diff
  clang-3.5: warning: argument unused during compilation: '-Wframe-larger-than=2048'

(Hopefully we can move towards handling these in the frontend but that'll
require some infrastructure work.)

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

10 years agoMS ABI: Fix __fastcall methods that return structs
Reid Kleckner [Thu, 10 Jul 2014 01:58:55 +0000 (01:58 +0000)]
MS ABI: Fix __fastcall methods that return structs

The sret paramater consumes the register after the implicit 'this'
parameter, as with other calling conventions.

Fixes PR20278, which turned out to be very easy.

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

10 years agoCleanup. No functionality change.
Richard Smith [Thu, 10 Jul 2014 01:20:17 +0000 (01:20 +0000)]
Cleanup. No functionality change.

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

10 years ago[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.
Argyrios Kyrtzidis [Thu, 10 Jul 2014 01:03:37 +0000 (01:03 +0000)]
[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.

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

10 years agoDecouple llvm::SpecialCaseList text representation and its LLVM IR semantics.
Alexey Samsonov [Wed, 9 Jul 2014 19:40:08 +0000 (19:40 +0000)]
Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.

Turn llvm::SpecialCaseList into a simple class that parses text files in
a specified format and knows nothing about LLVM IR. Move this class into
LLVMSupport library. Implement two users of this class:
  * DFSanABIList in DFSan instrumentation pass.
  * SanitizerBlacklist in Clang CodeGen library.
The latter will be modified to use actual source-level information from frontend
(source file names) instead of unstable LLVM IR things (LLVM Module identifier).

Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils.

No functionality change.

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

10 years agoSema: Allow aliases to have incomplete type
David Majnemer [Wed, 9 Jul 2014 17:15:52 +0000 (17:15 +0000)]
Sema: Allow aliases to have incomplete type

gcc supports this behavior and it is pervasively used inside the Linux
kernel.

Note that both gcc and clang will reject code that attempts to do this
in a C++ language mode.

This fixes PR17998.

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

10 years ago[mips][mips64r6] Implement -mips32r6 and -mips64r6 aliases to -march=mips32r6 and...
Daniel Sanders [Wed, 9 Jul 2014 14:21:18 +0000 (14:21 +0000)]
[mips][mips64r6] Implement -mips32r6 and -mips64r6 aliases to -march=mips32r6 and -march=mips64r6

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

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

10 years agoProspective legacy build system fix following r212620
Alp Toker [Wed, 9 Jul 2014 14:12:55 +0000 (14:12 +0000)]
Prospective legacy build system fix following r212620

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

10 years agoRemove dead code from r212620
Alp Toker [Wed, 9 Jul 2014 14:09:52 +0000 (14:09 +0000)]
Remove dead code from r212620

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

10 years agoFix 'source-level' hyphenations
Alp Toker [Wed, 9 Jul 2014 14:06:35 +0000 (14:06 +0000)]
Fix 'source-level' hyphenations

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

10 years agocc1as: consolidate option flags with cc1 and eliminate duplication
Alp Toker [Wed, 9 Jul 2014 14:05:11 +0000 (14:05 +0000)]
cc1as: consolidate option flags with cc1 and eliminate duplication

The clang -cc1as options are nearly a strict subset of -cc1. Instead of
duplicating the definitions and documentation, let's go ahead and share the
definitions in a similar way the current handling of combined driver and
frontend flags, eliminating some of the vestigial legacy surrounding the
assembler subcommand.

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

10 years ago[mips][mips64r6] Define _MIPS_FPSET, __mips_fpr, and __mips_nan2008 correctly on...
Daniel Sanders [Wed, 9 Jul 2014 13:56:23 +0000 (13:56 +0000)]
[mips][mips64r6] Define _MIPS_FPSET, __mips_fpr, and __mips_nan2008 correctly on MIPS32r6/MIPS64r6

Summary:
This removes the need to pass -mnan=2008 explicitly to be able to compile
the test-suite for MIPS32r6/MIPS64r6.

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

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

10 years ago[mips] clz is defined to give 32 for zero. Similarly, dclz gives 64.
Daniel Sanders [Wed, 9 Jul 2014 13:43:19 +0000 (13:43 +0000)]
[mips] clz is defined to give 32 for zero. Similarly, dclz gives 64.

Summary:
While debugging another issue, I noticed that Mips currently specifies that the
count leading zero builtins are undefined when the input is zero. The
architecture specifications say that the clz and dclz instructions write 32 or
64 respectively when given zero.

This doesn't fix any bugs that I'm aware of but it may improve optimisation in
some cases.

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

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

10 years agoclang-format: Fix behavior around pointer-to-member invocations.
Daniel Jasper [Wed, 9 Jul 2014 13:07:57 +0000 (13:07 +0000)]
clang-format: Fix behavior around pointer-to-member invocations.

Before:
  (aaaaaaaaaa->*
   bbbbbbb)(aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa));

After:
  (aaaaaaaaaa->*bbbbbbb)(
      aaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaa));

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

10 years agoFixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVi...
Alexey Bataev [Wed, 9 Jul 2014 10:00:31 +0000 (10:00 +0000)]
Fixed incompatibility with MSVC builds in range-based for loops in DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs.

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

10 years agoRevert commit 212599.
Alexey Bataev [Wed, 9 Jul 2014 09:50:46 +0000 (09:50 +0000)]
Revert commit 212599.

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

10 years ago[OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDir...
Alexey Bataev [Wed, 9 Jul 2014 09:33:29 +0000 (09:33 +0000)]
[OPENMP] Fixed incompatibility in [Data]RecursiveASTVisitor::TraverseOMPExecutableDirective method with MSVC for range-based loops.

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

10 years agoARM: use LLVM's atomicrmw instructions when ldrex/strex are available.
Tim Northover [Wed, 9 Jul 2014 09:24:43 +0000 (09:24 +0000)]
ARM: use LLVM's atomicrmw instructions when ldrex/strex are available.

Having some kind of weird kernel-assisted ABI for these when the
native instructions are available appears to be (and should be) the
exception; OSs have been gradually opting in for years and the code
was getting silly.

So let LLVM decide whether it's possible/profitable to inline them by
default.

Patch by Phoebe Buckheister.

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

10 years agoclang-format: Add new option to indent wrapped function declarations.
Daniel Jasper [Wed, 9 Jul 2014 08:42:42 +0000 (08:42 +0000)]
clang-format: Add new option to indent wrapped function declarations.

Though not completely identical, make former
IndentFunctionDeclarationAfterType change this flag for backwards
compatibility (it is somewhat close in meaning and better the err'ing on
an unknown config flag).

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

10 years agoclang-format: Update flag documentation.
Daniel Jasper [Wed, 9 Jul 2014 08:19:11 +0000 (08:19 +0000)]
clang-format: Update flag documentation.

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

10 years ago[OPENMP] Improved code of DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP...
Alexey Bataev [Wed, 9 Jul 2014 08:00:46 +0000 (08:00 +0000)]
[OPENMP] Improved code of DataRecursiveASTVisitor and RecursiveASTVisitor for OpenMP constructs per Tobias Grosser comments.

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

10 years agoclang-format: Revamp function declaration/definition indentation.
Daniel Jasper [Wed, 9 Jul 2014 07:50:33 +0000 (07:50 +0000)]
clang-format: Revamp function declaration/definition indentation.

Key changes:
- Correctly (well ...) distinguish function declarations and variable
  declarations with ()-initialization.
- Don't indent when breaking function declarations/definitions after the
  return type.
- Indent variable declarations and typedefs when breaking after the
  type.

This fixes llvm.org/PR17999.

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

10 years agoFix typos.
Nikola Smiljanic [Wed, 9 Jul 2014 05:42:35 +0000 (05:42 +0000)]
Fix typos.

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

10 years agoclang-interpreter: don't check input file existence, we're in-process
Alp Toker [Wed, 9 Jul 2014 01:37:36 +0000 (01:37 +0000)]
clang-interpreter: don't check input file existence, we're in-process

This flag is set by most other tools and avoids extra stat() calls. The
frontend will diagnose anyway as it performs the check atomically while opening
files at point of use.

We could probably make Driver::CheckInputsExist default to false and only
enable it in the main 'clang' binary, or even better only perform the checks if
we know the tool is external but that needs more thought.

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

10 years agoSimplify warning flag value handling from r206826
Alp Toker [Wed, 9 Jul 2014 01:37:24 +0000 (01:37 +0000)]
Simplify warning flag value handling from r206826

Also give the field it a more appropriate name and improve the docs.

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

10 years agorewrap to 80 cols, no behavior change
Nico Weber [Tue, 8 Jul 2014 23:54:25 +0000 (23:54 +0000)]
rewrap to 80 cols, no behavior change

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

10 years agorewrap to 80 cols, no behavior change
Nico Weber [Tue, 8 Jul 2014 23:46:20 +0000 (23:46 +0000)]
rewrap to 80 cols, no behavior change

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

10 years agoMS compat: Allow lookup of types from dependent bases in functions
Reid Kleckner [Tue, 8 Jul 2014 21:35:03 +0000 (21:35 +0000)]
MS compat: Allow lookup of types from dependent bases in functions

If we want to resolve the remaining FIXMEs here, we probably want to
extend the main lookup mechanism to perform lookup into dependent bases,
but we would have to tread lightly.  Adding more name lookup has major
impact on compile time.

If we did extend the main mechanism, we would add a flag to LookupResult
that allows us to find names from dependent base classes where the base
is a specialization of a known template.  The final LookupResult would
still return LookupResult::NotFoundInCurrentInstantiation, but it would
have a collection of Decls.  If we find a real lookup result, we would
clear the flag and the existing lookup results and begin accumulating
only real lookup results.

We would structure the lookup as a secondary lookup between normal
lookup and typo correction for normal compilation, but for MSVC
compatibility mode, we would always enable this extra lookup into
dependent bases.

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

10 years agoRemove unnecessary check for NULL
Alexey Samsonov [Tue, 8 Jul 2014 20:23:18 +0000 (20:23 +0000)]
Remove unnecessary check for NULL

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

10 years agotest: merge arm-intrin into ms-intrin, fix invocation
Saleem Abdulrasool [Tue, 8 Jul 2014 20:21:29 +0000 (20:21 +0000)]
test: merge arm-intrin into ms-intrin, fix invocation

This merges the two tests into one since there is no real reason to separate
them.  It also fixes the test invocation to specify -fms-compatibility without
which we would end up without an Intrin.h header.

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

10 years agoAllow more lookup of types in dependent base classes
Reid Kleckner [Tue, 8 Jul 2014 20:05:48 +0000 (20:05 +0000)]
Allow more lookup of types in dependent base classes

MSVC appears to perform name lookup into dependent base classes when the
dependent base class has a known primary template.  This allows them to
know whether some unqualified ids are types or not, which allows them to
parse more class templates without typename keywords.

We can do the same thing when type name lookup fails, and if we find a
single type decl in one of our dependent base classes, recover as though
the user wrote 'typename MyClass::TypeFromBase'.

This allows us to parse some COM smart pointer classes in wrl/client.h
from the Windows 8 SDK.

Reviewers: rsmith

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

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

10 years agoDon't pull in setjmp.h in -ffreestanding compiles.
Nico Weber [Tue, 8 Jul 2014 18:34:46 +0000 (18:34 +0000)]
Don't pull in setjmp.h in -ffreestanding compiles.

Also provide _setjmpex(). r200243 put in _setjmp() and _setjmpex() behind a
comment since jmp_buf wasn't available. r200344 added jmp_buf and put in
_setjmp(), but missed _setjmpex().

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

10 years agoReplace a few // comments with /**/ comments in headers, for consistency.
Nico Weber [Tue, 8 Jul 2014 18:29:27 +0000 (18:29 +0000)]
Replace a few // comments with /**/ comments in headers, for consistency.

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

10 years agoSema: Don't allow CVR qualifiers before structors
David Majnemer [Tue, 8 Jul 2014 18:18:04 +0000 (18:18 +0000)]
Sema: Don't allow CVR qualifiers before structors

We would silently accept volatile ~S() when the user probably intended
to write virtual ~S().

This fixes PR20238.

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

10 years agoPR20227: materialize a temporary when dynamic_casting a class prvalue to a
Richard Smith [Tue, 8 Jul 2014 17:25:14 +0000 (17:25 +0000)]
PR20227: materialize a temporary when dynamic_casting a class prvalue to a
reference type.

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

10 years agoUpdate unit test for signature change.
Benjamin Kramer [Tue, 8 Jul 2014 16:07:39 +0000 (16:07 +0000)]
Update unit test for signature change.

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

10 years agoTurn some Twine locals into const char * variables.
Benjamin Kramer [Tue, 8 Jul 2014 16:07:36 +0000 (16:07 +0000)]
Turn some Twine locals into const char * variables.

No functionality change, just stylistic cleanup. Change made by clang-tidy
and clang-format.

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

10 years agoImprove memory ownership of vfs::Files in the FileSystemStatCache by using std::uniqu...
David Blaikie [Tue, 8 Jul 2014 15:46:02 +0000 (15:46 +0000)]
Improve memory ownership of vfs::Files in the FileSystemStatCache by using std::unique_ptr

Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.

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

10 years ago[OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.
Alexander Musman [Tue, 8 Jul 2014 11:33:21 +0000 (11:33 +0000)]
[OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.

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

10 years agoMove misplaced x86_32 ABI code
Richard Sandiford [Tue, 8 Jul 2014 11:10:34 +0000 (11:10 +0000)]
Move misplaced x86_32 ABI code

r184166 added an X86_32 function in the middle of the SystemZ code.
The SystemZ port had been added only a couple of weeks earlier and
the original patch probably predated that.

No behavioral change intended.

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

10 years ago[OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.
Alexey Bataev [Tue, 8 Jul 2014 08:12:03 +0000 (08:12 +0000)]
[OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.

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

10 years agoHeaders: conditionalise more declarations
Saleem Abdulrasool [Tue, 8 Jul 2014 05:46:04 +0000 (05:46 +0000)]
Headers: conditionalise more declarations

Protect MMX specific declarations under a __MMX__ guard.  This header can be
included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.
Use the preprocessor to prevent these declarations from being processed.

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

10 years agoHeaders: mark arm_acle.h with extern "C"
Saleem Abdulrasool [Tue, 8 Jul 2014 05:46:00 +0000 (05:46 +0000)]
Headers: mark arm_acle.h with extern "C"

Although the functions are marked as always_inline, the compiler with which they
are used may not honour the extended attributes and emit them as functions.  In
such a case, indicate that they should have extern "C" linkage and should not be
mangled in C++ style if used within C++.

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

10 years agoMS ABI: "Fix" passing non-POD structs by value to variadic functions
Reid Kleckner [Tue, 8 Jul 2014 02:24:27 +0000 (02:24 +0000)]
MS ABI: "Fix" passing non-POD structs by value to variadic functions

Of course, such code is horribly broken and will explode on impact.
That said, ATL does it, and we have to support them, at least a little
bit.

Fixes PR20191.

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

10 years ago[ASan] Completely remove sanitizer blacklist file from instrumentation pass.
Alexey Samsonov [Tue, 8 Jul 2014 00:50:49 +0000 (00:50 +0000)]
[ASan] Completely remove sanitizer blacklist file from instrumentation pass.

All blacklisting logic is now moved to the frontend (Clang).
If a function (or source file it is in) is blacklisted, it doesn't
get sanitize_address attribute and is therefore not instrumented.
If a global variable (or source file it is in) is blacklisted, it is
reported to be blacklisted by the entry in llvm.asan.globals metadata,
and is not modified by the instrumentation.

The latter may lead to certain false positives - not all the globals
created by Clang are described in llvm.asan.globals metadata (e.g,
RTTI descriptors are not), so we may start reporting errors on them
even if "module" they appear in is blacklisted. We assume it's fine
to take such risk:
  1) errors on these globals are rare and usually indicate wild memory access
  2) we can lazily add descriptors for these globals into llvm.asan.globals
     lazily.

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

10 years agoRename static function to better describe its purpose
Alp Toker [Tue, 8 Jul 2014 00:02:05 +0000 (00:02 +0000)]
Rename static function to better describe its purpose

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

10 years ago[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Alexey Samsonov [Mon, 7 Jul 2014 23:59:57 +0000 (23:59 +0000)]
[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist
(in CodeGenFunction::StartFunction) and turning off instrumentation,
if necessary.

No functionality change.

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

10 years ago[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule
Alexey Samsonov [Mon, 7 Jul 2014 23:34:34 +0000 (23:34 +0000)]
[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule

Get rid of cached CodeGenModule::SanOpts, which was used to turn off
sanitizer codegen options if current LLVM Module is blacklisted, and use
plain LangOpts.Sanitize instead.

1) Some codegen decisions (turning TBAA or writable strings on/off)
   shouldn't depend on the contents of blacklist.

2) llvm.asan.globals should *always* be created, even if the module
   is blacklisted - soon Clang's CodeGen where we read sanitizer
   blacklist files, so we should properly report which globals are
   blacklisted to the backend.

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

10 years agolibclang: pass return code out argument by reference
Alp Toker [Mon, 7 Jul 2014 22:42:03 +0000 (22:42 +0000)]
libclang: pass return code out argument by reference

r212427 formalized the message-passing pattern by making these argument
structures const. This commit changes output arguments to get passed by
reference so we can eliminate mutable fields.

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

10 years agoASTContext: Factor 'getObjCEncodingForPropertyType' as its own method.
Joe Groff [Mon, 7 Jul 2014 22:25:15 +0000 (22:25 +0000)]
ASTContext: Factor 'getObjCEncodingForPropertyType' as its own method.

It is useful to get the property encoding for an ObjC type without a full
ObjCPropertyDecl.

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

10 years agoPlistSupport: make utility functions non-static inline to encourage linker dedup
Alp Toker [Mon, 7 Jul 2014 21:57:42 +0000 (21:57 +0000)]
PlistSupport: make utility functions non-static inline to encourage linker dedup

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

10 years agoDriver: Produce crash diagnostics more often on Windows
Reid Kleckner [Mon, 7 Jul 2014 20:23:27 +0000 (20:23 +0000)]
Driver: Produce crash diagnostics more often on Windows

Assertion failures call abort(), which return an exit code of 3 on
Windows.  The 'not' utility has the same check.

Unfortunately, the crash-report.c test requires a shell, so it does not
run for me locally, so I can only test this manually.

There's still more work to be done here: we should generate a batch
script instead of a shell script on Windows.

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

10 years agoDriver: Fix think-o in adding -ivfsoverlay flag to crashdumps
Justin Bogner [Mon, 7 Jul 2014 17:34:40 +0000 (17:34 +0000)]
Driver: Fix think-o in adding -ivfsoverlay flag to crashdumps

If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay
flag.

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

10 years agoUse temporary module cache in test
Ben Langmuir [Mon, 7 Jul 2014 17:34:37 +0000 (17:34 +0000)]
Use temporary module cache in test

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

10 years agoFix memory leak in FileSystemStatCache.
Manuel Klimek [Mon, 7 Jul 2014 17:00:49 +0000 (17:00 +0000)]
Fix memory leak in FileSystemStatCache.

Patch by Guochun Shi.

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

10 years agoHandle __builtin_clzs and __builtin_ctzs in the constant expression evaluator.
Anders Carlsson [Mon, 7 Jul 2014 15:53:44 +0000 (15:53 +0000)]
Handle __builtin_clzs and __builtin_ctzs in the constant expression evaluator.

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

10 years agoMS ABI: Don't unnecessarily use CGM abstraction
David Majnemer [Mon, 7 Jul 2014 15:29:16 +0000 (15:29 +0000)]
MS ABI: Don't unnecessarily use CGM abstraction

If we are in MicrosoftCXXABI, we don't need to use CGM to get a
TypeDescriptor.

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

10 years agoFix comment typo.
David Majnemer [Mon, 7 Jul 2014 15:29:10 +0000 (15:29 +0000)]
Fix comment typo.

No functionality changed.

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

10 years agoPTHInternals.rst: PCH is now a thing, update docs to reflect it
Alp Toker [Mon, 7 Jul 2014 14:02:39 +0000 (14:02 +0000)]
PTHInternals.rst: PCH is now a thing, update docs to reflect it

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

10 years agoPTH: use a variable instead of a macro
Alp Toker [Mon, 7 Jul 2014 14:01:37 +0000 (14:01 +0000)]
PTH: use a variable instead of a macro

Cleanup only.

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

10 years ago[OPENMP] Added initial support for 'omp parallel for'.
Alexey Bataev [Mon, 7 Jul 2014 13:01:15 +0000 (13:01 +0000)]
[OPENMP] Added initial support for 'omp parallel for'.

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

10 years agoIncrease argument limit of anyOf, allOf and eachOf from 5 to 9.
Manuel Klimek [Mon, 7 Jul 2014 12:55:16 +0000 (12:55 +0000)]
Increase argument limit of anyOf, allOf and eachOf from 5 to 9.

Patch by Alexey Sokolov.

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

10 years agoMove ChainedIncludesSource into the implementation
Alp Toker [Mon, 7 Jul 2014 11:07:10 +0000 (11:07 +0000)]
Move ChainedIncludesSource into the implementation

This doesn't need to be in the headers.

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

10 years agoChainedIncludesSource: avoid copying n*(n+1)/2 file contents into memory
Alp Toker [Mon, 7 Jul 2014 11:06:51 +0000 (11:06 +0000)]
ChainedIncludesSource: avoid copying n*(n+1)/2 file contents into memory

Just reference the data instead with shallow MemoryBuffer instances.

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

10 years agoPointerLoc does not exist anymore.
Yaron Keren [Mon, 7 Jul 2014 09:52:31 +0000 (09:52 +0000)]
PointerLoc does not exist anymore.
SourceLocation is available from TypeLoc member functions.

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

10 years agoRevert "Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt (r212445)"
Tobias Grosser [Mon, 7 Jul 2014 09:39:09 +0000 (09:39 +0000)]
Revert "Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt (r212445)"

I misidentified the problem and did not test suffifiently. The files had
correctly been removed, but for some reason they still remained in my git
checkout. Not adding the files back to CMakeLists.txt, but rather removing
the stale files was the solution. Sorry for the unnecessary noise.

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

10 years agoAdd lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt
Tobias Grosser [Mon, 7 Jul 2014 09:23:06 +0000 (09:23 +0000)]
Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt

This fixes the cmake builds.

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

10 years agoSwitch over a few uses of param_begin() to parameters()
Alp Toker [Mon, 7 Jul 2014 09:02:20 +0000 (09:02 +0000)]
Switch over a few uses of param_begin() to parameters()

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

10 years agoRemove unused sys/stat.h includes
Alp Toker [Mon, 7 Jul 2014 08:37:15 +0000 (08:37 +0000)]
Remove unused sys/stat.h includes

The facility was abstracted to LLVM in r187364.

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

10 years agoCodeGen: Cleanup MS ABI RTTI LLVM IR
David Majnemer [Mon, 7 Jul 2014 08:09:15 +0000 (08:09 +0000)]
CodeGen: Cleanup MS ABI RTTI LLVM IR

The MS ABI RTTI emission code would choose names for IR types like
%"MSRTTITypeDescriptor\02".  This name is undesirable because it
requires escaping; the underlying reason for this is that the name is
unprintable.  Fix this by naming it %rtti.TypeDescriptor2.

While here, stop trying to do lookups in the LLVM Module's type table.
Instead, store the IR types in MicrosoftCXXABI.  Lookups by name aren't
particularly fast.

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

10 years agoPeel away old-style file remapping typedefs and cruft
Alp Toker [Mon, 7 Jul 2014 07:47:20 +0000 (07:47 +0000)]
Peel away old-style file remapping typedefs and cruft

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