Commit Graph

638 Commits

Author SHA1 Message Date
Dale Johannesen 7d3dfc0622 Generate bitcasts going in and out of MMX parameters
in asm's.  PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?

llvm-svn: 117736
2010-10-29 23:12:32 +00:00
Dale Johannesen d2b2ad093c Ahem. Add rest of D and Q registers to ARM inline asm handling.
llvm-svn: 117517
2010-10-28 01:05:37 +00:00
Dale Johannesen 7fd51bc1e6 Add D and Q register names to ARM inline asm handling.
No aliasing is needed, these work as given in the BE.

llvm-svn: 117508
2010-10-27 23:34:42 +00:00
Dan Gohman 5d223dcb2f getOrCreateContentCache never returns null, so overrideFileContents
doesn't need its return value.

llvm-svn: 117393
2010-10-26 20:47:28 +00:00
Chandler Carruth c3ce5840af Update remaining attribute macros to new style.
llvm-svn: 117204
2010-10-23 08:44:57 +00:00
Dale Johannesen 70f564e0e8 Change handling of inline asm 'p' constraint to match llvm-gcc.
llvm-svn: 117149
2010-10-22 21:07:10 +00:00
Oscar Fuentes ac1a614079 Don't try to guess svn version when current path is a symlink.
See PR 8473.

llvm-svn: 117110
2010-10-22 17:16:39 +00:00
Francois Pichet ebdb43d54d Revert r117005, WIN32 is not predefined after all.
llvm-svn: 117026
2010-10-21 16:14:56 +00:00
Francois Pichet 1ef4eb196d MSVC defines WIN32 as a predefined macro.
llvm-svn: 117005
2010-10-21 09:39:28 +00:00
Michael J. Spencer 54bf3c3cfb Targets: Fix MinGW and VisualStudio predefined macros.
llvm-svn: 117003
2010-10-21 08:22:51 +00:00
Michael J. Spencer 4992ca4b17 Reorganize predefined macros for all Windows targets.
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

llvm-svn: 116999
2010-10-21 05:21:48 +00:00
Michael J. Spencer 4c0ffa823f Fix Whitespace.
llvm-svn: 116990
2010-10-21 03:16:25 +00:00
Michael J. Spencer 7b726c3fc8 Revert "Cleanup and fix predefined macros for windows."
Didn't realize this was on my branch ;/.

llvm-svn: 116989
2010-10-21 03:14:35 +00:00
Michael J. Spencer 2fb548cc05 Cleanup and fix predefined macros for windows.
llvm-svn: 116988
2010-10-21 03:13:04 +00:00
Michael J. Spencer a9e009e5bd CodeGen: Fix long double on Windows using MSVC runtime.
llvm-svn: 116700
2010-10-18 07:11:10 +00:00
Michael J. Spencer feb799c14b Fix Whitespace.
llvm-svn: 116699
2010-10-18 07:10:59 +00:00
Douglas Gregor 57756eabc9 When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results. 

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.

llvm-svn: 116528
2010-10-14 22:11:03 +00:00
John McCall 43b6168b3b Teach Diagnostic to recursively expand inside %plural formats.
llvm-svn: 116468
2010-10-14 01:55:31 +00:00
Douglas Gregor f10c97f36e _Bool is not a keyword in C++. Fixes PR7388 and PR8349.
llvm-svn: 116422
2010-10-13 20:00:38 +00:00
Douglas Gregor b39215942e Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.

llvm-svn: 116411
2010-10-13 17:22:14 +00:00
Daniel Dunbar 48ed37d98e Basic: Tweak attempt to make version tags work from 'svn export's again, clip
off the extra parts of the $URL$ SVN keyword.

llvm-svn: 116269
2010-10-11 23:50:34 +00:00
Daniel Dunbar d097d913b6 Basic: Attempt to make version tags work from 'svn export's again.
llvm-svn: 116268
2010-10-11 23:44:19 +00:00
Douglas Gregor 4e0f15a4a2 Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.

llvm-svn: 116250
2010-10-11 22:02:06 +00:00
Chris Lattner a09e8efd1f Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Daniel Dunbar 6036264fb4 Driver: When clang is built with a VENDOR set, include the base LLVM version in
the version information, to help prevent user confusion about vendor version
numbers vs. LLVM version numbers.

llvm-svn: 115915
2010-10-07 15:00:30 +00:00
Zhanyong Wan ea6d7f332d Fix handling of the 'Invalid' argument in SourceManager's methods (patch by Dean Sturtevant, reviewed by chandlerc and Sebastian Redl).
llvm-svn: 115638
2010-10-05 17:56:33 +00:00
Daniel Dunbar 181ca58074 Basic: Simplify getClangRepositoryPath and getClangRevision.
- I don't like returning StringRef's ever, unless it is actually important for
   performance, which it isn't here.

 - Also, stop validating getClangRevision to be an integer, I don't see a good
   reason to do this.

llvm-svn: 115071
2010-09-29 19:15:29 +00:00
Daniel Dunbar b800fdb063 Basic: Add support for git svn to get the repo version in clang executable,
patch by Jonathan Mulder!

llvm-svn: 115049
2010-09-29 17:57:10 +00:00
John Thompson c467aa2fa4 Fixed pr20314-2.c failure, added E, F, p constraint letters.
llvm-svn: 114490
2010-09-21 22:04:54 +00:00
John Thompson 1224061281 Added '|' delimiter to separate inline asm multiple alternative constraints for Clang side of support.
llvm-svn: 114253
2010-09-18 01:15:13 +00:00
Cameron Esfahani eb85650e67 Fix Windows64 target info so pointer arithmetic is done correctly, and no sign extension code is emitted: PtrDiffType needs to be a signed long long. Add a corresponding test case.
llvm-svn: 113910
2010-09-15 00:28:12 +00:00
Michael J. Spencer 09476212de Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

llvm-svn: 113817
2010-09-13 23:54:41 +00:00
Michael J. Spencer 0881f4a367 CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

llvm-svn: 113631
2010-09-10 21:13:16 +00:00
Dale Johannesen 8499f47ef4 Allow 'o' and 'V' as constraints for output asm operands.
Allow '<' and '>' as constraints for input or output.

llvm-svn: 113246
2010-09-07 18:40:41 +00:00
Dawn Perchik 335e16bad4 Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions).  Support still needs to be added to llvm.

llvm-svn: 112939
2010-09-03 01:29:35 +00:00
Chris Lattner 04dc957260 Add support for windows x86-64 varargs, patch by Cameron Esfahani!
llvm-svn: 112603
2010-08-31 16:44:54 +00:00
Dan Gohman ce46f02a32 Fix a typo.
llvm-svn: 112219
2010-08-26 21:27:06 +00:00
Dale Johannesen 46742a4771 Add some missing X86-specific asm constraint letters, and fix
some bugs in setting allowsRegister on the ones there.
8348447.

llvm-svn: 111980
2010-08-24 22:33:12 +00:00
Chris Lattner 8460224958 fix PR7953 - Windows filename are case insensitive:
#pragma once wasn't working on win32 if the header file was included
using a different case.
I tracked down  the problem to the fact that clang::FileManager was
caching files using case sensitive string (UniqueFiles) on Windows.

I changed FileManager to cache filename in lower case only.
Doesn't affect UNIX because UNIX uses Inode to uniquely identify files.

unix doesn't use this codepath.

Analysis and patch by Francois Pichet!

llvm-svn: 111866
2010-08-23 23:50:42 +00:00
Eli Friedman 04831926ec Detabify.
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
John McCall 86353416a7 The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator.  Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.

llvm-svn: 111749
2010-08-21 22:46:04 +00:00
Sebastian Redl d44cd6adba More PCH -> AST renaming.
llvm-svn: 111472
2010-08-18 23:57:06 +00:00
Douglas Gregor b13f5d99af Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!

llvm-svn: 111362
2010-08-18 14:24:02 +00:00
Chandler Carruth 33646fd72a Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.

llvm-svn: 111355
2010-08-18 06:46:41 +00:00
Sebastian Redl dd0087154a Get rid of pretty non-ASCII quotes.
llvm-svn: 111316
2010-08-17 22:42:34 +00:00
Chris Lattner b5050f3cd0 apparently msvc defines _STDCALL_SUPPORTED, so we should
too.  Patch by Per Linden!

llvm-svn: 111236
2010-08-17 16:02:32 +00:00
Argyrios Kyrtzidis 1cec2cc798 Remove dead code, caught by unused function warnings.
llvm-svn: 111091
2010-08-15 01:15:58 +00:00
Eli Friedman 854f110834 Fix oversight with symbolic names in TargetInfo::validateInputConstraint.
llvm-svn: 110870
2010-08-11 23:03:37 +00:00
Argyrios Kyrtzidis 3084a61e98 -Make TokenID of IdentifierInfo read-only, remove setTokenID().
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility.
  To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods.
  Store the bitfield in PCH.

llvm-svn: 110868
2010-08-11 22:55:12 +00:00
Daniel Dunbar 9034aa36c7 ARM: Recognize single precision float register names.
- We don't recognize double or NEON register names yet -- we don't have the
   infrastructure to generate the right clobbers for them.

llvm-svn: 110775
2010-08-11 02:17:20 +00:00