]> granicus.if.org Git - clang/log
clang
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

10 years agoFix an iterator invalidation issue: deserializing a key function can write to
Richard Smith [Mon, 7 Jul 2014 06:38:20 +0000 (06:38 +0000)]
Fix an iterator invalidation issue: deserializing a key function can write to
the key functions table. Don't hold references to anything within that table
across such an access.

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

10 years agoStaticAnalyzer: Silence a warning
David Majnemer [Mon, 7 Jul 2014 06:20:50 +0000 (06:20 +0000)]
StaticAnalyzer: Silence a warning

ExprEngine wasn't ready for SEHLeaveStmtClass.  Handle it like all the
other SEH constructs by aborting.

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

10 years agoCodeGen: Refactor RTTI emission
David Majnemer [Mon, 7 Jul 2014 06:20:47 +0000 (06:20 +0000)]
CodeGen: Refactor RTTI emission

Let's not expose ABI specific minutia inside of CodeGenModule and Type.
Instead, let's abstract it through CXXABI.

This gets rid of:
CodeGenModule::getCompleteObjectLocator,
CodeGenModule::EmitFundamentalTypeDescriptor{s,},
CodeGenModule::getMSTypeDescriptor,
CodeGenModule::getMSCompleteObjectLocator,
CGCXXABI::shouldRTTIBeUnique,
CGCXXABI::classifyRTTIUniqueness.

CGRTTI was *almost* entirely centered around providing Itanium-style
RTTI information.  Instead of providing interfaces that only it
consumes, move it to the ItaniumCXXABI implementation file.  This allows
it to have access to Itanium-specific implementation details without
providing useless expansion points for the Microsoft ABI side.

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

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

10 years agoFix layering of file remapping and header search initialization
Alp Toker [Mon, 7 Jul 2014 06:05:00 +0000 (06:05 +0000)]
Fix layering of file remapping and header search initialization

These two functions initialize the source manager and header search objects and
shouldn't be in InitPreprocessor which is concerned with priming the
preprocessor itself and predefining macros.

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

10 years agoAdd an explicit diagnostic for the case where an expression is not a constant
Richard Smith [Mon, 7 Jul 2014 06:00:13 +0000 (06:00 +0000)]
Add an explicit diagnostic for the case where an expression is not a constant
expression because it uses 'this'. Inspired by PR20219 comment#2.

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

10 years agoCleanup. No functionality change intended.
Richard Smith [Mon, 7 Jul 2014 05:36:14 +0000 (05:36 +0000)]
Cleanup. No functionality change intended.

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

10 years agolibclang: refactor handling of unsaved_files
Alp Toker [Mon, 7 Jul 2014 01:23:14 +0000 (01:23 +0000)]
libclang: refactor handling of unsaved_files

Consolidate CXUnsavedFile argument handling in API functions to support a wider
cleanup of various file remapping schemes in the frontend.

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

10 years agoUpdate internals manual on how to add AST nodes.
Nico Weber [Mon, 7 Jul 2014 00:50:39 +0000 (00:50 +0000)]
Update internals manual on how to add AST nodes.

StmtDumper.cpp is called ASTDumper.cpp these days, and usually works well
for new AST nodes without changes.  There's now DataRecursiveASTVisitor
in addition to RecursiveASTVisitor, and serialization wasn't mentioned.

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

10 years agoAdd an AST node for __leave statements, hook it up.
Nico Weber [Mon, 7 Jul 2014 00:12:30 +0000 (00:12 +0000)]
Add an AST node for __leave statements, hook it up.

Codegen is still missing (and I won't work on that), but __leave is now
as implemented as __try and friends.

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

10 years agoSema: Check that __leave is contained in a __try block.
Nico Weber [Sun, 6 Jul 2014 22:53:19 +0000 (22:53 +0000)]
Sema: Check that __leave is contained in a __try block.

Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema
walk the scope chain to find the SEHTry parent on __leave statements.
(They are rare enough that it seems better to do the walk instead of
giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.)

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

10 years agoAdd parser support for __leave (sema and onward still missing).
Nico Weber [Sun, 6 Jul 2014 22:32:59 +0000 (22:32 +0000)]
Add parser support for __leave (sema and onward still missing).

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

10 years agoGiving this test a triple to satisfy the build bots.
Aaron Ballman [Sun, 6 Jul 2014 20:07:16 +0000 (20:07 +0000)]
Giving this test a triple to satisfy the build bots.

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

10 years agoThe MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed...
Aaron Ballman [Sun, 6 Jul 2014 20:04:10 +0000 (20:04 +0000)]
The MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF.

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

10 years agoThis test case does not require -Wno-missing-declarations or -x objective-c++.
Aaron Ballman [Sun, 6 Jul 2014 19:44:38 +0000 (19:44 +0000)]
This test case does not require -Wno-missing-declarations or -x objective-c++.

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

10 years agoMove InterlockedBitTestAndSet into its own test file
Ehsan Akhgari [Sun, 6 Jul 2014 18:45:44 +0000 (18:45 +0000)]
Move InterlockedBitTestAndSet into its own test file

Summary:
This gives us back the test coverage we lost when I made
MicrosoftExtensions.c x86-only.

Reviewers: majnemer

Subscribers: cfe-commits

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

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 17:43:24 +0000 (17:43 +0000)]
Update for llvm api change.

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

10 years agoFix typo in comment.
Nick Lewycky [Sun, 6 Jul 2014 17:32:10 +0000 (17:32 +0000)]
Fix typo in comment.

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

10 years agoPlistSupport.h: avoid gcc 'defined but not used' warning
Alp Toker [Sun, 6 Jul 2014 07:59:14 +0000 (07:59 +0000)]
PlistSupport.h: avoid gcc 'defined but not used' warning

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

10 years agolibclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS
Alp Toker [Sun, 6 Jul 2014 06:24:00 +0000 (06:24 +0000)]
libclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS

Although these aren't strictly related to LLVM's core threading, it's
reasonable to avoid pthread usage in clang when building with
LLVM_ENABLE_THREADS disabled.

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

10 years agoModernize a couple of loops
Alp Toker [Sun, 6 Jul 2014 06:09:20 +0000 (06:09 +0000)]
Modernize a couple of loops

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

10 years agoFix the MicrosoftExtensions.c target
Ehsan Akhgari [Sun, 6 Jul 2014 05:58:55 +0000 (05:58 +0000)]
Fix the MicrosoftExtensions.c target

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

10 years agoEnable the InterlockedBitTestAndSet test
Ehsan Akhgari [Sun, 6 Jul 2014 05:50:19 +0000 (05:50 +0000)]
Enable the InterlockedBitTestAndSet test

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

10 years agoAdd support for nested blocks in Microsoft inline assembly
Ehsan Akhgari [Sun, 6 Jul 2014 05:26:54 +0000 (05:26 +0000)]
Add support for nested blocks in Microsoft inline assembly

This fixes http://llvm.org/PR20204.

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

10 years agoUse non-intrusive refcounting for TargetOptions
Alp Toker [Sun, 6 Jul 2014 05:26:44 +0000 (05:26 +0000)]
Use non-intrusive refcounting for TargetOptions

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

10 years agoUse non-intrusive refcounting for LangOptions
Alp Toker [Sun, 6 Jul 2014 05:26:07 +0000 (05:26 +0000)]
Use non-intrusive refcounting for LangOptions

This type is only refcounted in a couple of places so making ownership explicit
improves clarity.

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

10 years agoConstify a read-only parameter and give function a better name
Alp Toker [Sun, 6 Jul 2014 05:14:24 +0000 (05:14 +0000)]
Constify a read-only parameter and give function a better name

This makes it clear that TargetInfo doesn't capture the LangOptions object,
rather uses it to apply adjustments.

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

10 years agowriteARCDiagsToPlist(): make sure all diag levels get handled
Alp Toker [Sun, 6 Jul 2014 04:27:03 +0000 (04:27 +0000)]
writeARCDiagsToPlist(): make sure all diag levels get handled

Handle 'remark' level diagnostics as warnings instead of supplemental notes,
and use a covered switch to ensure the mapping is kept up to date.

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

10 years agoUse PlistSupport in a few more places
Alp Toker [Sun, 6 Jul 2014 04:26:52 +0000 (04:26 +0000)]
Use PlistSupport in a few more places

Switch over LogDiagnosticPrinter and introduce an integer helper.

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

10 years agoclang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
Nico Weber [Sun, 6 Jul 2014 03:04:24 +0000 (03:04 +0000)]
clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.

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

10 years agoRemove leftovers of '-arcmt-modify-in-memory' from r133315
Alp Toker [Sat, 5 Jul 2014 22:12:36 +0000 (22:12 +0000)]
Remove leftovers of '-arcmt-modify-in-memory' from r133315

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

10 years agoCodeGen: add support for a few MSVC ARM intrinsics
Saleem Abdulrasool [Sat, 5 Jul 2014 20:10:05 +0000 (20:10 +0000)]
CodeGen: add support for a few MSVC ARM intrinsics

This adds support for simple MSVC compatibility mode intrinsics.  These
intrinsics are simple in that they are either directly passed through to the
annotated MSBuiltin intrinsic or they mirror existing GCC builtins.

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

10 years agoAdd a test case for the tilde operator in Microsoft inline assembly
Ehsan Akhgari [Sat, 5 Jul 2014 15:04:06 +0000 (15:04 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly

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

10 years agoTrack IntrusiveRefCntPtr::get() changes from LLVM r212366
Alp Toker [Sat, 5 Jul 2014 03:08:06 +0000 (03:08 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

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

10 years agoCodeGen: add support for MSBuiltin aliases
Saleem Abdulrasool [Fri, 4 Jul 2014 21:49:39 +0000 (21:49 +0000)]
CodeGen: add support for MSBuiltin aliases

This completes the infrastructure for the new MSBuiltin aliases in the
instruction definitions.  These behave similar to the GCCBuiltin in that they
can be implicitly constructed without special handling unless needed.

With this change it is possible to annotate an LLVM intrinsic in the backend
instruction definitions and indicate it as a builtin in the Builtin*.def files
in clang via LANGBUILTIN.  That will automatically pass through the instruction
much as a GCCBuiltin.

Note that there is no need for the special handling for ensuring that the
compatibility flag is enabled since the filtering on the LANGBUILTIN will
automatically prevent the intrinsic from bleeding into non-MS compatible
compiler invocations.

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

10 years agoPrune some ignored warning options
Alp Toker [Fri, 4 Jul 2014 20:42:50 +0000 (20:42 +0000)]
Prune some ignored warning options

These are forms that have either slipped in without being requested for
compatibility or that GCC doesn't support in the first place.

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

10 years agoFix up the test that expects the failure fixed in r212352
Ehsan Akhgari [Fri, 4 Jul 2014 19:22:29 +0000 (19:22 +0000)]
Fix up the test that expects the failure fixed in r212352

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

10 years ago[Driver][Mips] Support one more MIPS CPU name - octeon.
Simon Atanasyan [Fri, 4 Jul 2014 12:37:04 +0000 (12:37 +0000)]
[Driver][Mips] Support one more MIPS CPU name - octeon.

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

10 years ago[Driver][Mips] Support more MIPS CPU names: mips1 - mips5.
Simon Atanasyan [Fri, 4 Jul 2014 12:36:56 +0000 (12:36 +0000)]
[Driver][Mips] Support more MIPS CPU names: mips1 - mips5.

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

10 years agogcc comptability: silent -fdefer-pop & -fno-defer-pop
Sylvestre Ledru [Fri, 4 Jul 2014 08:59:41 +0000 (08:59 +0000)]
gcc comptability: silent -fdefer-pop & -fno-defer-pop

Reviewers: rafael, rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

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

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

10 years agoLet test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.
NAKAMURA Takumi [Fri, 4 Jul 2014 05:11:55 +0000 (05:11 +0000)]
Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.

This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.

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

10 years agoTrailing linefeed
NAKAMURA Takumi [Fri, 4 Jul 2014 04:20:49 +0000 (04:20 +0000)]
Trailing linefeed

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

10 years agoFixed test CodeGen/captured-statements.c for powerpc64-linux.
Alexey Bataev [Fri, 4 Jul 2014 04:06:11 +0000 (04:06 +0000)]
Fixed test CodeGen/captured-statements.c for powerpc64-linux.

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

10 years agoMake a small crash preventing change.
Fariborz Jahanian [Thu, 3 Jul 2014 21:06:20 +0000 (21:06 +0000)]
Make a small crash preventing change.

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

10 years agoRestore global static array in test case
Gerolf Hoflehner [Thu, 3 Jul 2014 19:30:33 +0000 (19:30 +0000)]
Restore global static array in test case

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

10 years agoThe RTTI fallback is no more. Remove outdated diagnostic.
Benjamin Kramer [Thu, 3 Jul 2014 18:43:26 +0000 (18:43 +0000)]
The RTTI fallback is no more. Remove outdated diagnostic.

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