Commit Graph

224 Commits

Author SHA1 Message Date
Eli Friedman 80110179f4 Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.
llvm-svn: 80289
2009-08-27 22:01:41 +00:00
Chris Lattner 3441b4f77e API changes to match llvm ToT.
llvm-svn: 79868
2009-08-23 22:45:33 +00:00
Douglas Gregor 3f4d51bb04 Predefine __cplusplus to the right value (199711L), except when in GNU mode.
llvm-svn: 78283
2009-08-06 04:09:28 +00:00
Ryan Flynn ed73cac647 define __STDC_VERSION__ processor token for c94
llvm-svn: 76514
2009-07-21 00:07:02 +00:00
Eli Friedman 2857ccbaa7 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;

llvm-svn: 74583
2009-07-01 03:36:11 +00:00
Bill Wendling 1835107ed0 Make the StackProtector bitfield use enums instead of obscure numbers.
llvm-svn: 74414
2009-06-28 23:01:01 +00:00
Bill Wendling d63bbadbef 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.

llvm-svn: 74405
2009-06-28 07:36:13 +00:00
Chris Lattner 2fe5b26414 __APPLE_CC__ should only be set when building for darwin targets.
llvm-svn: 73934
2009-06-23 00:43:21 +00:00
Eli Friedman b188455eb2 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.

llvm-svn: 73382
2009-06-15 09:57:52 +00:00
Eli Friedman aa27a87ab3 Misc minor fixes for clang for the Windows target.
llvm-svn: 73050
2009-06-08 06:11:14 +00:00
Eli Friedman 9ffd4a9b96 Move CharIsSigned from TargetInfo to LangOptions.
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman fd4b1559db Move a couple Darwin-specific defines into getDarwinDefines.
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Chris Lattner 5e4702db61 DefineBuiltinMacro is always passed two args, remove the defaulted third
one.  

llvm-svn: 72868
2009-06-04 16:47:09 +00:00
Duncan Sands f4063513d0 Compile fix needed by the solaris system gcc.
llvm-svn: 72772
2009-06-03 14:28:20 +00:00
Eli Friedman 57406b2783 Add IEEE quad support to DefineFloatMacros.
llvm-svn: 72314
2009-05-23 03:50:01 +00:00
Eli Friedman f98fc352b8 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.)

llvm-svn: 72310
2009-05-23 02:03:39 +00:00
Fariborz Jahanian a4404f21d1 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.

llvm-svn: 72275
2009-05-22 20:17:16 +00:00
Eli Friedman 174c310967 Remove unused parameter.
llvm-svn: 71996
2009-05-18 07:39:39 +00:00
Chris Lattner 4579b76ff6 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

llvm-svn: 71860
2009-05-15 16:08:43 +00:00
Daniel Dunbar 66cb01313b 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.

llvm-svn: 69794
2009-04-22 08:53:01 +00:00
Chris Lattner ed462a8d44 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.

llvm-svn: 69770
2009-04-22 03:42:19 +00:00
Chris Lattner 6af6edb8b7 this time with more workingness.
llvm-svn: 69669
2009-04-21 06:06:09 +00:00
Chris Lattner e08c43a3b0 fix massive testsuite failures from Alexei's patch due to inverted logic.
llvm-svn: 69666
2009-04-21 06:00:24 +00:00
Chris Lattner 2f5693f62d Split preprocessor initialization logic out of clang-cc into
libfrontend.  Patch by Alexei Svitkine!

llvm-svn: 69664
2009-04-21 05:40:52 +00:00