Граф коммитов

610 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor d0ebe080ee Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 15:31:50 +00:00
Douglas Gregor fe6b2d481d Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.

Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.

Fixes <rdar://problem/7806091>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-29 23:34:08 +00:00
Douglas Gregor eab5d1eaaa Teach the diagnostic engine to provide more detailed information about
how to handle a diagnostic during template argument deduction, which
may be "substitution failure", "suppress", or "report". This keeps us
from, e.g., emitting warnings while performing template argument
deduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 22:17:48 +00:00
John Thompson fb457977c8 PS3 needs __PPC__. Should this be in the PPC target?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 16:18:32 +00:00
Douglas Gregor 9e2dac9c9b Fix a thinko and a typo in the delayed-diagnostic code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-22 15:47:45 +00:00
Douglas Gregor 93ea5cb0ed Introduce the notion of a single "delayed" diagnostic into the
Diagnostic subsystem, which is used in the rare case where we find a
serious problem (i.e., an inconsistency in the file system) while
we're busy formatting another diagnostic. In this case, the delayed
diagnostic will be emitted after we're done with the other
diagnostic. This is only to be used for fatal conditions detected at
very inconvenient times, where we can neither stop the current
diagnostic in flight nor can we suppress the second error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-22 15:10:57 +00:00
Douglas Gregor 2d52be56ff Keep track of the size/modification time of each file source-location
entry in a precompiled header, so that we can detect modified files
even when we miss in the stat cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-21 22:49:54 +00:00
Douglas Gregor 5de65721bd Fix a longstanding (but previously unknown) bug in the lazy
deserialization of precompiled headers, where the deserialization of
the source location entry for a buffer (e.g., macro instantiation
scratch space) would overwrite a one-element FileID cache in the
source manager. When tickled at the wrong time, we would return the
wrong decomposed source location and eventually cause c-index-test to
crash.

Found by dumb luck. It's amazing this hasn't shown up before.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98940 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 06:12:06 +00:00
Douglas Gregor 0419a2375f Check the inode in addition to size and modification time to determine
whether a file has changed since it was originally read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 15:33:06 +00:00
Douglas Gregor e39b600582 Use a simple diagnostic (file modified) when we detect that a file has
changed, rather than trying to point out how it changed. The "why"
doesn't matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98725 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 15:30:15 +00:00
Douglas Gregor c815108d08 Teach SourceManager's content cache to keep track of whether its
buffer was invalid when it was created, and use that bit to always set
the "Invalid" flag according to whether the buffer is invalid. This
ensures that all accesses to an invalid buffer are marked invalid,
improving recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 22:53:51 +00:00
Douglas Gregor 64e462dff0 Update get*LineNumber() and get*ColumnNumber() functions to pass the
Invalid bit through; there are no safety-critical callers of these
functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 20:53:17 +00:00
Douglas Gregor a543016fe0 Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 20:46:42 +00:00
Douglas Gregor aae58b0c3e Audit all getBuffer() callers (for both the FullSourceLoc and
SourceManager versions), updating those callers that need to recover
gracefully from failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 20:01:30 +00:00
Benjamin Kramer ceafc4b635 Switch another function to StringRef instead of char pointer pairs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 14:48:07 +00:00
Benjamin Kramer f6ac97b101 Let SourceManager::getBufferData return StringRef instead of a pair of two const char*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 14:14:31 +00:00
Douglas Gregor 50f6af7a6d Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.

I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98608 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 05:20:39 +00:00
Douglas Gregor 36c35ba0ac Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98598 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 00:35:39 +00:00
Douglas Gregor f715ca12bf Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 00:06:06 +00:00
Douglas Gregor f9b0a58a10 Add some <cstdio> includes to unbreak the buildbots
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 23:33:37 +00:00
Douglas Gregor aea67dbd65 Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 22:54:52 +00:00
Kovarththanan Rajaratnam 50acf24b71 Reintroduce r98340 and r98341 now without copy/paste errors.
Thanks to Ben for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 11:27:37 +00:00
Kovarththanan Rajaratnam 6561adf16d Back out r98340 abd r98341
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 11:00:51 +00:00
Nuno Lopes 33d3bcac0b fix PR6584: __SSE3__ not defined with -mss3
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 10:20:09 +00:00
Kovarththanan Rajaratnam f9bc110857 Switch parameter order for consistency (no functionality change)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 10:17:07 +00:00
Kovarththanan Rajaratnam 362f6f2d57 Add keywords using StringRef
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98340 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 10:14:26 +00:00
Ted Kremenek 8515fbf1a1 Fix -Wsign-compare warning reported by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-10 18:22:38 +00:00
Chris Lattner 9cbeb63901 add mblaze target support, patch by Wesley Peck!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 21:21:27 +00:00
Benjamin Kramer 940f646548 Make sure the raw_string_ostream gets flushed so we don't accidentally return an empty string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 15:39:20 +00:00
Chris Lattner 3a47c4e0a3 add TCE target support, patch by Pekka J!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 21:07:38 +00:00
Eric Christopher d41b4ec580 Add in disabled case as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 02:31:44 +00:00
Eric Christopher d39ebe2d2a Add in -msse4.1 and -msse4.2 options and continuing a rather
hacky solution for translating.  Expanded on comment explaining
the hack a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 02:26:37 +00:00
Chris Lattner 2752c0137d add framework for ARM builtins, Patch by Edmund Grimley Evans!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 19:03:45 +00:00
Ted Kremenek ec5008807b Use SVN_REVISION, not SVN_VERSION.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:30:39 +00:00
Ted Kremenek 971cc48dca Make getClangRevision() check that SVN_VERSION is an empty string
(even if it is defined).  This fixes the issue of this function
returning '0' when SVN_VERSION is defined to be "".

Fixes: <rdar://problem/7663667>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:02:48 +00:00
Eric Christopher ed734737d5 Add in some more MIPS command line options.
Patch by Oleksandr Tymoshenko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97544 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 02:41:08 +00:00
Douglas Gregor d1eabfb15c Robustify SourceManager::getLocation(), so that it returns an
end-of-line source location when given a column number beyond the
length of the line, or an end-of-file source location when given a
line number beyond the length of the file. Previously, we would return
an invalid location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-27 02:42:25 +00:00
Douglas Gregor b9c903bc7c Use a little binary header in serialized diagnostics to help the deserializer skip over noise in the stream
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19 00:40:40 +00:00
Douglas Gregor 0a812cf707 Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 23:07:20 +00:00
Douglas Gregor a88084b78f Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 18:08:43 +00:00
Chris Lattner e03ae30bc2 add freebsd/ppc[64] support, patch by Nathan Whitehorn, PR6318
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96362 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 18:14:57 +00:00
Sanjiv Gupta fcd302b5e4 Re-applying 96173. Looks like finally I got the test case right.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 03:37:11 +00:00
Sanjiv Gupta 5591a6b5a8 reverting back 96242 as it still causes a test failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 18:02:12 +00:00
Sanjiv Gupta aed63cbe10 Re-applying 96173 with corresponding changes in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 17:19:13 +00:00
Chris Lattner 94baf7fc05 temporarily revert 96173, it is causing test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96176 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:38:38 +00:00
Sanjiv Gupta a5999e2a51 renamed pic16 specifiic macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:20:18 +00:00
Ted Kremenek 974be4d50a Fix bug I introduced with assinging a temporary to a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 23:31:14 +00:00
Ted Kremenek a2a9d6e4e5 Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:

getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 22:54:40 +00:00
Chris Lattner a5c6c5814b fix a bug in SourceManager::getInstantiationLocSlowCase, where
we'd add an offset from the spelling location space to the 
instantiation location, which doesn't make sense and would
lead up to the text diagnostics crashing when presented with
non-sensical locations.

This fixes rdar://7597492, a crash on 255.vortex.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 19:31:35 +00:00
John McCall 779cf424a1 Suppress warnings if their instantiation location is in a system header, not
their spelling location.  This prevents warnings from being swallowed just
because the caret is on the first parenthesis in, say, NULL.

This is an experiment;  the risk is that there might be a substantial number
of system headers which #define symbols to expressions which inherently cause
warnings.  My theory is that that's rare enough that it can be worked
around case-by-case, and that producing useful warnings around NULL is worth 
it.  But I'm willing to accept that I might be empirically wrong.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 10:04:29 +00:00
Daniel Dunbar b2987d159a Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 18:49:11 +00:00
John Thompson 82287d19de First stage of adding AltiVec support
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-05 00:12:22 +00:00
Chris Lattner b9f709665a Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global.  This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly 
handle).  This is rdar://7589850



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 20:59:08 +00:00
Benjamin Kramer 3bb6530019 Simplify FreeBSD version parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 19:55:01 +00:00
Anders Carlsson 83c021c6d3 Yay for more StringRefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 19:12:25 +00:00
Anders Carlsson f959fb5fb8 StringRef-ize the TargetInfo::ConstraintInfo constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 18:33:31 +00:00
Benjamin Kramer e242d5f5fa We don't need to place 0 in the URL string now that we return a StringRef.
- URL can go into read only memory now.
- Compilers will fold away all the strstr calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 14:01:39 +00:00
Anton Korobeynikov 09f52a696e Fix alignment for msp430 integer types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-30 12:55:11 +00:00
Douglas Gregor d93256e556 Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().

The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 06:00:51 +00:00
Daniel Dunbar d410fa259e ARM/APCS: Fix alignment of long double.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:23:08 +00:00
Anders Carlsson 9b0fb629fd Add support for 3dnow and 3dnowa, and define the target macros accordingly. (This is needed in order to build Qt).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94658 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 03:47:49 +00:00
Daniel Dunbar 21ae3196c9 Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:44:04 +00:00
Chris Lattner 0bb46d285c -fno-rtti is now the default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:31 +00:00
Ted Kremenek a18f1b88a7 Rename getClangFullVendorVersion() to getClangFullVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 02:11:34 +00:00
Ted Kremenek 04bb716aea Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:44:15 +00:00
Ted Kremenek 3687a5d83f Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:29:50 +00:00
Ted Kremenek f7a96a3995 (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
    agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
    amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
    getClangFullRepositoryVersion() instead of also emitting the value
    of getClangSubversionRevision() (which has been removed).  This is
    functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 22:12:47 +00:00
Ted Kremenek 517e676b9e Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:55:35 +00:00
Daniel Dunbar 38474aa780 Update to use llvm/utils/GetSourceVersion to detect version number, instead of
assuming SVN. This should be fixed to not necessarily be an integer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 16:56:47 +00:00
Chandler Carruth 103b71c37a Move the MacroBuilder utilitiy to its own header. Update references.
Comments and/or improvements to the documentation are welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93982 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 06:13:02 +00:00
Chandler Carruth b3ee1df5a4 Actually remove the include that r93974 made unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 04:09:11 +00:00
Anton Korobeynikov 26d18c1e18 long long is 64 bits on msp430
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 20:22:45 +00:00
John McCall 909c182f6a Pre-emptive bugfixes in the diagnostics code: allow arbitrary punctuation
characters to be escaped and implement a scan-forward function which
properly respects brace nesting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 20:11:39 +00:00
John McCall 3be16b7d9d Add the %ordinal format modifier for turning '1' into '1st'. Hard-coded for
English right now;  would not be impossible to grab a special format string
from the diagnostic pool and localize that way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 00:50:32 +00:00
John McCall 9f28614bf1 Perform format-expansion on %select results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 23:58:20 +00:00
Fariborz Jahanian 7d957472ef Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 18:51:17 +00:00
Fariborz Jahanian 453c1349a5 Define __weak attribute for objective-c pointers in
win32 targets. Fixes radar 7530235. Daniel please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93246 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 18:33:57 +00:00
Benjamin Kramer 4872508294 Hopefully unbreak build with g++ >= 4.3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93060 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 18:20:57 +00:00
Benjamin Kramer a99927774d Use MacroBuilder for TargetDefines instead of std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 17:55:51 +00:00
Chris Lattner 7a7ca281bc improve support for dragonfly, patch by Sascha Wildner!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93044 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 05:41:14 +00:00
Nuno Lopes 2550d70aab move a few more symbols to .rodata/.data.rel.ro
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 17:49:57 +00:00
Chris Lattner e663c72006 implement -W[no-]fatal-errors, patch by Christian Adåker!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:12:53 +00:00
Daniel Dunbar 5affb539ac ARM: Remove a FIXME, it's not actually more complicated than that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:59:17 +00:00
Daniel Dunbar a91320b8af ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
   intent (which diverges from practice, naturally).
 - Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-21 23:28:17 +00:00
Daniel Dunbar 97f52ac453 ARM: Use front-end specific target features "soft-float" and "soft-float-abi" to communicate FP mode to target; __SOFTFP__ is set correctly now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 04:15:38 +00:00
Daniel Dunbar b93292ab7f Targets: Allow CreateTargetInfo to mutate the target features.
- In particular, it can claim features for itself instead of always passing them on to LLVM.
 - This allows using the target features as a generic mechanism for passing target specific options to the TargetInfo instance, which may need them for initializing preprocessor defines, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 03:30:57 +00:00
Anton Korobeynikov b381441bfb Add f80 entry for windows targets
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 02:05:07 +00:00
Anton Korobeynikov 5d7c2511a4 Use proper alignment for i16/i32 on msp430. This fixes PR5815.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 01:32:37 +00:00
Daniel Dunbar 0791aa52b6 ARM: Define __thumb2__ for V6T2 targets and only define
__USING_SJLJ_EXCEPTIONS__ on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 19:57:13 +00:00
Daniel Dunbar eac7c53f16 ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).
- This should be done leveraging the backend, but I'm a little refactored
   out. I'll fix it one day, I promise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 18:42:37 +00:00
John Thompson ec387afb60 Tweaks for PS3 target.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 14:21:08 +00:00
John Thompson 9a6ac540ba Removing trailing directory separator, to make stat work
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 14:18:21 +00:00
Nuno Lopes aa8e36108f fix PR5689: add support for 'o' and 'V' asm input operands
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 14:28:21 +00:00
Daniel Dunbar 475ddb4547 FileManager: Do not cache failed stats, it is easy to construct common
inconsistent situations if we do, and they are not important for PCH performance
(which currently only needs the stats to construct the initial FileManager
entries).
 - No test case, sorry, the machinations are too involved.

This occurs when, for example, the build makes a PCH file and has a header map
or a -I for a directory that does not yet exist. It is possible we will cache
the negative stat on that directory, and then in the build we will never find
header files inside that dir.

For PCH we don't need these stats anyway for performance, so this also makes PCH
files smaller w/ no loss. I hope to eventually eliminate the stat cache
entirely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:27:20 +00:00
Daniel Dunbar 21a8bed504 Add a pretty horrible hack to prevent clang from crashing with inconsistent PCH
files.
 - The issue is that PCH uses a stat cache, which may reference files which have
   been deleted or moved. In such cases ContentCache::getBuffer was returning 0
   but most clients are incapable of dealing with this (i.e., they don't).

   For the time being, resolve this issue by just making up some invalid file
   contents and. Eventually we should detect that we are in an inconsistent
   situation and error out with a nice message that the PCH is out of date.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 05:43:36 +00:00
Steve Naroff 0304c6cb7f Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).
Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 12:23:07 +00:00
Steve Naroff e0c4d895ff Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=71086

Note - This commit only includes the fix for:

<rdar://problem/6309338> slightly different error message format for Visual Studio.

The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 02:14:08 +00:00
Douglas Gregor 109ae73ec7 Minor cleanup to the code-completion-point logic suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:05:59 +00:00
Douglas Gregor 057e567f1b Extend -remap-file=from;to to permit mapping from a non-existent
file. This is accomplished by introducing the notion of a "virtual"
file into the file manager, which provides a FileEntry* for a named
file whose size and modification time are known but which may not
exist on disk.

Added a cute little test that remaps both a .c file and a .h file it
includes to alternative files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 18:12:28 +00:00
Douglas Gregor 2968442603 Extend the source manager with the ability to override the contents of
files with the contents of an arbitrary memory buffer. Use this new
functionality to drastically clean up the way in which we handle file
truncation for code-completion: all of the truncation/completion logic
is now encapsulated in the preprocessor where it belongs
(<rdar://problem/7434737>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 06:49:09 +00:00
Douglas Gregor 4a160e16eb Eliminate the unnecessary FirstFID cache variable from the source manager's ContentCache
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02 05:34:39 +00:00
Daniel Dunbar fbcc7bed1a In SourceManager::isBeforeInTranslationUnit, if we are trying to compare two source locations with no common ancestor in the include stack, determine order by assuming memory buffers preceed files, and then that FileIDs are created in order.
The later assumption is patently false, but this was already broken -- this situation is conceptually impossible, my feeling is we should fix SourceManager and friends to make it impossible in practice as well. However, we need to fix PR5662 and perhaps some other things involving memory buffers first. In the short term I'm pretty sure this is reliable.

Chris, Argiris, is this going to break anything that wasn't already broken?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 23:07:57 +00:00
Chris Lattner 39d9841ed4 pass the reason for failure up from MemoryBuffer and report it
in diagnostics when we fail to open a file.  This allows us to
report things like:

$ clang test.c -I.
test.c:2:10: fatal error: error opening file './foo.h': Permission denied
#include "foo.h"
         ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:52:33 +00:00
Daniel Dunbar 32d4d80c26 Convert Diagnostic::getCustomDiagID to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 17:42:06 +00:00
Kovarththanan Rajaratnam 59c55e7249 This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-28 16:09:28 +00:00
Edward O'Callaghan 9cf910efc4 Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21 00:49:54 +00:00
John Thompson 3f6918a8cc Added preliminary support step for PS3
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 17:18:50 +00:00
Daniel Dunbar 2fc430d548 Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
in the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 09:15:44 +00:00
Daniel Dunbar c5a97ec194 Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 07:07:28 +00:00
Daniel Dunbar 0be42c44f0 Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 07:06:20 +00:00
Daniel Dunbar 1f95e6567f Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 06:37:03 +00:00
Edward O'Callaghan 84423a8c84 Add MIPS support to Triple for Linux and the PSP. Credit to Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 10:22:07 +00:00
Daniel Dunbar d58c03f42e Add TargetOptions and use it when constructing targets.
- This ended up being hard to factor, sorry for the large diff.

 - Some post-commit cleanup to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 06:48:46 +00:00
Benjamin Kramer c997eb4ac1 Move DISABLE_INLINE to the front of the decl so MSVC can parse it. Patch by Amine Khaldi!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 16:36:57 +00:00
Chris Lattner 9184646509 do not store wchar/char16/char32/intmax width/alignment info
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 08:04:33 +00:00
Daniel Dunbar 29a790ba42 Simplifiy target feature handling by coalescing all the logic into
InitializeCompileOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 09:38:56 +00:00
Chris Lattner 1932e12d8b teach the various targets what native integer types they have.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86395 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 18:59:41 +00:00
Douglas Gregor 1fbf1f0052 Strip off the /clang/tools/clang at the end of the Subversion URL, if it's there
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 23:46:05 +00:00
John Thompson 40d1bb6383 Eliminate tabls
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 22:03:02 +00:00
Chris Lattner 9099e7bcda clean up integer preprocessor type definitions, patch by Ken Dyck!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 21:21:32 +00:00
John Thompson a6fda124bf Adding -fshort-wchar option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 20:14:16 +00:00
Douglas Gregor ca1bdd7c26 Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

  p->template operator+<T>()




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04 00:56:37 +00:00
Chris Lattner 170b765785 pr5371 likely has nothing to do with this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 05:11:39 +00:00
Edward O'Callaghan 3963e756e3 Add note to FIXME about PR5371.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02 21:25:11 +00:00
Chris Lattner 961f0708fb rename getTypeSigned() -> isTypeSigned() per daniel's review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 22:49:18 +00:00
Daniel Dunbar 5c14dcebde Fix cmake failure trying to get SVN info for non-SVN trees.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 20:32:58 +00:00
Sanjiv Gupta 7de7009a00 Add a preprocessor define for adding a "near" section attribute for allowing
objects to be placed at shared memory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85007 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 18:08:20 +00:00
John Thompson ca2c3e2cfc Fixed undefined behavior in pushMappings when the stack has to resize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-23 02:21:17 +00:00
Chris Lattner b304f77cb6 add helpful methods to TargetInfo for querying builtin integer type properties,
patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 06:24:21 +00:00
Chris Lattner e64ef80363 hookize wint_t's definition, patch by Edward O'Callaghan (from PR5233).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21 04:59:34 +00:00
Chris Lattner b54d8af9a6 teach FormatDiagnostic to aggregate previously formatted arguments and
pass them down into the ArgToStringFn implementation.  This allows 
redundancy across operands to a diagnostic to be eliminated.

This isn't used yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 05:25:22 +00:00
Daniel Dunbar 01eb9b9683 PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 21:17:35 +00:00
Edward O'Callaghan 991f9a74e7 The AuroraUX toolchain has conflicting wchar_t between the system stdlib.h header and the clang stddef.h header where clang was defining as int where we use long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 13:33:59 +00:00
Daniel Dunbar 76b61ccc60 Avoid std::string thrashing in MultiKeywordSelector::getName(), and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:13:02 +00:00
Daniel Dunbar 23e47c6b6e Use raw_ostream for formatting integers, and use IdentifierInfo::getNameStr
instead of getName.
 - -2 FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 18:12:14 +00:00
Douglas Gregor 52e7108f51 Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 18:18:30 +00:00
Chris Lattner 5a3ce9b10c increase helpfulness of assert message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16 02:34:51 +00:00
Anton Korobeynikov 03265b6046 Disallow arbitrary custom inline asm constraints for msp430.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 23:17:13 +00:00
Chris Lattner 278b9f0693 fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings
   just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
   is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.

This fixes rdar://7115750



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-14 05:55:45 +00:00
Douglas Gregor 3f09327b26 Unify our diagnostic printing for errors of the form, "we didn't like
what we found when we looked into <blah>", where <blah> is a
DeclContext*. We can now format DeclContext*'s in nice ways, e.g.,
"namespace N", "the global namespace", "'class Foo'".

This is part of PR3990, but we're not quite there yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:16:44 +00:00
Chris Lattner 4053983963 fix PR4938 by recognizing % as a modifier on outputs,
previously we only recognized it on inputs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:32:07 +00:00
Mike Stump a55cce8b3e "Someone pointed out that in my previous Targets.cpp patch I didn't
handle the long size difference for one of the Windows targets."  Patch
by John Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 23:00:00 +00:00
Douglas Gregor 14ea569641 Installation of Clang libraries and headers, from Axel Naumann!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-08 22:15:31 +00:00
Douglas Gregor b8d1191fde Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation. 



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 20:33:49 +00:00
Douglas Gregor 60b5d8ed59 Pre-commit commit to get URL keyword expansion for Clang version information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 18:52:24 +00:00
Cedric Venet 9a7b0855a6 Handle Eli remark on mingw __declspec macro definition
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27 10:09:11 +00:00
Daniel Dunbar 9fe4a5d8a6 Factor Windows target into VS, MinGW and Cygwin variants.
- Patch by John Thompson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 07:31:35 +00:00
Chris Lattner 21fb98ee00 implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 06:06:36 +00:00
Daniel Dunbar dff10dcee0 Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:44:58 +00:00
Douglas Gregor b657f115c3 Replace the -code-completion-dump option with
-code-completion-at=filename:line:column

which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:11:38 +00:00