Commit Graph

663 Commits

Author SHA1 Message Date
Reid Kleckner 52b10afb08 Move MS header search test inputs to Inputs/
llvm-svn: 198086
2013-12-27 20:41:49 +00:00
Will Wilson 0fafd34a6e Implement MSVC header search algorithm in MicrosoftMode.
Follows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx

llvm-svn: 198082
2013-12-27 19:46:16 +00:00
Ana Pazos dd6068d400 Added support for mcpu krait
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.

llvm-svn: 196618
2013-12-06 22:43:17 +00:00
Amara Emerson a1daec7235 [ARM] Enable FeatureMP for Cortex-A5 by default.
Patch by Oliver Stannard.

llvm-svn: 195641
2013-11-25 13:18:59 +00:00
Richard Barton 3b82ed3948 Add support for Cortex-A12.
Patch by Oliver Stannard!

llvm-svn: 195449
2013-11-22 11:53:28 +00:00
Artyom Skrobov 53b000a86c [ARM] add basic support for Cortex-A7 and VFPv4 to Clang
llvm-svn: 195359
2013-11-21 14:04:38 +00:00
Jiangning Liu c8b0a1ad95 Clean up predefined macros for AArch64 to follow ACLE 2.0.
llvm-svn: 195068
2013-11-19 01:33:17 +00:00
Simon Atanasyan 55df3bb5e0 [Mips] Add tests for MIPS/MIPS64 type defines and type limits macros. No
functional changes - just reflection of the current state.

llvm-svn: 194690
2013-11-14 11:15:10 +00:00
Robert Lytton cc4246614f XCore target Type defines.
Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

llvm-svn: 194461
2013-11-12 10:09:30 +00:00
Tim Northover e77f78cbad Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
llvm-svn: 194408
2013-11-11 19:11:22 +00:00
Joerg Sonnenberger 0e921f2bd9 NetBSD 6.99.26 switched to default rounding mode, so adjust
__FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2
variances on NetBSD.

llvm-svn: 194377
2013-11-11 14:00:37 +00:00
Alp Toker f80de76ca9 Make test run reliably
llc waits for input on stdin, which was not provided in this test. It
was running only thanks to a quirk in the way lit concatenates
commands.

llvm-svn: 194071
2013-11-05 12:45:43 +00:00
David Majnemer 21db51ab91 Simplify test case added in r194059
llvm-svn: 194061
2013-11-05 10:05:58 +00:00
David Majnemer 76faf1f525 Lex: Require that '#' be followed by a macro parameter name when preceded by '##'
After lexing a '##', we would look ahead and check to see if it was
followed by '__VA_ARGS__'.  After doing so, we would then go ahead and
lex the token.

However we would fail in the case where the '##' was followed by a '#'
followed by an identifier because we would have lexed the '#' separately
from the identifier, bypassing our parameter validation logic.

Instead, lex the tokens coming after the '##' later.

This fixes PR17804.

llvm-svn: 194059
2013-11-05 09:30:17 +00:00
Benjamin Kramer d9a5e2a490 Driver: Add support for -march=bdver3 on x86.
llvm-svn: 193985
2013-11-04 10:29:51 +00:00
Bernard Ogden 18b5701a68 ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600
2013-10-29 09:47:51 +00:00
Bernard Ogden da13af380a Add driver support for FP, SIMD and crypto defaults.
Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0
llvm-svn: 193367
2013-10-24 18:32:51 +00:00
Silviu Baranga e5690463e2 Set the default hardware division features for ARM cpus. Also set it as default for A32 armv8.
llvm-svn: 193075
2013-10-21 10:59:33 +00:00
Silviu Baranga f9671dd09d Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.
llvm-svn: 193074
2013-10-21 10:54:53 +00:00
Justin Bogner 5353513058 Lex: Don't restrict legal UCNs when preprocessing assembly
The C and C++ standards disallow using universal character names to
refer to some characters, such as basic ascii and control characters,
so we reject these sequences in the lexer. However, when the
preprocessor isn't being used on C or C++, it doesn't make sense to
apply these restrictions.

Notably, accepting these characters avoids issues with unicode escapes
when GHC uses the compiler as a preprocessor on haskell sources.

Fixes rdar://problem/14742289

llvm-svn: 193067
2013-10-21 05:02:28 +00:00
Simon Atanasyan 2c97a81e81 [Mips] Define __mips_fpr and _MIPS_FPSET macros.
llvm-svn: 192969
2013-10-18 13:13:53 +00:00
Eric Christopher 2fe3b4a490 Add preprocessor support for powerpc vsx.
The test should be expanded upon for more powerpc checking.

llvm-svn: 192849
2013-10-16 21:19:26 +00:00
Eric Christopher c26a5b4f9d Remove an old, seemingly out of date, comment.
The referenced script no longer seems to exist.

llvm-svn: 192848
2013-10-16 21:19:23 +00:00
Yunzhong Gao 6108936fa6 Enabling 3DNow! prefetch instruction support for a few AMD processors in the
clang front end. This change will allow the __PRFCHW__ macro to be set on these
processors and hence include prfchwintrin.h in x86intrin.h header. Support for
the intrinsic itself seems to have already been added in r178041.

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

llvm-svn: 192829
2013-10-16 19:07:02 +00:00
Nick Lewycky 50e8f480ea Add support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when
it is enabled. Also enable it on the same architectures that GCC does.

llvm-svn: 192045
2013-10-05 20:14:27 +00:00
Reid Kleckner 4d185105e9 Accept #pragma warning(push, 0) without warning
This partially addresses PR17435, but it doesn't actually implement the
pragma.  If we implement it, we should map levels 1-4 to something like
-Wall and level 0 to something like -w.

llvm-svn: 191833
2013-10-02 15:19:23 +00:00
Weiming Zhao 53a797ce7b Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARM
llvm-svn: 191707
2013-09-30 22:51:32 +00:00
Ed Schouten d062146896 Add character set related __STDC_* definitions.
Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's
exclusively. This means that we can define __STDC_UTF_16__ and
__STDC_UTF_32__ unconditionally.

While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's
wchar_t's don't encode characters as ISO-10646; the encoding depends on
the locale used. Because the character set used might not be a superset
of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__.

llvm-svn: 191631
2013-09-29 07:54:52 +00:00
Reid Kleckner 95e036c669 PR17359: Fix off-by-one OOB on _Pragma("") and an unescaping bug
Previously the code would reduce a run of backslashes to a single
backslash, and now it will properly leave behind every other backslash.

llvm-svn: 191382
2013-09-25 16:42:48 +00:00
Yunzhong Gao 1f6aeebe76 Adding -mtbm and -mno-tbm command line options to the clang front end for the
x86 TBM instruction set. Also adding a __TBM__ macro if the TBM feature is
enabled. Otherwise there should be no functionality change to existing features.

Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1693

llvm-svn: 191326
2013-09-24 19:00:58 +00:00
Simon Atanasyan 22127cee34 [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and pass
this option to the assembler.

llvm-svn: 191282
2013-09-24 09:09:16 +00:00
Ben Langmuir 58078d0103 Add C intrinsics for Intel SHA Extensions
Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is
enabled. SHA implies SSE2, which is needed for the __m128i type.

Also add the -msha/-mno-sha option.

llvm-svn: 190999
2013-09-19 13:22:04 +00:00
Eli Friedman 0834a4b901 Make Preprocessor::Lex non-recursive.
Before this patch, Lex() would recurse whenever the current lexer changed (e.g.
upon entry into a macro). This patch turns the recursion into a loop: the
various lex routines now don't return a token when the current lexer changes,
and at the top level Preprocessor::Lex() now loops until it finds a token.
Normally, the recursion wouldn't end up being very deep, but the recursion depth
can explode in edge cases like a bunch of consecutive macros which expand to
nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this
patch).

<rdar://problem/14569770>

llvm-svn: 190980
2013-09-19 00:41:32 +00:00
Craig Topper 5f79e2661d Disabling sse2 should disable aes and pclmul support.
llvm-svn: 190977
2013-09-19 00:01:05 +00:00
Joey Gouly 1e8637b259 [ARMv8] Add builtins for CRC instructions.
Patch by Bradley Smith!

llvm-svn: 190931
2013-09-18 10:07:09 +00:00
Hal Finkel c4d7c82c7f Add the intrinsic __builtin_convertvector
LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

llvm-svn: 190915
2013-09-18 03:29:45 +00:00
Craig Topper 31db3a2efc Make F16C feature imply AVX. Matches GCC behavior.
llvm-svn: 190776
2013-09-16 04:54:13 +00:00
Reid Kleckner 881dff3683 Lex and ignore Microsoft's #pragma warning(...)
Summary:
This fixes PR17145 and avoids unknown pragma warnings.

This change does not attempt to map MSVC warning numbers to clang
warning flags.  Perhaps in the future we will implement a mapping for
some common subset of Microsoft warnings, but for now we don't.

Reviewers: rsmith

CC: cfe-commits

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

llvm-svn: 190726
2013-09-13 22:00:30 +00:00
Craig Topper c0070a4320 Fix a bug where -msse followed by -mno-sse would leave MMX enabled.
llvm-svn: 190496
2013-09-11 06:48:53 +00:00
Craig Topper 7481d8aa17 Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.
Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.

llvm-svn: 190387
2013-09-10 06:55:47 +00:00
Sylvestre Ledru 4e06e6e8c3 Follow up on commit r190159. Also test the KFreeBSD i686 platform defines + minor cosmetics
llvm-svn: 190162
2013-09-06 15:36:36 +00:00
Sylvestre Ledru fd7cd35592 Add a test for the KFreeBSD define (#define __FreeBSD_kernel__ 1). This was introduced in commit r190048
llvm-svn: 190159
2013-09-06 14:53:07 +00:00
Rafael Espindola ff7cea8c1a Don't pass -O0 to clang_cc1, it is the default.
llvm-svn: 189910
2013-09-04 04:12:25 +00:00
Benjamin Kramer ffecc84583 Add support for -march=slm, aka Intel Atom Silvermont.
llvm-svn: 189670
2013-08-30 14:05:34 +00:00
Eli Friedman 80e45b8cd4 Properly escape filenames in line directives.
Fixes PR17018.  Only partial test coverage because I don't want
to try to write a test which generates a file whose name contains a newline.

llvm-svn: 189557
2013-08-29 01:42:42 +00:00
Eli Friedman cefc7eafc6 Fix "//" comments with -traditional-cpp in C++.
Apparently, gcc's -traditional-cpp behaves slightly differently in C++ mode;
specifically, it discards "//" comments.  Match gcc's behavior.

<rdar://problem/14808126>

llvm-svn: 189515
2013-08-28 20:53:32 +00:00
Eli Friedman 2afb63c001 Handle -D arguments ending in a backslash.
We translate these into #define directives; to preserve gcc-compatible
semantics (where the expanded macro includes the backslash), we add
an extra "\\\n" to the end of the synthesized "#define".

<rdar://problem/14810220>

llvm-svn: 189511
2013-08-28 20:35:38 +00:00
Craig Topper 258a86802a Add test cases for avx512 feature flags. Fix typo in avx512pf options.
llvm-svn: 188984
2013-08-22 04:32:55 +00:00
Eli Friedman 5ba37d5282 Split isFromMainFile into two functions.
Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't.  Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).

llvm-svn: 188968
2013-08-22 00:27:10 +00:00
Rafael Espindola 0221d8636e Don't disable SSE4A when disabling AVX.
Thanks for Craig Topper for noticing it.

llvm-svn: 188902
2013-08-21 13:28:02 +00:00
Craig Topper 679b53ac67 Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.
llvm-svn: 188867
2013-08-21 05:29:10 +00:00
Rafael Espindola db0fcfbfae Centralize the logic for handling -m* options and fix pr16943.
This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It
also changes -cc1 to apply the options in order, fixing pr16943.

The handling of -mno-mmx -msse is now an explicit special case.

llvm-svn: 188817
2013-08-20 18:57:55 +00:00
Craig Topper af0ca63cec Rename __AVX512__ to __AVX512F__
llvm-svn: 188764
2013-08-20 07:52:37 +00:00
Craig Topper 449314e1ec Add AVX-512 feature flag and knl cpu to clang.
llvm-svn: 188758
2013-08-20 07:09:39 +00:00
Craig Topper 33b4cde2f2 Revert r188756 because some other changes snuck in with it.
llvm-svn: 188757
2013-08-20 07:07:29 +00:00
Craig Topper ffb7180e96 Add AVX-512 feature flag and knl cpu to clang.
llvm-svn: 188756
2013-08-20 07:05:05 +00:00
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
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
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
Rafael Espindola 644eb0a8da Add not to a command that is expected to fail.
llvm-svn: 187065
2013-07-24 18:45:44 +00:00
Richard Trieu 7aa7218545 Changed "an macro" to "a macro" in diagnostic note.
llvm-svn: 186988
2013-07-23 21:06:45 +00:00
Richard Trieu 79b45389c3 Add new diagnostic messages when too many arguments are presented to a
function-like macro.  Clang will attempt to correct the arguments by detecting
braced initializer lists:

1) If possible, suggest parentheses around arguments
containing braced lists which will give the proper number of arguments.
2) If a braced list is detected at the start of a macro argument, it cannot be
corrected by parentheses.  Instead, just point out the location of these
braced lists.

llvm-svn: 186971
2013-07-23 18:01:49 +00:00
Richard Smith 701a3523ba Don't give # and ## special treatment when in -traditional-cpp mode. Patch by
Austin Seipp!

llvm-svn: 185896
2013-07-09 01:00:29 +00:00
Richard Smith baf2912b40 Generalize hack allowing 'const' in __has_attribute (etc) to allow any token
with identifier info. This covers most identifier-like entities (other than
the ISO646 keywords).

llvm-svn: 185895
2013-07-09 00:57:56 +00:00
Rafael Espindola 925213b0fa Add 'not' to commands that are expected to fail.
This is at least good documentation, but also opens the possibility of
using pipefail.

llvm-svn: 185652
2013-07-04 16:16:58 +00:00
Rafael Espindola 80a99478bd Convert test to FileCheck.
llvm-svn: 185645
2013-07-04 15:08:20 +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
Reid Kleckner 596b85cc23 Match MSVC's handling of commas during macro argument expansion
This allows clang to parse the type_traits header in Visual Studio 2012,
which is included widely in practice.

This is a rework of r163022 by João Matos.  The original patch broke
preprocessing of gtest headers, which this patch addresses.

Patch by Will Wilson!

llvm-svn: 184968
2013-06-26 17:16:08 +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
Rafael Espindola 49ddb8675b Accept both / and \\ to fix the windows bots.
llvm-svn: 184790
2013-06-24 22:07:15 +00:00
Eli Friedman cdf8b88285 Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
succession. Fixes PR16363.

llvm-svn: 184240
2013-06-18 21:33:38 +00:00
Aaron Ballman 5d041beb4e Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.
llvm-svn: 183178
2013-06-04 02:07:14 +00:00
Argyrios Kyrtzidis 977026c5f5 [Preprocessor] Prevent expansion of y in x ## y when x is empty
When x is empty, x ## is suppressed, and when y gets expanded, the fact that it follows ## is not
available in the macro expansion result. The macro definition can be checked instead, the ## will
be available there regardless of what x expands to.

Fixes http://llvm.org/PR12767

Patch by Harald van Dijk!

llvm-svn: 182699
2013-05-25 01:35:18 +00:00
Jakob Stoklund Olesen 826df14d72 OpenBSD/sparc64 uses long long for int64_t and intmax_t.
Other operating systems, including FreeBSD and NetBSD, use long.

llvm-svn: 182215
2013-05-19 17:53:37 +00:00
David Fang 072d47b67f fix PR 15726: ptrdiff_t should be int on PowerPC Darwin
llvm-svn: 182029
2013-05-16 17:51:48 +00:00
Jakob Stoklund Olesen 248520bdea Use correct types for SPARC v9.
It's an LP64 platform.

llvm-svn: 181867
2013-05-15 03:22:33 +00:00
Richard Smith 0a715429b9 C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support.
Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from
the C++ features study group), and update documentation to match.

llvm-svn: 181342
2013-05-07 19:32:56 +00:00
Ulrich Weigand 47445073f8 Add SystemZ support
This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support.  It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall.  Thanks to all reviewers!

Patch by Richard Sandiford.

llvm-svn: 181211
2013-05-06 16:26:41 +00:00
Benjamin Kramer 914d7e06b6 Add support for -march=btver2.
llvm-svn: 181006
2013-05-03 10:47:15 +00:00
Hans Wennborg 4c02be3b83 Make sure we define wchar_t related macros correctly in -fms-extensions mode.
This adds a test to make sure we define _WCHAR_T_DEFINED and
_NATIVE_WCHAR_T_DEFINED correctly in the preprocessor, and updates
stddef.h to set it when typedeffing wchar_t.

llvm-svn: 180918
2013-05-02 13:12:32 +00:00
Argyrios Kyrtzidis f97290bb53 [test] add missing header for the test.
llvm-svn: 180719
2013-04-29 17:31:48 +00:00
Argyrios Kyrtzidis c3b4b79beb When emitting a preprocessed file with implicit module imports, make sure line directives are emitted in the next line.
rdar://13722737

llvm-svn: 180718
2013-04-29 17:26:22 +00:00
Jordan Rose 111c4a6b69 Fix off-by-one error in #pragma clang system_header.
The system_header pragma (from GCC) is implemented using line notes in the
source manager. However, a line note's line number specifies the number
not for the current line, but for the next line. This was making all
line numbers appear off by one after the pragma.

Reported by Andy Gibbs, uncovered during r179677.

llvm-svn: 179709
2013-04-17 19:09:18 +00:00
Tareq A. Siraj 0de0dd4923 Parser support for #pragma clang __debug captured
This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

Currently returns StmtEmpty

Author: Andy Zhang <andy.zhang@intel.com>

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

llvm-svn: 179614
2013-04-16 18:41:26 +00:00
Simon Atanasyan 607776140b [Mips] Support -mmicromips / -mno-micromips command line options.
llvm-svn: 179489
2013-04-14 14:07:51 +00:00
Simon Atanasyan 1607191e66 [Mips] Follow-up to r179481. Consider "single-float" as a separate
independent of float ABI feature in the MipsTargetInfoBase class.

llvm-svn: 179486
2013-04-14 14:07:30 +00:00
Reid Kleckner 9643a313ac Fix failing dependencies-and-pp.c test
The bots seem to do more line wrapping because they have longer absolute
paths.

llvm-svn: 179284
2013-04-11 13:43:19 +00:00
Reid Kleckner 37e8fe13e0 FileCheck-ify more grep tests with quoted double quotes
This required some tedious reordering to match clang's order.
Presumably these ObjC tests were generated based on llvm-gcc's output
ordering.

llvm-svn: 179282
2013-04-11 13:24:56 +00:00
Reid Kleckner e494399203 FileCheck-ify some clang grep tests that use double quotes
The escaping interaction between Python and grep doesn't work on my
system.  This change fixes the tests for me.

llvm-svn: 179214
2013-04-10 21:10:39 +00:00
Argyrios Kyrtzidis a6444b1ce1 [frontend] When preprocessing, turn implicit module imports into @imports.
part of rdar://13610250

llvm-svn: 179144
2013-04-10 01:53:46 +00:00
Michael Ilseman 82a2a3d8f5 Repeat some #line directive tests for the GNU line marker directive.
llvm-svn: 179142
2013-04-10 01:41:19 +00:00
Michael Ilseman e910cc8e07 Improve the diagnostics of the number-reading preprocessor directives.
The GNU line marker directive was sharing code with the #line directive, but some of the warnings/errors were reporting as #line directive diagnostics in both cases.

Previously:
#line 11foo1   ==> "#line directive requires a simple digit sequence"
# 11foo1       ==> "#line directive requires a simple digit sequence"

Now, we get:
#line 11foo1   ==> "#line directive requires a simple digit sequence"
# 11foo1       ==> "GNU line marker directive requires a simple digit sequence"

llvm-svn: 179139
2013-04-10 01:04:18 +00:00
Tim Northover b85654d3cd AArch64: bring predefines in line with most recent ACLE document
The prefixes and names used are now identical to 32-bit ARM, which is also
expected to remain unchanged.

If we made this change after a release, we'd probably have to support both
variants for a while, but I think since AArch64 exists only on trunk now, it's
acceptable to simply swap them now.

llvm-svn: 178870
2013-04-05 14:08:55 +00:00
Michael J. Spencer a0d5eb3a27 Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.
This fixes std::thread with libstdc++.

llvm-svn: 178816
2013-04-04 23:53:43 +00:00
Argyrios Kyrtzidis 0c2f30b9d3 [preprocessor] Allow comparing two macro definitions syntactically instead of only lexically.
Syntactically means the function macro parameter names do not need to use the same
identifiers in order for the definitions to be considered identical.

Syntactic equivalence is a microsoft extension for macro redefinitions and we'll also
use this kind of comparison to check for ambiguous macros coming from modules.

rdar://13562254

llvm-svn: 178671
2013-04-03 17:39:30 +00:00
Evgeniy Stepanov c3c725aae3 Define __SIZE_MAX__ preprocessor macro.
llvm-svn: 178226
2013-03-28 08:36:54 +00:00
David Blaikie 1dc4a3dfd6 PR15539: Record "evaluating if/elif condition" flag in the right place
The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.

llvm-svn: 177345
2013-03-18 23:22:28 +00:00
Jordan Rose 67b66231a8 Preprocessor: don't keep comments under -traditional-cpp.
This patch is designed for minimal intrusion into normal preprocessing
and compilation; under -E -traditional-cpp, the lexer will still
generate tok::comment nodes since it is preserving all whitespace, but
the output printer will then throw it away.

<rdar://problem/13338680>

llvm-svn: 176534
2013-03-05 23:54:55 +00:00