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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Yi Kong [Thu, 3 Jul 2014 16:01:25 +0000 (16:01 +0000)]
[ARM] Implement ISB memory barrier intrinsic
Adds support for __builtin_arm_isb. Also corrects DSB and ISB instructions
modelling by adding has-side-effects property.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212277
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 3 Jul 2014 10:14:52 +0000 (10:14 +0000)]
Add the __qdbl intrinsic to the arm_acle.h header
Patch by: Moritz Roth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212264
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Thu, 3 Jul 2014 09:30:33 +0000 (09:30 +0000)]
Move the calling of emitTargetMD() later.
Summary:
Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz:
extern char a[];
char f(){ return a[5];}
char a[10];
Change MangledDeclNames to use a MapVector rather than a DenseMap so that the
Metadata is output in order of original declaration, so to make deterministic
and improve human readablity.
Differential Revision: http://reviews.llvm.org/D4176
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212263
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Thu, 3 Jul 2014 09:30:29 +0000 (09:30 +0000)]
refactor for-loop as range-loop before making changes.
Differential Revision: http://reviews.llvm.org/D4176
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212262
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Pirker [Thu, 3 Jul 2014 09:28:12 +0000 (09:28 +0000)]
ARMEB: Fix function result return for composite types
Reviewed at http://reviews.llvm.org/D4364
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212261
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 3 Jul 2014 08:31:23 +0000 (08:31 +0000)]
[Driver][Mips] Check MIPS CPU name provided to the Clang driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212260
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 3 Jul 2014 05:51:27 +0000 (05:51 +0000)]
MS ABI: Get linkage of RTTI data correct
The Itanium rules are not appropriate for the MS ABI. RTTI data is
_never_ imported and thus is never available_externally. It is either
internal (if the type's linkage is internal) or linkonce_odr.
This also means that classes which inherit from dllimport'd bases force
their translation unit to duplicate the entirety of the RTTI data of
that base.
Interestingly, the complete object locator can never be referenced by
translation units which import the class.
This fixes PR20106.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212256
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 3 Jul 2014 02:43:20 +0000 (02:43 +0000)]
ARM: rename ARM builtins to use __builtin_arm prefix
This corrects SVN r212196's naming change to use the proper prefix of
`__builtin_arm_` instead of `__builtin_`.
Thanks to Yi Kong for pointing out the incorrect naming!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212253
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 3 Jul 2014 00:38:25 +0000 (00:38 +0000)]
Address review feedback for r212238.
Also, forgot to say in the commit message of r212238: Library authors will
see a warning about this issue if they build with -Wsystem-headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212243
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 2 Jul 2014 23:51:09 +0000 (23:51 +0000)]
Enable clang to continue to parse libstdc++4.6 and stlport after r210091.
r210091 made initialization checking more strict in c++11 mode. LWG2193 is
about changing standard libraries to still be valid under these new rules,
but older libstdc++ (e.g. libstdc++4.6 in -D_GLIBCXX_DEBUG=1 mode, or stlport)
do not implement that yet. So fall back to the C++03 semantics for container
classes in system headers below the std namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212238
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 2 Jul 2014 23:37:33 +0000 (23:37 +0000)]
Update the MSVC compatibilty document for class template parsing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212237
91177308-0d34-0410-b5e6-
96231b3b80d8
Larisse Voufo [Wed, 2 Jul 2014 23:08:34 +0000 (23:08 +0000)]
Fix linkage bug that miscompiled variable templates instantiated from similarly named local types. In essence, this bug ensures that the x<Foo> specialization in function foo() defined as follows differs between two distinct translation units.
static int &foo() {
struct Foo { };
return x<Foo>;
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212233
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Jul 2014 22:14:34 +0000 (22:14 +0000)]
More editorial issues in MSVCCompatibility.rst
Make the status text for lambdas green.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212229
91177308-0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Wed, 2 Jul 2014 21:46:03 +0000 (21:46 +0000)]
Fix Typo in MSVCCompatibility.rst
Also removed a sentance that was no longer relevant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212227
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Jul 2014 21:09:33 +0000 (21:09 +0000)]
Fixup typo in MSVCCompatibility.rst
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212219
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 2 Jul 2014 17:41:27 +0000 (17:41 +0000)]
CodeGen: make target builtins support languages
This extends the target builtin support to allow language specific annotations
(i.e. LANGBUILTIN). This is to allow MSVC compatibility whilst retaining the
ability to have EABI targets use a __builtin_ prefix. This is merely to allow
uniformity in the EABI case where the unprefixed name is provided as an alias in
the header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212196
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 2 Jul 2014 17:26:04 +0000 (17:26 +0000)]
Update the MSVC Compatibility document
It hasn't been updated to reflect the progress we've made. We've fuzz
tested VFTables, VBTables, layout, and RTTI data. We support lambdas
that are compatible with their scheme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212193
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Wed, 2 Jul 2014 17:08:00 +0000 (17:08 +0000)]
ARCMigrate: simplify diagnostic handling
Recent enhancements in the diagnostics engine mean that
TransformActions::report() no longer needs to duplicate this suppression logic.
That's great because the old code was flawed and would have attached notes to
the wrong primary diagnostic in non-trivial use.
With these changes it becomes safe to use reportNote() freely in the migration
tool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212191
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 2 Jul 2014 16:54:41 +0000 (16:54 +0000)]
[ASan] Print exact source location of global variables in error reports.
See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the
original feature request.
Introduce llvm.asan.globals metadata, which Clang (or any other frontend)
may use to report extra information about global variables to ASan
instrumentation pass in the backend. This metadata replaces
llvm.asan.dynamically_initialized_globals that was used to detect init-order
bugs. llvm.asan.globals contains the following data for each global:
1) source location (file/line/column info);
2) whether it is dynamically initialized;
3) whether it is blacklisted (shouldn't be instrumented).
Source location data is then emitted in the binary and can be picked up
by ASan runtime in case it needs to print error report involving some global.
For example:
0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40
These source locations are printed even if the binary doesn't have any
debug info.
This is an ABI-breaking change. ASan initialization is renamed to
__asan_init_v4(). Pre-built libraries compiled with older Clang will not work
with the fresh runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212188
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Wed, 2 Jul 2014 15:25:03 +0000 (15:25 +0000)]
Added standard macro guard. In case __GNUC_VA_LIST was not
defined or defined identically before there will not be any
change in functionality.
MinGW-w64 defines __GNUC_VA_LIST as
#define __GNUC_VA_LIST
which is different than the definition here, causing
a warning without the guard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212183
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 2 Jul 2014 15:21:50 +0000 (15:21 +0000)]
[mips] Added additional test cases for passing -mabi to the assembler.
Summary:
This patch adds minimal coverage for each -mcpu value to ensure that none of them can pass an empty string in -mabi.
Prior to r212176, many -mcpu values would trigger this.
Differential Revision: http://reviews.llvm.org/D4272
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212182
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 2 Jul 2014 13:21:52 +0000 (13:21 +0000)]
[mips] Make FileCheck prefixes match the CPU they check
Summary:
For example: s/MIPS32-EB-AS/MIPS32R2-EB-AS/ since it is for MIPS32r2 not MIPS32.
This reduces the noise in my next Clang patch.
Differential Revision: http://reviews.llvm.org/D4271
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212177
91177308-0d34-0410-b5e6-
96231b3b80d8