Commit Graph

1397 Commits

Author SHA1 Message Date
Robert Lytton 0e07649ae5 Add XCore target
llvm-svn: 188258
2013-08-13 09:43:10 +00:00
Jack Carter 44ff1e5673 [Mips] MSA frontend option support
This patch adds -mmsa and -mno-msa to the options supported by 
clang to enable and disable support for MSA.

When MSA is enabled, a predefined macro '__mips_msa' is defined to 1.

Patch by Daniel Sanders

llvm-svn: 188184
2013-08-12 17:20:29 +00:00
Benjamin Kramer 7a7285cc24 Remove "static" on simple temporary StringRef.
llvm-svn: 188088
2013-08-09 17:51:03 +00:00
Fariborz Jahanian 9275c688ea ObjectiveC migrator: Add another family of factory
methods which can be migrated to instancetype.

llvm-svn: 187672
2013-08-02 20:54:18 +00:00
Fariborz Jahanian c4291852a4 ObjectiveC migrator: Fixes public buildbot failures,
in my previous patch which was reverted in r187657

llvm-svn: 187661
2013-08-02 18:00:53 +00:00
Fariborz Jahanian 87dc0bc078 revert patch I added in r187655. It still breaks public
buildbot.

llvm-svn: 187657
2013-08-02 16:25:41 +00:00
Fariborz Jahanian 11fe914549 ObjectiveC migration. Check-in patch reverted in r187634.
Also removed check for "NS" prefix for class name.

llvm-svn: 187655
2013-08-02 16:00:08 +00:00
Rafael Espindola 6cbcc10e84 Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods with certain prefix selector matching their class names' suffix."
This reverts commit r187626.

It is breaking the bots.

llvm-svn: 187634
2013-08-02 00:01:14 +00:00
Fariborz Jahanian 8234d40843 ObjectiveC migrator. Migrate to instancetype return type
for mehods with certain prefix selector matching their class names'
suffix.

llvm-svn: 187626
2013-08-01 22:29:32 +00:00
Rafael Espindola f8f91b8976 Use llvm::sys::fs::UniqueID for windows and unix.
This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.

We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.

What the patch does is:

* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.

llvm-svn: 187619
2013-08-01 21:42:11 +00:00
Tim Northover 2fe823a6c3 AArch64: initial NEON support
Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

llvm-svn: 187568
2013-08-01 09:23:19 +00:00
Alexander Kornienko 6d8cf83a4d Simplified SourceManager::translateLineCol a bit.
Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1183

llvm-svn: 187386
2013-07-29 22:26:10 +00:00
Rafael Espindola 073ff10138 Update for llvm api change.
llvm-svn: 187379
2013-07-29 21:26:52 +00:00
Rafael Espindola 74ca78ed9b Convert a use of status with llvm::sys::fs::getUniqueID.
llvm-svn: 187367
2013-07-29 18:43:40 +00:00
Rafael Espindola e4777f4638 Convert a use of stat with sys::fs::status.
llvm-svn: 187364
2013-07-29 18:22:23 +00:00
Rafael Espindola ee30546c00 Fix handling of "clang c:foo"
On windows, c:foo is a valid file path, but stat fails on just "c:". This
causes a problem for clang since its file manager wants to cache data about
the parent directory.

There are refactorings to be done in here, but this gives clang the correct
behavior and testing first.

Patch by Yunzhong Gao!

llvm-svn: 187359
2013-07-29 15:47:24 +00:00
Bill Schmidt 778d387684 [PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code.  Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing.  Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.

llvm-svn: 187180
2013-07-26 01:36:11 +00:00
Richard Smith 0e5d7b8c6b When we perform dependent name lookup during template instantiation, it's not
sufficient to only consider names visible at the point of instantiation,
because that may not include names that were visible when the template was
defined. More generally, if the instantiation backtrace goes through a module
M, then every declaration visible within M should be available to the
instantiation. Any of those declarations might be part of the interface that M
intended to export to a template that it instantiates.

The fix here has two parts:

1) If we find a non-visible declaration during name lookup during template
instantiation, check whether the declaration was visible from the defining
module of all entities on the active template instantiation stack. The defining
module is not the owning module in all cases: we look at the module in which a
template was defined, not the module in which it was first instantiated.

2) Perform pending instantiations at the end of a module, not at the end of the
translation unit. This is general goodness, since it significantly cuts down
the amount of redundant work that is performed in every TU importing a module,
and also implicitly adds the module containing the point of instantiation to
the set of modules checked for declarations in a lookup within a template
instantiation.

There's a known issue here with template instantiations performed while
building a module, if additional imports are added later on. I'll fix that
in a subsequent commit.

llvm-svn: 187167
2013-07-25 23:08:39 +00:00
Rafael Espindola 9d910f9ac3 Remove the mblaze backend from clang.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

llvm-svn: 187143
2013-07-25 18:42:13 +00:00
Fariborz Jahanian 267bae3ad6 Objective-C migrator: some cleanup.
Expose static type of init/alloc/retain with
instance type as well. Ad-hoc cases are coming
next.

llvm-svn: 187068
2013-07-24 19:18:37 +00:00
Fariborz Jahanian 7122135fc3 ObjC migrator: more knobs toward doing
instancetype migration.

llvm-svn: 187000
2013-07-23 22:42:28 +00:00
Fariborz Jahanian 4f3a64fd6e ObjC migrator: Define family of methods
which are candidate for migrating to
'instancetype'. wip.

llvm-svn: 186981
2013-07-23 19:31:17 +00:00
Eli Bendersky aefa5e2ff2 Add a -fno-math-builtin option to the Clang -cc1
llvm-svn: 186899
2013-07-23 00:13:01 +00:00
Craig Topper ea6caba325 Replace 'unsigned short' with 'uint16_t' in a packed data structure for consistency with other fields and to be explicit about bit count.
llvm-svn: 186796
2013-07-21 21:56:18 +00:00
Craig Topper 31e71a3997 Revert r186649 because it wasn't unnecessary and add a comment.
llvm-svn: 186795
2013-07-21 18:58:40 +00:00
David Majnemer 38af2a2158 DiagnosticIDs: Forbid Diag ID from being valid
Diag ID is used throughout clang as a sentinel id meaning "this is an
invalid diagnostic id."  Confusingly, Diag ID maps to a valid, usable,
diagnostic id.  Instead, start diagnostic ids at ID one.

Incidently, remove an unused element from StaticDiagInfo.

llvm-svn: 186760
2013-07-20 07:15:15 +00:00
Richard Sandiford 4652d893bc [SystemZ] Add -march= command-line option
llvm-svn: 186694
2013-07-19 16:51:51 +00:00
Craig Topper ed1236d041 Remove unnecessary IsFirst variable from debug codde in GetDiagInfo.
llvm-svn: 186649
2013-07-19 03:59:51 +00:00
Alexey Bataev 5ec3eb11fc OpenMP: basic support for #pragma omp parallel
llvm-svn: 186647
2013-07-19 03:13:43 +00:00
Rafael Espindola 16125fb652 Update for llvm API change.
llvm-svn: 186448
2013-07-16 19:44:23 +00:00
Craig Topper e5ce831c7c Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
llvm-svn: 186300
2013-07-15 03:38:40 +00:00
Craig Topper 122ec3a338 Replace C++0x in a comment with C++11
llvm-svn: 186287
2013-07-14 17:04:56 +00:00
Eli Bendersky e3cef2ad5d Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.
llvm-svn: 186106
2013-07-11 16:53:04 +00:00
Craig Topper 61ac906bdd Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185784
2013-07-08 03:55:09 +00:00
Craig Topper 2341c0d3b2 Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
llvm-svn: 185610
2013-07-04 03:08:24 +00:00
Bill Schmidt 58ae47bf10 [PowerPC] FreeBSD does not require f128 in its data layout string.
Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.

llvm-svn: 185582
2013-07-03 21:03:06 +00:00
Roman Divacky 13b586f298 Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.
It's not the case on ie. FreeBSD.

llvm-svn: 185572
2013-07-03 19:45:54 +00:00
Anton Korobeynikov ef4129084a Fix MSP430 builtin types.
Patch by Job Noorman!

llvm-svn: 185362
2013-07-01 19:42:40 +00:00
Benjamin Kramer b1276b4cff Driver: Push triple objects around instead of going to std::string all the time.
No functionality change.

llvm-svn: 185261
2013-06-29 16:37:14 +00:00
Joey Gouly 7db275b947 Add support for passing v8fp options via -mfpu.
llvm-svn: 185075
2013-06-27 13:19:54 +00:00
Joey Gouly d077bc6a20 Add support for passing '-target armv8' through the Driver.
llvm-svn: 184970
2013-06-26 17:19:48 +00:00
Chandler Carruth 6aa92ad762 Fix a couple of PPC predefined macros that I spotted while driving by
this code. These aren't technically standard predefines for the platform
but apparantly lots of folks use them as they show up within LLVM's own
codebase. ;] This may even fix some self host issues w/ the JIT!!!

llvm-svn: 184830
2013-06-25 11:13:47 +00:00
Justin Holewinski 7ceab3a892 [NVPTX] Add NVPTX register constraints
llvm-svn: 184578
2013-06-21 18:51:24 +00:00
Lawrence Crowl b53e5483b0 This patch adds new private headers to the module map. Private
headers may be included from within the module, but not from outside
the module.

llvm-svn: 184471
2013-06-20 21:14:14 +00:00
Bob Wilson 87b3a189ef size_t on Darwin AAPCS targets is "unsigned long". <rdar://problem/14136459>
Some embedded targets use ARM's AAPCS with iOS header files that define size_t
as unsigned long, which conflicts with the usual AAPCS definition of size_t
as unsigned int.

llvm-svn: 184171
2013-06-18 05:36:04 +00:00
Rafael Espindola 3d4276e3cf Use atomic instructions on Bitrig armv6. Patch by Patrick Wildt.
llvm-svn: 184113
2013-06-17 20:00:15 +00:00
Ed Schouten 60afa2d923 Emit native implementations of atomic operations on FreeBSD/armv6.
Just like on Linux, FreeBSD/armv6 assumes the system supports
ldrex/strex unconditionally. It is also used by the kernel. We can
therefore enable support for it, like we do on Linux.

While there, change one of the unit tests to explicitly test against
armv5 instead of armv7, as it actually tests whether libcalls are
emitted.

llvm-svn: 184040
2013-06-15 09:40:14 +00:00
Adrian Prantl 6e77c96872 cleanup (address some more review comments for r183474):
- reduce default buffer size to 64, which will still be large enough to
  hold any property names found in the wild.
- get rid of the /*static*/ comments.

llvm-svn: 183697
2013-06-10 21:36:55 +00:00
Adrian Prantl a4ce906bc0 address some comments on r183474:
- factor the name construction part out from constructSetterName
- rename constructSetterName to the more appropriate constructSetterSelector

no functionality change intended.
rdar://problem/14035789

llvm-svn: 183582
2013-06-07 22:29:12 +00:00
Argyrios Kyrtzidis fe68302fe8 Thread the 'Invalid' out parameter through SourceManager::getSLocEntry() and callees of SourceManager::getSLocEntryByID().
Also add an 'Invalid' check in SourceManager::computeMacroArgsCache().

llvm-svn: 183538
2013-06-07 17:57:59 +00:00