History log of /external/clang/lib/Frontend/InitPreprocessor.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Frontend/InitPreprocessor.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Frontend/InitPreprocessor.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Frontend/InitPreprocessor.cpp
c78e5b33cb2dccfd7972eed2bc4a785cfa42bf94 28-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195888:
------------------------------------------------------------------------
r195888 | rsmith | 2013-11-27 14:58:16 -0800 (Wed, 27 Nov 2013) | 2 lines

Add support for C++'s SD6 feature test macros.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5ada7a5e9747e03e8c3725b1b4d00e2a9f448e9e 29-Sep-2013 Ed Schouten <ed@80386.nl> 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__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
585c84c5afd91f57b84b0236aa28620438cfe636 16-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Add a define for the ObjFW runtime ABI version.

This removes __has_feature(objc_msg_lookup_stret), as it is not required
anymore after this patch.

Patch by Jonathan Schleifer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7b7bef1ec355fb46643349d77c266b913f36b656 05-Sep-2013 Stepan Dyatkovskiy <stpworld@narod.ru> Add new methods for TargetInfo:
getRealTypeByWidth and getIntTypeByWidth
for ASTContext names are almost same(invokes new methods from TargetInfo):
getIntTypeForBitwidth and getRealTypeForBitwidth.

As first commit for PR16752 fix: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth virtual methods. By default current behaviour could be implemented here.
2. Fix handleModeAttr according to new methods in TargetInfo.
This approach is implemented in the patch attached to this post.

Fixes:
1st Commit (Current): Add new methods for TargetInfo:
getRealTypeByWidth and getIntTypeByWidth
for ASTContext names are almost same(invokes new methods from TargetInfo):
getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Next): Fix SemaDeclAttr, handleModeAttr function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
62c90e188931e01fc5b08eae8b25de43ed3a1a7c 28-Aug-2013 Eli Friedman <eli.friedman@gmail.com> 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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7f0ffb3a9f4ce7428fd4f6eb3c3274c867c134f8 07-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
edaf281379e0aa712caf984ee33388e5f414e18d 28-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Define __SIZE_MAX__ preprocessor macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3ad86fd2effccf1b9337e8cb9a317e4353cec275 05-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.

Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.

Related to radar://13140508

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
50a70cd11801fd9a700d06e447095249c34c261f 15-Jan-2013 Douglas Gregor <dgregor@apple.com> Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
80ad52f327b532bded5c5b0ee38779d841c6cd35 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CPlusPlus0x/CPlusPlus11/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
84268904947ada7e251932a6f5b0f4364df7a2c7 29-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reject uses of __int128 on platforms that don't support it. Also move the ugly
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be
properly cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
75e8efef960a5e8b94a7e289088e5e7cabe728bd 10-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Make __LDBL_MAX__ etc. have the correct type on targets where long double/double/etc. have the same format. PR14285.

Based on patch by Jeroen Dobbelaere.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
14e71f04136de056c08ffb9ccd44b4ca391cc8a5 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4ec429d1be4ede3d02712714f20470b2c87f748c 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Handle implicitly-included PCH files the same way as
implicitly-included PTH files during initialization, delaying the
mapping down to the "original source file" until after later in the
initialization process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5ba49c0177bd594a9760956f51293b5731b03d6d 18-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -std=c++1y argument, for *highly* experimental C++14 support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d7ee194e7c7649cad542a36cd1d26c23432807aa 08-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Don't emit double parentheses in __clang_version__.

PR14040.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5b86ffd219bdee7720217d5755b772726668b242 05-Sep-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Allow disabling of wchar_t type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
6c4590f3470df97deb6150652d40155b20466ef7 25-Aug-2012 Francois Pichet <pichet2000@gmail.com> _HAS_CHAR16_T_LANGUAGE_SUPPORT is not predefined MSVC macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
0a7dd788dbef975f35f273c7ab913f480f7edd60 21-Aug-2012 John McCall <rjmccall@apple.com> Screw around with ObjCRuntime some more, changing the
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
6bd3291605a3034b858c8aeecc6990fa4f979f6c 10-Aug-2012 Dylan Noblesmith <nobled@dreamwidth.org> Frontend: define _LP64 in a target-independent way

Instead of adding it to each individual subclass in
Targets.cpp, simply check the appropriate target
values.

Where before it was only on x86_64 and ppc64, it's now
also defined on mips64 and nvptx64.

Also add a bunch of negative tests to ensure it is *not*
defined on any other architectures while we're here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5aeda88995fd98d55f3c565a108196e2b0df16ed 08-Aug-2012 Dylan Noblesmith <nobled@dreamwidth.org> Frontend: further document __BYTE_ORDER__

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3b198a97d2aceb1620483586c8c3cabf9e5e8078 27-Jul-2012 Dylan Noblesmith <nobled@dreamwidth.org> Preprocessor: add __BYTE_ORDER__ predefined macro

The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
...
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
...
#else
#error insane architecture like the pdp-11
#endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
455e72e7625a8f87c2c302d8d82baee5c111e094 19-Jul-2012 Bob Wilson <bob.wilson@apple.com> Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.

This macro was being unconditionally set to zero, preceded by a FIXME comment.
This fixes <rdar://problem/11845441>. Patch by Michael Gottesman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
260611a32535c851237926bfcf78869b13c07d5b 20-Jun-2012 John McCall <rjmccall@apple.com> Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3065cf9ecc883715edbd3bf875acb2cab531138e 19-Jun-2012 Ted Kremenek <kremenek@apple.com> Sink definition of IBOutlet, IBOutletCollection, and IBAction into
the compiler predefines buffer. These are essentially part of
the Objective-C language.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
c5613b26a24a33d7450e3d0bf315c6ccc920ce7b 16-Jun-2012 Meador Inge <meadori@codesourcery.com> Explicitly build __builtin_va_list.

The target specific __builtin_va_list types are now explicitly built instead
of injecting strings into the preprocessor input.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
809d1be9820039b4cf6efa48246a0d70ffa13394 14-Jun-2012 James Dennett <jdennett@google.com> More doxygen/documentation cleanups.

This reduces the number of warnings generated by Doxygen by about 100
(roughly 10%). Issues addressed:
(1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments
when they're not supposed to be Doxygen commands or links, and
similarly for "<baz>" when it's not intended as as HTML tag;
(2) Changed some \t commands (which don't exist) to \c ("to refer to a
word of code", as the Doxygen manual says);
(3) \precondition becomes \pre;
(4) When touching comments, deleted a couple of spurious spaces in them;
(5) Changed some \n and \r to \\n and \\r;
(6) Fixed one tiny typo: #pragms -> #pragma.

This patch touches documentation/comments only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a30d8600b9b52922a92a90b30993564ba257537a 04-May-2012 James Molloy <james.molloy@arm.com> Add a predefine __WINT_UNSIGNED__, similar to __WCHAR_UNSIGNED__, and test them both for ARM and X86.

Use this to fully fix Sema/format-strings.c for non-x86 platforms.

Reviewed by Chandler on IRC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
0513448ae71478fd08d7e925bab46db1ddac3dfa 04-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the standard values for the __cplusplus macro, even when in GNU mode. GCC
dropped its prior behavior of always defining __cplusplus to 1 in GNU mode in
version 4.7.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
2c39d71bb7cefdfe6116fa52454f3b3dc5abd517 13-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement the missing pieces needed to support libstdc++4.7's <atomic>:
__atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
predefined macros.

Implement library fallback for __atomic_is_lock_free and
__c11_atomic_is_lock_free, and implement __atomic_always_lock_free.

Contrary to their documentation, GCC's __atomic_fetch_add family don't
multiply the operand by sizeof(T) when operating on a pointer type.
libstdc++ relies on this quirk. Remove this handling for all but the
__c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.

Contrary to their documentation, __atomic_test_and_set and __atomic_clear
take a first argument of type 'volatile void *', not 'void *' or 'bool *',
and __atomic_is_lock_free and __atomic_always_lock_free have an argument
of type 'const volatile void *', not 'void *'.

With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
except for a couple of libstdc++ bugs and some cases where libc++'s test
suite tests for properties which implementations have latitude to vary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5e219cf7f896873c1c1e64b9e87a7dade99debba 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Teach Clang about PIE compilations. This is the first step of PR12380.

First, this patch cleans up the parsing of the PIC and PIE family of
options in the driver. The existing logic failed to claim arguments all
over the place resulting in kludges that marked the options as unused.
Instead actually walk all of the arguments and claim them properly.

We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the
last one on the commandline. Previously there were lots of ordering bugs
that could creep in due to the nature of the parsing. Let me know if
folks would like weird things such as "-fPIE -fno-pic" to turn on PIE,
but disable full PIC. This doesn't make any sense to me, but we could in
theory support it.

Options that seem to have intentional "trump" status (-static, -mkernel,
etc) continue to do so and are commented as such.

Next, a -pie-level flag is threaded into the frontend, rigged to
a language option, and handled preprocessor, setting up the appropriate
defines. We'll now have the correct defines when compiling with -fpie.

The one place outside of the preprocessor that was inspecting the PIC
level (as opposed to the relocation model, which is set and handled
separately, yay!) is in the GNU ObjC runtime. I changed it to exactly
preserve existing behavior. If folks want to change its behavior in the
face of PIE, they can do that in a separate patch.

Essentially the only functionality changed here is the preprocessor
defines and bug-fixes to the argument management.

Tests have been updated and extended to test all of this a bit more
thoroughly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5b31d55ab3a72c026a0781b6dcf9bc1dd462e8b9 10-Mar-2012 Aaron Ballman <aaron@aaronballman.com> No longer defining GNUC mode when compiling for Microsoft compatibility. This allows people's cross-platform compiler-specific macros to work properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7b14026640d76145c4a9a9ac3b2e647bb49651f8 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bit
more obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5f3c163b7b19a0c7e02509a0984ee1256bca890d 18-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Implement #pragma redefine_extname.

This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7a7ee3033e44b45630981355460ef89efa0bdcc4 16-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.

Still to do:

- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
752c74d99b647710a495c2ff5f815c30a30c3264 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Add a "Modules" language option, which subsumes the previous
"AutoModuleImport" preprocessor option and is tied to -fmodules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ba9186c6fca2b8dd7885c909e7b1fd76c537c4ed 03-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Teach the frontend to provide the builtin preprocessor defines for
-ffast-math.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
b406669fea7c8db83a377f368f1689c848296974 28-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 with sse disabled.

x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD
to "2".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
430cf51d4a4744fdcc9286098c659f9c82e3bd9a 23-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Give C11's __STDC_VERSION__ the final value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a 23-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.

Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
cb381eac84e5a14a8c7e7654eadbe1d3d54d795c 09-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Move a free function from the Frontend library into the Lex library as
part of HeaderSearch. This function just normalizes filenames for use
inside of a synthetic include directive, but it is used in both the
Frontend and Serialization libraries so it needs a common home.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5aa6dea4efe19f4c2e6600364123fb8899ec4af7 29-Oct-2011 Douglas Gregor <dgregor@apple.com> Give __STDC_VERSION__ the value 201001L when we're in C1x mode. The
committee hasn't set a value for __STDC_VERSION__ yet, so this is a
placeholder. But at least it's > 199901L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
85037d987a68b8bc9db22e4e1c18cac80b74ea1c 20-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Define __STDC__ in -fms-extensions mode; defining it is consistent with gcc, and not defining it causes the system headers on multiple platforms to break with -fms-extensions because they assume the lack of a definition of __STDC__ implies a traditional (pre-ANSI) preprocessor. PR10324 and <rdar://problem/10313809> .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ed73b1046d1f30d64b47baaaeaaeffa6ef0dde91 28-Sep-2011 Douglas Gregor <dgregor@apple.com> Remove the egregious hack that made Objective-C++ ARC work with older
versions of libc++. Newer versions of libc++ know how to deal with ARC
properly. Fixes <rdar://problem/10062179>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
47fcd293a526e898437b8fe1696310ccf92dd8e5 20-Sep-2011 Eric Christopher <echristo@apple.com> Remove __WCHAR_UNSIGNED__ and anything that used it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
fba18aa8f2cd1994dc65e8cb9f4be201c560dc0b 16-Sep-2011 Douglas Gregor <dgregor@apple.com> Add an experimental flag -fauto-module-import that automatically turns
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
e289d81369914678db386f6aa86faf8f178e245d 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
eced60c185c92a34953090b98d8458fb2df9dc81 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
2f5127e6e0dbd9fcead5d61576d4c40237a28927 19-Jul-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a __WCHAR_UNSIGNED__ macro and use it to include WCHAR_MIN and
WCHAR_MAX in limits.h, thus solving the problem where the system header
thinks it knows better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
16c3eaeea209487ce688215736f0660fc530c17d 05-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue.
Patch by Jean-Daniel Dupas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
b8b0313e84700b5c6d597b3be4de41c97b7550f1 24-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.

rdar://9477613.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
0678899e0d619df03eae2e2d43c3fe1fa958d03a 20-Jun-2011 Douglas Gregor <dgregor@apple.com> Define __cplusplus to 201103L when in (non-GNU) C++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
098df7f1de80527d7a70e410a5830c8b2d742310 16-Jun-2011 John McCall <rjmccall@apple.com> Unconditionally #define the ARC ownership qualifiers, instead of #defining
them only on Darwin tool chains.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
146480922cfd80b1ca4b022bf242481b3899c62b 10-Jun-2011 Nick Lewycky <nicholas@mxc.ca> __OBJC__ is also a standard predefined macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a9c6441c73686c34fdf5de681bfd81381fd0903c 07-Jun-2011 Nick Lewycky <nicholas@mxc.ca> The macros defined by the language standard are still available even when the
-undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't
ask.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4b7e048970ddd0d75d428ddbb0ce48a71578fed2 10-May-2011 Francois Pichet <pichet2000@gmail.com> Add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a23ae3f45789f40cdfd939117284f977d2dc17a6 07-May-2011 Francois Pichet <pichet2000@gmail.com> Temporary preprocessor hack to get around the Microsoft __identifier(x) extension.
http://msdn.microsoft.com/en-us/library/hzc8ytsz(v=VS.100).aspx

Microsoft doc claims this is a C++/CLI feature but it is really always enabled.
This removes 2 error when parsing MFC code with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
338d7f7362d18fa9c39c6bb5282b4e20574a9309 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin defines to real types.

Otherwise statements like:
__int64 var = __int64(0);

would be expanded to:
long long var = long long(0);

and fail to compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f8c247d247f9f7ab2bf4965677e6d056711c99d5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1cfe3c305c0d5393fd94167808b8f5d96cd65227 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
matches GCC behavior which libstdc++ uses to limit #warning-based
messages about deprecation.

The machinery involves threading this through a new '-fdeprecated-macro'
flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We
turn the flag off in the driver when the warning is turned off (modulo
matching some GCC bugs). We record this as a language option, and key
the preprocessor on the option when introducing the define.

A separate flag rather than a '-D' flag allows us to properly represent
the difference between C and C++ builds (only C++ receives the define),
and it allows the specific behavior of following -Wdeprecated without
potentially impacting the set of user-provided macro flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1cfeefdb383b106f63d91dd715f54339467d6aa8 21-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ad1a4c6e89594e704775ddb6b036ac982fd68cad 31-Mar-2011 Daniel Dunbar <daniel@zuster.org> Change Clang's __VERSION__ to include the same basic info as in clang -v.
- Please never ever ever ever write a tool that sniffs this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
47226350c4f8094cf2ebe750351b2b3242709584 19-Mar-2011 Daniel Dunbar <daniel@zuster.org> Preprocessor: Don't define __STDC__ in -traditional-cpp mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
299a4a967b02c9f0d0d94ad8560e3ced893f9116 09-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.

Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d7f758cb88ce56c5f49faae088ab5a4073c28fa6 24-Feb-2011 Chris Lattner <sabre@nondot.org> Reimplement DefineTypeSize in terms of APInt. This eliminates some
magic integer arithmetic and allows it to work with types larger
than 64 bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
277a6e752512cff286190d35cb353ce717e86b18 23-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Preserve what the user passed to -include when emitting .d files. Fixes PR8974!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
fbfd180495e7800975c6d9bdc6d24e706ef70e34 21-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f0840820b4e28fd0cc04d737382811d7372cb832 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-fast-relaxed-math

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
39b49bcaaddb1049234fca9500c0ac02c088e23d 23-Nov-2010 Chris Lattner <sabre@nondot.org> now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
389db16c63eec6ecfa9b235155252d8da766e94e 03-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -working-directory.

When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
343d65c0739f9d4d6c6345a38a7228bafb1de4df 06-Sep-2010 Steven Watanabe <steven@providere-consulting.com> Tell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try to define them as typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
c5138b295744357e53d971b8751091fdd3487a2d 03-Sep-2010 Francois Pichet <pichet2000@gmail.com> First test commit by Francois Pichet. _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES is not a predefined macro, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
5c0ca52e40e0b9e3c2da7abba47b18e468c84060 30-Aug-2010 Douglas Gregor <dgregor@apple.com> Predeclare class type_info in Microsoft mode, from Francois Pichet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
13cfedb26c07dbe4ff20214943d231f7c93be81e 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1d832436e9cd9223cbad66c5ca9ac87ed5c8560c 03-Aug-2010 Eli Friedman <eli.friedman@gmail.com> PR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
8074ab3c3cda3534e595c67f485d7711c48b493d 03-Aug-2010 Chris Lattner <sabre@nondot.org> fix some undefined behavior, PR7779.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f4f6c9db68465b886ec2e596feaa6ecc782395a4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
44c181aec37789f25f6c15543c164416f72e562a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7f3a545ba6ccfbe8b7f5268e4cfbee52ec2c4d4c 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Headers: Define __INT64_TYPE__ in terms of getInt64Type(), which isn't always
'long'. The practical upshot is so that the uint64_t we define in our stdint.h
ends up being compatible with that defined by gcc (at least on Darwin), which
otherwise could lead to type incompatibilities with other system headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
6a9ca7abf027388179632502db502616d8105c3e 28-Jun-2010 Ted Kremenek <kremenek@apple.com> Remove state assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4ae4c919205307c6e98e6c920aa55019040cbe77 28-Jun-2010 Ted Kremenek <kremenek@apple.com> Don't crash in InitializePreprocessor() when there is no valid PTHManager. Fixes <rdar://problem/8098441>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a4f6bba83c6504ef3267b1c11bc5c042adc8fdb5 24-Jun-2010 Eric Christopher <echristo@apple.com> Remove HAS_TLS define.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1f84f8d970a673e487b40d341cd3e8d52ca9cc22 24-Jun-2010 Eric Christopher <echristo@apple.com> More clang support for darwin tls. Add a __has_feature macro and
target specific preprocessor define as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
cfeac3441afb44c9af86eef0c911a5d90d561192 28-May-2010 Dan Gohman <gohman@apple.com> Add several more predefines from modern versions of GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f0af777aff72b58333edcf258e30998e865bdef3 26-May-2010 Ted Kremenek <kremenek@apple.com> Predefine the '__clang_analyzer__' macro when using '-analyze'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4290fbd89e851c1f1240a007461f4afd940cbb47 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Add Clang version inspection macros. Fixes PR6681.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
fcaa9e787037b22a6833d4562fed3105c5b55f71 27-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6936: don't generate line marker directives when preprocessing
.S files. "# 123" is passed through as-is, not treated as a line
marker in this mode. No testcase, because it would be nasty and isn't
worth it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
2b003fd2766914133fa7418e1b368ca171ac4205 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Sink the _GNU_SOURCE definition down into the target configuration,
and only define it where we know we need it---Linux and Cygwin. Thanks
to Chris for the prodding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
66791df8d8b65c68de9ecf3246e895919af75bc2 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Only predefine the macro _GNU_SOURCE in C++ mode when we're on a
platform that typically uses glibc. Fixes a Boost.Thread compilation
failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
c8dfe5ece04e683106eb96c58a2999f70b53ac21 27-Feb-2010 Douglas Gregor <dgregor@apple.com> When given unsaved files in clang_createTranslationUnitFromSourceFile,
copy the source buffers provided rather than referencing them
directly, so that the caller can free those buffers immediately after
calling clang_createTranslationUnitFromSourceFile(). Otherwise, we
risk hitting those buffers later (when building source ranges, forming
diagnostics, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
b2987d159a88ab0ee2e40c884eb4d77b42ab89b6 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
4db64a461cb3442934afe43c83ed3f17f7c11c1d 23-Jan-2010 Douglas Gregor <dgregor@apple.com> Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
103b71c37a3c3a3da7128c1d0232a89b1e8d0d90 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
066515feea9af5319c138ff4db99081c7686c5b1 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
temporaries (this is one reason I'm nervous about propagating their use beyond
particularly performance critical places).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7d957472ef9a09048c03d8a11028536f908c18b9 13-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
1ee4b9e6d2d0d031708e2e6dd52aa9e32b83f1c3 10-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix PR5982, a refacto in checking for '=' in a -D argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a99927774d07af9c6f0e1945531eadc910592945 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
b1b5b901ca229ce05dc40abbec8bebe7b1096e42 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move MacroBuilder into Frontend/Utils.h and clean it up a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a3d8ced7f022cdbd09891f190342a08f22d80772 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Rework InitPreprocessor to use a MacroBuilder class instead of pushing around
std::vectors.

- MacroBuilder wraps a raw_ostream so it can easily write to any buffer
supported by raw_ostream.
- MacroBuilder's method take Twines for easy string concatenation (this was done
with sprintf and temporary buffers before).
- Targets still use std::vector as they don't have access to the builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3e82f8ac70887905caf5e95efab53fd73f9364e1 09-Jan-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Switch UndefineBuiltinMacro() over to using StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
8746e4e3810ffa54a3a0fa74ed95d8112defb6fe 09-Jan-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Switch DefineBuiltinMacro() over to using StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7d0eed6ed767afc5d849144915ef42a3108d473c 07-Jan-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Convert from char pointer to char array

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
a66a31940a459a16160d318ed1767f5c1c1e013e 07-Jan-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Tigthen scope of local char array

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
fdd6aaf16279c6141da929c1207c15be9b2551ee 04-Dec-2009 Steve Naroff <snaroff@apple.com> Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=70926



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
baac10380c8b8597a9e5f1beb96c439c3bf02baa 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
057e567f1b375190779e5341f42861896cdee442 02-Dec-2009 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
2973c0eff437e57541735c9bb9561358715440e6 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Move file-remapping logic into InitPreprocesor. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
0259d20ba1a188acb8770f4b5fab9fc947080be1 01-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Exit the command line into <built-in> instead of going directly from the command line to the input file.

We passed <built-in> on the way in, so we should pass it again on the way out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3e945c8cd8519d0973f14088d938fbc8eee9dc3c 22-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define __SIG_ATOMIC_WIDTH__ for use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
63e6561343b6bacf6509399a6d8fcce1c039d987 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Define __WCHAR_WIDTH__ for use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7635d2151d6045f8106bf947a8e536c1497a7c4e 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7484e5d8e2f2d79750b712c749d6dbfd741b14d5 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
8241d73c6415a2f5ab4c041c5501a95d7ee32663 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
__INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all
could potentially be in use in the wild. My apologies.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
cf2f71f91d6a619772a6fcba63684f28ca7bc72d 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
replaced with __PTRDIFF_WIDTH__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d00c75179c8c0b38e7bcd6365547ca5ba64bf491 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ed116e95bc01f002918343d6003b573bd17e26a3 19-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
__INTPTR_WIDTH__ instead.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d896e1ad8634ba84f2f2b2e9e35257b3845fc40b 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Predefine __INTPTR_WIDTH__ for future use in stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
eec59a7364cfb4ce409afb2074038dd315bbce96 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are no
longer used by stdint.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
186696bee3b3544d942bb43041595e210de577c6 18-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
stdint.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
049d3a06ea9f8fc03582488a2b7f24512565a335 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplify PreprocessorOptions, it doesn't need abstracted field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
eef22efce8dd9d0ba9adb8f4746b96b584f2521d 16-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Parameterize the constant-generating macros in stdint.h with new built-in
__INTn_C_SUFFIX__ macros that are defined for types with corresponding
constant suffixes (i.e. long and long long).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
dcdd2a064a6d3ea7712169629328ef80d6cb28ec 12-Nov-2009 Chris Lattner <sabre@nondot.org> Generalize stdint.h for non-8-bit-multiple types, patch by
Ken Dyck!

"This adds definitions for types of 8-bit multiples
from 8 to 64 to stdint.h and rationalizes the selection of types
for the exact-width definitions in InitPreprocessor.cpp."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
9184646509d015ea66e796113a8c68598681374b 12-Nov-2009 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
c7162937a4ccd044a0df67eed4a73ee828c49162 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak PCH -include handling to make sure it matches the name as would be present
in the predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
961c76ea8d5089293e448e5d538570653e28080c 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Always initialize the header search object as part of InitializePreprocessor;
not doing this has little to no utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
b6d1cc84d1a7e314f7a7a02fbe092adc4caf67e8 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> PreprocessorOptions: Get rid of unnecessary 'isPTH' flag for include entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
8863b985f1cf78a2fb62913e184dc45162853cf9 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
filenames.

Also, move InitializePreprocessor to Utils.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
9099e7bcda3922cee0cffcdf21332ac4aa193cea 05-Nov-2009 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
938963f076418aa61b570e5317240f66642af2df 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> InitializePreprocessor cannot fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
468fe246192c3683360d1a6b1b333d85b8794f77 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -undef flag into PreprocessorInitOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
e6113de52df132b89c3a5a6141f17d37e83322ae 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
47c06eea60873fe87adc2b5c985f0a3173e1d266 02-Nov-2009 Chris Lattner <sabre@nondot.org> clean up namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
c8837706654df1ecdfb1e6c6a164301ca8bf076e 29-Oct-2009 Chris Lattner <sabre@nondot.org> simplify intmax setup, patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
e64ef80363c84f4f431e26b61db554c89beeddb6 21-Oct-2009 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/InitPreprocessor.cpp
24ee804962ecef23eb040083eb668f9fa202e4c0 16-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Work-around wchar_t and __pragma problem in VC headers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f759df06d997050559fd925758bcd2cdef24db05 01-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Move the "needs exception support" logic to clang. This also fixes
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d9a1db3a4ded1c8f0daa43c0d6167576e2766453 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Non fragile ABI for GNU runtime. Patch bu David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
b8b844b92586031cf17684d5d1a37a2dc5cecc45 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Don't use '%ll', this doesn't workin on Win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
666479b24b1ab5ca0239779a502899b70beee700 28-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
d57a7ef9252964bc6c8471451d7bd395b0520cb8 24-Aug-2009 Chris Lattner <sabre@nondot.org> API changes to match llvm ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
36dd131b4981f31c4520c5430d21f4d159954c4d 06-Aug-2009 Douglas Gregor <dgregor@apple.com> Predefine __cplusplus to the right value (199711L), except when in GNU mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
07ef804f918d8aade8739a02e78c6209fd3062a9 21-Jul-2009 Ryan Flynn <pizza@parseerror.com> define __STDC_VERSION__ processor token for c94

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3c7b6e46c5f9bdbe0676c52d80df98b68b02be99 01-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4192: fix the definition of int64_t on x86_64 Linux.

Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:

#include <stdint.h>

int64_t x; long x;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
4ebe3e4c811a376c423a544f5e76ee2e96533324 29-Jun-2009 Bill Wendling <isanbard@gmail.com> Make the StackProtector bitfield use enums instead of obscure numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
45483f7a1b3e57b4603b141bee80596b2d4dd443 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
7478bbfea8ec19962ba8e47d0b8b4de15f5a5943 23-Jun-2009 Chris Lattner <sabre@nondot.org> __APPLE_CC__ should only be set when building for darwin targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
ae96a9637af7beea89a66d43bf3595b5a7d2756d 15-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4388: get rid of an extra # line directive; in addition to being
unnecessary, this was causing issues for assembler-with-cpp mode, which
doesn't process the directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
abc4e32603bd9d3e392e23762cc366e45d772685 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Misc minor fixes for clang for the Windows target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
15b91764d08e886391c865c4a444d7b51141c284 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Move CharIsSigned from TargetInfo to LangOptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
2de4feeef29c837466a5f109e75f37ec2022bb28 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Move a couple Darwin-specific defines into getDarwinDefines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
810dc54e1c091f7ee0167ef6e271e2ea308882e1 04-Jun-2009 Chris Lattner <sabre@nondot.org> DefineBuiltinMacro is always passed two args, remove the defaulted third
one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
63682f9c64ba48854d26870486cc33b3291f71b3 03-Jun-2009 Duncan Sands <baldrick@free.fr> Compile fix needed by the solaris system gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
2665a75c16b93a4977225472aa0e7bcf32ddcec6 23-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IEEE quad support to DefineFloatMacros.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
bf22be630e3d45c5c9c37bacb6325e16314431a6 23-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4247: Widen the buffer slightly so it can hold all the definitions for
PPC double double.

(No testcase because no normal target uses the format at the moment.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
34e65770ad6142b033d6cec4f476ed20fb248bf3 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
f086e3bef1d98d3fb6c17c8d6b62f3eedd9eb78c 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
dcdecf4a777e503b24de6b15a054d580b585c06c 15-May-2009 Chris Lattner <sabre@nondot.org> Fix processing of -Ufoo to not inject "#undef foo 1" into the predefines
buffer. This caused exciting nonsense like this:

$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
^
//
1 diagnostic generated.

rdar://6891800


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
1e7c6b67879b41369d5e8ddadb8aa6cef9013910 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add another workaround for -include.
- If we don't find a file looking relative to the current working
directory, fall back to header search. This is closer to what would
happen if the lookup was starting from right directory in the first
place (except it will find files in the directory of the main
source file, which I *think* should not be found).

- PR3992.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
3936024941229e235aed7f53949a117a54eebf68 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6814950 - stdint.h isn't "-pedantic -std=c89" clean,
by marking the predefines buffer as a system header. The problem
with stdint is that it was getting problems like this:

/Volumes/Projects/cvs/llvm/Debug/lib/clang/1.0/include/stdint.h:43:9: warning: 'long long' is an extension when C99 mode is not enabled
typedef __INT64_TYPE__ int64_t;
^
<built-in>:73:29: note: instantiated from:
#define __INT64_TYPE__ long long
^

We correctly silence warnings in system headers, but only if the
spelling location of the token came from the system header. This is
designed so that if you use a system macro in your code that you don't
get punished for its definition. This is all cool except that the
predefines buffer wasn't considered a system header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
32b325fb33d4bd7a5324c73f338144390362da39 21-Apr-2009 Chris Lattner <sabre@nondot.org> this time with more workingness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
62f86c4555e14456acef6b251fcb13a66c3ce6dd 21-Apr-2009 Chris Lattner <sabre@nondot.org> fix massive testsuite failures from Alexei's patch due to inverted logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp
e116ccf140b813ecd20e3fb4041d7d0b8a967c0b 21-Apr-2009 Chris Lattner <sabre@nondot.org> Split preprocessor initialization logic out of clang-cc into
libfrontend. Patch by Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/InitPreprocessor.cpp