]> granicus.if.org Git - clang/log
clang
15 years agoencode the type and decl offsets with 32-bits for entry instead
Chris Lattner [Mon, 27 Apr 2009 18:24:17 +0000 (18:24 +0000)]
encode the type and decl offsets with 32-bits for entry instead
of 64 bits.  This cuts 400KB off the PCH file for cocoa (7.1 ->
6.7MB):

Before:

Record Histogram:
  Count    # Bits   % Abv  Record Kind
      1     14296          SOURCE_LOCATION_PRELOADS
      1   1699598  100.00  SOURCE_LOCATION_OFFSETS
      1   1870766  100.00  METHOD_POOL
      1    212988  100.00  SELECTOR_OFFSETS
      1        88          STATISTICS
      1       106          SPECIAL_TYPES
      1  18033788  100.00  IDENTIFIER_TABLE
      1   1806428  100.00  IDENTIFIER_OFFSET
      1       170  100.00  TARGET_TRIPLE
      1       268          LANGUAGE_OPTIONS
      1   5168252  100.00  DECL_OFFSET
      1    952700  100.00  TYPE_OFFSET

After:

Record Histogram:
  Count    # Bits   % Abv  Record Kind
      1     14296          SOURCE_LOCATION_PRELOADS
      1   1699598  100.00  SOURCE_LOCATION_OFFSETS
      1   1870766  100.00  METHOD_POOL
      1    212988  100.00  SELECTOR_OFFSETS
      1        88          STATISTICS
      1       106          SPECIAL_TYPES
      1  18033788  100.00  IDENTIFIER_TABLE
      1   1806428  100.00  IDENTIFIER_OFFSET
      1       170  100.00  TARGET_TRIPLE
      1       268          LANGUAGE_OPTIONS
      1   2584156  100.00  DECL_OFFSET
      1    476380  100.00  TYPE_OFFSET

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70216 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd an abbreviation for common PARM_VAR_DECL. All but 9 of the
Chris Lattner [Mon, 27 Apr 2009 07:35:58 +0000 (07:35 +0000)]
add an abbreviation for common PARM_VAR_DECL.  All but 9 of the
parm var decls in leopard cocoa.h end up using this abbreviation,
which shrinks the bitcode file by about 50K: 7217736->7167120.

Before:
  Block ID #12 (DECLS_BLOCK):
      Num Instances: 1
         Total Size: 2.23595e+07b/2.79494e+06B/698736W
          % of file: 38.7233
      Num SubBlocks: 0
        Num Abbrevs: 0
        Num Records: 139387
      % Abbrev Recs: 0

After:
  Block ID #12 (DECLS_BLOCK):
      Num Instances: 1
         Total Size: 2.02405e+07b/2.53006e+06B/632516W
          % of file: 35.301
      Num SubBlocks: 0
        Num Abbrevs: 1
        Num Records: 139387
      % Abbrev Recs: 19.2902

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70199 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a couple more places that should be using the DeclCursor instead
Chris Lattner [Mon, 27 Apr 2009 07:35:40 +0000 (07:35 +0000)]
fix a couple more places that should be using the DeclCursor instead
of the normal stream cursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLoad most of the source manager's information lazily from the PCH
Douglas Gregor [Mon, 27 Apr 2009 06:38:32 +0000 (06:38 +0000)]
Load most of the source manager's information lazily from the PCH
file. In particular, only eagerly load source location entries for
files and for the predefines buffer. Other buffers and
macro-instantiation source location entries are loaded lazily.

With the Cocoa-prefixed "Hello, World", we only load 815/26555 source
location entities. This halves the amount of user time we spend in
this "Hello, World" program with -fsyntax-only (down to .007s).

This optimization is part 1 of 2 for the source manager. This
eliminates most of the user time in loading a PCH file. We still spend
too much time initialize File structures (especially in the calls to
stat), so we need to either make the loading of source location
entries for files lazy or import the stat cache from the PTH
implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit expr/stmt writing out to PCHWriterStmt.cpp
Chris Lattner [Mon, 27 Apr 2009 06:20:01 +0000 (06:20 +0000)]
split expr/stmt writing out to PCHWriterStmt.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70194 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit decl writing out to its own PCHWriterDecl.cpp file.
Chris Lattner [Mon, 27 Apr 2009 06:16:06 +0000 (06:16 +0000)]
split decl writing out to its own PCHWriterDecl.cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agounclone SavedStreamPosition
Chris Lattner [Mon, 27 Apr 2009 06:03:19 +0000 (06:03 +0000)]
unclone SavedStreamPosition

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove attribute reading to PCHReaderDecl.cpp, remove some
Chris Lattner [Mon, 27 Apr 2009 06:01:06 +0000 (06:01 +0000)]
move attribute reading to PCHReaderDecl.cpp, remove some
extraneous braces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70191 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoread all decls (and attributes and stmts/exprs referenced by the decl)
Chris Lattner [Mon, 27 Apr 2009 05:58:23 +0000 (05:58 +0000)]
read all decls (and attributes and stmts/exprs referenced by the decl)
from the DeclsCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename GetStmt -> GetDeclStmt to make it clear that the stmt read
Chris Lattner [Mon, 27 Apr 2009 05:46:25 +0000 (05:46 +0000)]
rename GetStmt -> GetDeclStmt to make it clear that the stmt read
is part of a decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agochange the interface to ReadStmt to force clients to pass a cursor in to read from.
Chris Lattner [Mon, 27 Apr 2009 05:41:06 +0000 (05:41 +0000)]
change the interface to ReadStmt to force clients to pass a cursor in to read from.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70188 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit decl reading out to its own PCHReaderDecl.cpp file.
Chris Lattner [Mon, 27 Apr 2009 05:27:42 +0000 (05:27 +0000)]
split decl reading out to its own PCHReaderDecl.cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70187 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit stmt/expr deserialization out to PCHReaderStmt.cpp
Chris Lattner [Mon, 27 Apr 2009 05:14:47 +0000 (05:14 +0000)]
split stmt/expr deserialization out to PCHReaderStmt.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70186 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agordar://6827200 - [sema] reject statically allocated arrays of interface types
Chris Lattner [Mon, 27 Apr 2009 01:55:56 +0000 (01:55 +0000)]
rdar://6827200 - [sema] reject statically allocated arrays of interface types

Upgrade "array of interface" warning to an error.  In addition to being a
terrible idea, this crashes codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange our silencing of C typedef redefinition handling to what we had
Chris Lattner [Mon, 27 Apr 2009 01:46:12 +0000 (01:46 +0000)]
Change our silencing of C typedef redefinition handling to what we had
before r69391: typedef redefinition is an error by default, but if
*either* the old or new definition are from a system header, we silence
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove dead var
Chris Lattner [Mon, 27 Apr 2009 01:08:03 +0000 (01:08 +0000)]
remove dead var

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70174 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet up DeclsCursor.
Chris Lattner [Mon, 27 Apr 2009 01:05:14 +0000 (01:05 +0000)]
Set up DeclsCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70173 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd stmt/expr names to BlockInfo block.
Chris Lattner [Mon, 27 Apr 2009 00:49:53 +0000 (00:49 +0000)]
add stmt/expr names to BlockInfo block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70172 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a comment by starting stmts/exprs after types and decls.
Chris Lattner [Mon, 27 Apr 2009 00:44:11 +0000 (00:44 +0000)]
fix a comment by starting stmts/exprs after types and decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70171 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake -Wtypedef-redefinition an extwarn instead of defaulting
Chris Lattner [Mon, 27 Apr 2009 00:41:01 +0000 (00:41 +0000)]
make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70170 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodrop the _ID suffixes from block names.
Chris Lattner [Mon, 27 Apr 2009 00:40:25 +0000 (00:40 +0000)]
drop the _ID suffixes from block names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70169 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTurn PCH off by default, yet again. I'm happier about it this time, though
Douglas Gregor [Sun, 26 Apr 2009 23:15:05 +0000 (23:15 +0000)]
Turn PCH off by default, yet again. I'm happier about it this time, though

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70168 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd the decl names.
Chris Lattner [Sun, 26 Apr 2009 22:32:16 +0000 (22:32 +0000)]
add the decl names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70167 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake llvm-bcanalyzer dump out PCH files symbolically. We should probably
Chris Lattner [Sun, 26 Apr 2009 22:26:21 +0000 (22:26 +0000)]
make llvm-bcanalyzer dump out PCH files symbolically.  We should probably
eventually get an option to turn this off, but it is nice for looking at
statistics.  For example, the types block now prints:

  Block ID #11 (TYPES_BLOCK_ID):
      Num Instances: 1
         Total Size: 895100b/111888B/27971.9W
          % of file: 1.55801
      Num SubBlocks: 0
        Num Abbrevs: 0
        Num Records: 14899
      % Abbrev Recs: 0

        Code Histogram:
                5478    TYPE_FUNCTION_PROTO
                2683    TYPE_TYPEDEF
                2460    TYPE_POINTER
                2047    TYPE_ENUM
                1553    TYPE_RECORD
                283     TYPE_CONSTANT_ARRAY
                274     TYPE_OBJC_INTERFACE
                76      TYPE_INCOMPLETE_ARRAY
                10      TYPE_VECTOR
                9       TYPE_OBJC_QUALIFIED_ID
                5       TYPE_FUNCTION_NO_PROTO
                5       TYPE_EXT_QUAL
                3       TYPE_TYPEOF_EXPR

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70166 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTrying turning on PCH by default yet again. We might actually a chance at success now
Douglas Gregor [Sun, 26 Apr 2009 22:21:26 +0000 (22:21 +0000)]
Trying turning on PCH by default yet again. We might actually a chance at success now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70164 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome fixes for PCH (de-)serialization of Objective-C AST nodes:
Douglas Gregor [Sun, 26 Apr 2009 22:20:50 +0000 (22:20 +0000)]
Some fixes for PCH (de-)serialization of Objective-C AST nodes:
  - Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
  - Implement PCH support for ImplicitParamDecl
  - Fix the handling of the body of an ObjCMethodDecl
  - Several cast -> cast_or_null fixes
  - Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
  selectors.
  - Make Selector::getAsString() work with NULL selectors.
  - Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
  in the PCH reader and writer; these were never getting called.

At this point, all of the pch-test tests pass for C and Objective-C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70163 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bit more handling for declarations like "int a[*]".
Eli Friedman [Sun, 26 Apr 2009 21:57:51 +0000 (21:57 +0000)]
Add a bit more handling for declarations like "int a[*]".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe mysterious bug turns out to be an incredibly bone-headed mistake.
Sebastian Redl [Sun, 26 Apr 2009 21:08:36 +0000 (21:08 +0000)]
The mysterious bug turns out to be an incredibly bone-headed mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70160 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust to LLVM API changes that went into r70157.
Chris Lattner [Sun, 26 Apr 2009 20:59:20 +0000 (20:59 +0000)]
Adjust to LLVM API changes that went into r70157.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70158 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR4079: make sure to construct the member expressions for
Eli Friedman [Sun, 26 Apr 2009 20:50:44 +0000 (20:50 +0000)]
Fix for PR4079: make sure to construct the member expressions for
offsetof correctly in the presence of anonymous structs/unions.

This could definitely use some cleanup, but I don't really want to mess
with the anonymous union/struct code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70156 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement function-try-blocks. However, there's a very subtle bug that I can't track...
Sebastian Redl [Sun, 26 Apr 2009 20:35:05 +0000 (20:35 +0000)]
Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove getIntegerConstantExprValue in favor of using EvaluateAsInt.
Eli Friedman [Sun, 26 Apr 2009 19:19:15 +0000 (19:19 +0000)]
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor code cleanup.
Eli Friedman [Sun, 26 Apr 2009 19:04:51 +0000 (19:04 +0000)]
Minor code cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70144 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd PCH read/write support for ObjC statements.
Steve Naroff [Sun, 26 Apr 2009 18:52:16 +0000 (18:52 +0000)]
Add PCH read/write support for ObjC statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70143 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement PR4077: [Linux kernel] inscrutable error on inline asm input/output constra...
Chris Lattner [Sun, 26 Apr 2009 18:22:24 +0000 (18:22 +0000)]
implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch
Before we emitted:

$ clang t.c -S -m64
llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type!

Now we produce:
$ clang t.c -S -m64
t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int'
  asm volatile("foo " : "=a" (a) :"0" (b));
                             ~~~      ~^~

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70142 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoin a tied operand, don't copy over the name or constraint string, just the flags.
Chris Lattner [Sun, 26 Apr 2009 18:05:25 +0000 (18:05 +0000)]
in a tied operand, don't copy over the name or constraint string, just the flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopull operands names "[foo]" into ConstraintInfo.
Chris Lattner [Sun, 26 Apr 2009 17:57:12 +0000 (17:57 +0000)]
pull operands names "[foo]" into ConstraintInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopull the constraint string into the ConstraintInfo struct
Chris Lattner [Sun, 26 Apr 2009 17:19:08 +0000 (17:19 +0000)]
pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake sure we have a code in the node:-)
Steve Naroff [Sun, 26 Apr 2009 14:11:39 +0000 (14:11 +0000)]
Make sure we have a code in the node:-)

This fixes all the -emit-pch problems discovered by utils/pch-test.pl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70125 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate StmtNodes.def with the new base class of CXXTemporaryObjectExpr
Sebastian Redl [Sun, 26 Apr 2009 11:30:47 +0000 (11:30 +0000)]
Update StmtNodes.def with the new base class of CXXTemporaryObjectExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70122 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake reference class unification in conditional expressions check for validity of...
Sebastian Redl [Sun, 26 Apr 2009 11:21:02 +0000 (11:21 +0000)]
Make reference class unification in conditional expressions check for validity of the conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70121 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing include. This fixes the build with gcc 4.3.3.
Torok Edwin [Sun, 26 Apr 2009 07:50:14 +0000 (07:50 +0000)]
Add missing include. This fixes the build with gcc 4.3.3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70115 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agochange TargetInfo::ConstraintInfo to be a struct that contains
Chris Lattner [Sun, 26 Apr 2009 07:16:29 +0000 (07:16 +0000)]
change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTurn off PCH by default, again
Douglas Gregor [Sun, 26 Apr 2009 05:09:50 +0000 (05:09 +0000)]
Turn off PCH by default, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70113 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOne more crazy try with PCH-by-default
Douglas Gregor [Sun, 26 Apr 2009 03:59:49 +0000 (03:59 +0000)]
One more crazy try with PCH-by-default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70112 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake sure to pull in the target builtin records when initialize the AST context,...
Douglas Gregor [Sun, 26 Apr 2009 03:57:37 +0000 (03:57 +0000)]
Make sure to pull in the target builtin records when initialize the AST context, even if we're not going to initialize the __builin_* identifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70111 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimple little smoke-test script that tries to build PCH files and then
Douglas Gregor [Sun, 26 Apr 2009 03:52:11 +0000 (03:52 +0000)]
Simple little smoke-test script that tries to build PCH files and then
dump their contents for all of the compilable tests in Clang's
testsuite. All of the tests pass for C, but there are still many
failures for Objective-C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70110 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen writing a PCH file, write multiple type and declaration blocks as
Douglas Gregor [Sun, 26 Apr 2009 03:49:13 +0000 (03:49 +0000)]
When writing a PCH file, write multiple type and declaration blocks as
necessary and iterate until all types and declarations have been
written. This reduces the Cocoa.h PCH file size by about 4% (since we
don't write types we don't need), and fixes problems where writing a
declaration generates a new type.

This doesn't seem to have any impact on performance either way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70109 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new -ast-dump-full option that traverses the translation unit
Douglas Gregor [Sun, 26 Apr 2009 02:02:08 +0000 (02:02 +0000)]
Add a new -ast-dump-full option that traverses the translation unit
declaration rather than printing through the HandleTopLevelDecl
action. Using this, one can deserialize an entire PCH file and dump
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70108 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSplit C++ statements out to their own file.
Chris Lattner [Sun, 26 Apr 2009 01:42:41 +0000 (01:42 +0000)]
Split C++ statements out to their own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70107 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTurn of PCH by default. I got the info I was looking for
Douglas Gregor [Sun, 26 Apr 2009 01:34:47 +0000 (01:34 +0000)]
Turn of PCH by default. I got the info I was looking for

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70106 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit ObjC and C++ Statements out into their own headers.
Chris Lattner [Sun, 26 Apr 2009 01:32:48 +0000 (01:32 +0000)]
split ObjC and C++ Statements out into their own headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect the order of the parameters to CheckAssignmentConstraints in
Eli Friedman [Sun, 26 Apr 2009 01:30:08 +0000 (01:30 +0000)]
Correct the order of the parameters to CheckAssignmentConstraints in
cleanup attribute checking.  The difference isn't normally visible, but it
can make a difference...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70104 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake this code a little more generic.
Daniel Dunbar [Sun, 26 Apr 2009 01:28:51 +0000 (01:28 +0000)]
Make this code a little more generic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70103 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add -std-default= option.
Daniel Dunbar [Sun, 26 Apr 2009 01:10:38 +0000 (01:10 +0000)]
Driver: Add -std-default= option.
 - This can be used to supply a default value for -std=; the idea is
   that this can be used in conjunction with CCC_ADD_ARGS or
   QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
   modify the build system.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70102 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd option for AddAllArgsTranslated to control whether output argument
Daniel Dunbar [Sun, 26 Apr 2009 01:07:52 +0000 (01:07 +0000)]
Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement PCH support for the rest of ExprObjC.h, including
Chris Lattner [Sun, 26 Apr 2009 00:44:05 +0000 (00:44 +0000)]
implement PCH support for the rest of ExprObjC.h, including
the missing bits of ObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70100 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAnother shot at switching PCH on by default, now that we've cleaned up some bugs...
Douglas Gregor [Sun, 26 Apr 2009 00:37:38 +0000 (00:37 +0000)]
Another shot at switching PCH on by default, now that we've cleaned up some bugs and improved performance. Will be reverted after Mr. Speedy gets done with it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70099 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen calling the cleanup function specified by __attribute__((cleanup)), make sure...
Anders Carlsson [Sun, 26 Apr 2009 00:34:20 +0000 (00:34 +0000)]
When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70098 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't read all of the records in the PCH file's preprocessor block,
Douglas Gregor [Sun, 26 Apr 2009 00:07:37 +0000 (00:07 +0000)]
Don't read all of the records in the PCH file's preprocessor block,
most of which are ignored. Instead, move the __COUNTER__ value out to
a PCH-level record (since it is handled eagerly) and move the header
file information into the SourceManager block (which is also,
currently, loaded eagerly).

This results in another 17% performance improvement in the
Cocoa-prefixed "Hello, World" with PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70097 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR4074: allow subscripting non-lvalue arrays in C90 mode.
Eli Friedman [Sat, 25 Apr 2009 23:46:54 +0000 (23:46 +0000)]
Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.

I wasn't originally going to use this approach, but cases like
test/Sema/expr-comma.c make things difficult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70096 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agominor cleanups to ast-dump, use getBody(context).
Chris Lattner [Sat, 25 Apr 2009 23:31:28 +0000 (23:31 +0000)]
minor cleanups to ast-dump, use getBody(context).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70095 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLazily load the controlling macros for all of the headers known in the
Douglas Gregor [Sat, 25 Apr 2009 23:30:02 +0000 (23:30 +0000)]
Lazily load the controlling macros for all of the headers known in the
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70094 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago"This fixes message sends to super in a way that both works with real code and passes...
Chris Lattner [Sat, 25 Apr 2009 23:19:45 +0000 (23:19 +0000)]
"This fixes message sends to super in a way that both works with real code and passes the test in the test suite.  It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)."

Patch by David Chisnall!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70093 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agominor diagnostics improvements.
Chris Lattner [Sat, 25 Apr 2009 22:50:55 +0000 (22:50 +0000)]
minor diagnostics improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70092 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor simplification.
Eli Friedman [Sat, 25 Apr 2009 22:44:54 +0000 (22:44 +0000)]
Minor simplification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70091 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange isNullPointerConstant to be strict; hopefully this won't cause
Eli Friedman [Sat, 25 Apr 2009 22:37:12 +0000 (22:37 +0000)]
Change isNullPointerConstant to be strict; hopefully this won't cause
any issues now that we have our own tgmath.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70090 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake VerifyIntegerConstantExpr print extension warnings for non-ICEs.
Eli Friedman [Sat, 25 Apr 2009 22:26:58 +0000 (22:26 +0000)]
Make VerifyIntegerConstantExpr print extension warnings for non-ICEs.

Overall, I'm not particularly happy with the current situation regarding
constant expression diagnostics, but I plan to improve it at some point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70089 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSilence gcc warnings.
Eli Friedman [Sat, 25 Apr 2009 22:20:56 +0000 (22:20 +0000)]
Silence gcc warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70086 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR4073 by making designated initializer checking code use
Chris Lattner [Sat, 25 Apr 2009 21:59:05 +0000 (21:59 +0000)]
fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOptimize the loading of an identifier from a PCH file when given the
Douglas Gregor [Sat, 25 Apr 2009 21:21:38 +0000 (21:21 +0000)]
Optimize the loading of an identifier from a PCH file when given the
identifier's ID. In this case, we know where the identifier's entry is
located in the hash table (it starts right before the identifier
string itself), so skip the hash table lookup and read the entry
directly. The performance improvement here is, gain, hard to quantify,
but it's the right thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70078 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH optimization for the identifier table, where we separate
Douglas Gregor [Sat, 25 Apr 2009 21:04:17 +0000 (21:04 +0000)]
PCH optimization for the identifier table, where we separate
"interesting" identifiers (e.g., those where the IdentifierInfo has
some useful information) from "uninteresting" identifiers (where the
IdentifierInfo is just a name). This makes the hash table smaller (so
searching in it should be faster) and, when loading "uninteresting"
identifiers, we skip the lookup in the hash table.

PCH file size is slightly smaller than before (since we don't emit the
contents of the uninteresting IdentifierInfo structures). The
Cocoa.h-prefixed "Hello, World" doesn't show any speedup, although
we're getting to the point where system noise is a bit issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70075 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert my changes that try to avoid creating StringMap entries for
Douglas Gregor [Sat, 25 Apr 2009 20:26:24 +0000 (20:26 +0000)]
Revert my changes that try to avoid creating StringMap entries for
identifiers. They don't yet work, but will inhibit future
optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70071 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart implementing the PTH IdentifierInfo-saving trick in PCH,
Douglas Gregor [Sat, 25 Apr 2009 20:21:25 +0000 (20:21 +0000)]
Start implementing the PTH IdentifierInfo-saving trick in PCH,
allocating IdentifierInfos with a pointer into the string data stored
in the PCH file rather than having an entry in the identifier table's
string map. However, we don't actually get these savings at the
moment, because we go through the IdentifierTable when loading
identifiers from the on-disk hash table.

This commit is for record-keeping purposes only. I'll be reverting
this change (and the PCH layout tweak that preceded it) because it
appears that implementing this optimization will collide with another,
future optimization to reduce the size of the on-disk hash table for
identifiers. That optimization is likely to provide more benefit (with
less voodoo).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70070 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue
Chris Lattner [Sat, 25 Apr 2009 19:35:26 +0000 (19:35 +0000)]
fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70067 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTweak the data layout for the on-disk hash table of identifiers in the PCH file so...
Douglas Gregor [Sat, 25 Apr 2009 19:25:49 +0000 (19:25 +0000)]
Tweak the data layout for the on-disk hash table of identifiers in the PCH file so that the key layout matches that of the PTH key layout

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70066 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated checker build.
Ted Kremenek [Sat, 25 Apr 2009 19:12:36 +0000 (19:12 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70065 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a fixme that is already done.
Chris Lattner [Sat, 25 Apr 2009 19:11:05 +0000 (19:11 +0000)]
remove a fixme that is already done.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70064 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWrite the identifier offsets array into the PCH file as a blob, so
Douglas Gregor [Sat, 25 Apr 2009 19:10:14 +0000 (19:10 +0000)]
Write the identifier offsets array into the PCH file as a blob, so
that the PCH reader does not have to decode the VBR encoding at PCH
load time.

Also, reduce the size of the identifier offsets from 64 bits down to
32 bits. The identifier table itself isn't going to grow to more than
4GB :)

Overall, this results in a 13% speedup in the Cocoa-prefixed "Hello,
World" benchmark.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70063 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimprove a diagnostic to make more sense.
Chris Lattner [Sat, 25 Apr 2009 18:52:45 +0000 (18:52 +0000)]
improve a diagnostic to make more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70062 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoaccept an ignore the no_instrument_function attribute. Since we don't
Chris Lattner [Sat, 25 Apr 2009 18:44:54 +0000 (18:44 +0000)]
accept an ignore the no_instrument_function attribute.  Since we don't
support -pg, we never instrument :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowith the fixes for better invalid decl/type propagation, this code
Chris Lattner [Sat, 25 Apr 2009 18:38:18 +0000 (18:38 +0000)]
with the fixes for better invalid decl/type propagation, this code
is no longer needed: a function type and a function declarator are
always known to line up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70060 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWrite the declaration and type offset arrays into the bitstream as
Douglas Gregor [Sat, 25 Apr 2009 18:35:21 +0000 (18:35 +0000)]
Write the declaration and type offset arrays into the bitstream as
blobs, so that we don't need to do any work to get these arrays into
memory at PCH load time.

This gives another 19% performance improvement to the Cocoa-prefixed
"Hello, World!".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70059 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLoad the selector table lazily from the PCH file.
Douglas Gregor [Sat, 25 Apr 2009 17:48:32 +0000 (17:48 +0000)]
Load the selector table lazily from the PCH file.

This results in a 10% speedup on the Cocoa-prefixed "Hello, World!",
all of which is (not surprisingly) user time. There was a tiny
reduction in the size of the PCH file for Cocoa.h, because certain
selectors aren't being written twice.

I'm using two new tricks here that I'd like to replicate elsewhere:
  (1) The selectors not used in the global method pool are packed into
  the blob after the global method pool's on-disk hash table and
  stored as keys, so that all selectors are in the same blob.
  (2) We record the offsets of each selector key when we write it into
  the global method pool (or after it, in the same blob). The offset
  table is written as a blob, so that we don't need to pack/unpack a
  SmallVector with its contents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70055 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indexing error in PCHStmtReader::VisitArraySubscriptExpr().
Steve Naroff [Sat, 25 Apr 2009 15:19:54 +0000 (15:19 +0000)]
Fix indexing error in PCHStmtReader::VisitArraySubscriptExpr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70046 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd PCH support for ObjCMessageExpr (needed to build Mail).
Steve Naroff [Sat, 25 Apr 2009 14:04:28 +0000 (14:04 +0000)]
Add PCH support for ObjCMessageExpr (needed to build Mail).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70044 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixup comment.
Steve Naroff [Sat, 25 Apr 2009 12:18:35 +0000 (12:18 +0000)]
Fixup comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70040 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a major bug in PCHReader::ReadSelectorBlock().
Steve Naroff [Sat, 25 Apr 2009 12:07:12 +0000 (12:07 +0000)]
Fix a major bug in PCHReader::ReadSelectorBlock().

Also simplify some syntax in PCHWriter::WritePreprocessor(), suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70039 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to
Chris Lattner [Sat, 25 Apr 2009 08:47:54 +0000 (08:47 +0000)]
Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to
always return a non-null QualType + error bit.  This fixes a bunch of
cases that didn't check for null result (and could thus crash) and eliminates
some crappy code scattered throughout sema.

This also improves the diagnostics in the recursive struct case to eliminate
a bogus second error.  It also cleans up the case added to function.c by forming
a proper function type even though the declarator is erroneous, allowing the
parameter to be added to the function.  Before:

t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^
t.c:4:3: error: use of undeclared identifier 'P'
  P+1;
  ^

After:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agochange a couple more c++ sema methods to be based on isinvalid bits.
Chris Lattner [Sat, 25 Apr 2009 08:35:12 +0000 (08:35 +0000)]
change a couple more c++ sema methods to be based on isinvalid bits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70022 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agovarious "is invalid" cleanups for C++ ctors/dtors.
Chris Lattner [Sat, 25 Apr 2009 08:28:21 +0000 (08:28 +0000)]
various "is invalid" cleanups for C++ ctors/dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70021 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis is a pretty big cleanup for how invalid decl/type are handle.
Chris Lattner [Sat, 25 Apr 2009 08:06:05 +0000 (08:06 +0000)]
This is a pretty big cleanup for how invalid decl/type are handle.
This gets rid of a bunch of random InvalidDecl bools in sema, changing
us to use the following approach:

1. When analyzing a declspec or declarator, if an error is found, we
   set a bit in Declarator saying that it is invalid.
2. Once the Decl is created by sema, we immediately set the isInvalid
   bit on it from what is in the declarator.  From this point on, sema
   consistently looks at and sets the bit on the decl.

This gives a very clear separation of concerns and simplifies a bunch
of code.  In addition to this, this patch makes these changes:

1. it renames DeclSpec::getInvalidType() -> isInvalidType().
2. various "merge" functions no longer return bools: they just set the
   invalid bit on the dest decl if invalid.
3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator
   methods now set invalid on the decl returned instead of returning an
   invalid bit byref.
4. In SemaType, refering to a typedef that was invalid now propagates the
   bit into the resultant type.  Stuff declared with the invalid typedef
   will now be marked invalid.
5. Various methods like CheckVariableDeclaration now return void and set the
   invalid bit on the decl they check.

There are a few minor changes to tests with this, but the only major bad
result is test/SemaCXX/constructor-recovery.cpp.  I'll take a look at this
next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert my PCH change. I'm happy now
Douglas Gregor [Sat, 25 Apr 2009 07:18:06 +0000 (07:18 +0000)]
Revert my PCH change. I'm happy now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70018 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily try to build with PCH by default. Revert this change once
Douglas Gregor [Sat, 25 Apr 2009 06:28:32 +0000 (06:28 +0000)]
Temporarily try to build with PCH by default. Revert this change once
we see what trouble it causes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70017 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR4049, a crash on invalid, by making sema install the right number of
Chris Lattner [Sat, 25 Apr 2009 06:12:16 +0000 (06:12 +0000)]
fix PR4049, a crash on invalid, by making sema install the right number of
parameters in a functiondecl, even if the decl is invalid and has a confusing
Declarator.  On the testcase, we now emit one beautiful diagnostic:

t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*)
^

GCC 4.0 produces:

t.c:2: error: syntax error before ‘f’
t.c: In function ‘f’:
t.c:2: error: parameter name omitted

and GCC 4.2:

t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70016 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename getNumParmVarDeclsFromType back to getNumParams(),
Chris Lattner [Sat, 25 Apr 2009 06:03:53 +0000 (06:03 +0000)]
rename getNumParmVarDeclsFromType back to getNumParams(),
remove a special case that was apparently for typeof() and
generalize the code in SemaDecl that handles typedefs to
handle any sugar type (including typedef, typeof, etc).
Improve comment to make it more clear what is going on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a new helper function to FunctionDecl instead of it being
Chris Lattner [Sat, 25 Apr 2009 05:56:45 +0000 (05:56 +0000)]
add a new helper function to FunctionDecl instead of it being
static in Decl.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70014 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoin:
Chris Lattner [Sat, 25 Apr 2009 05:51:56 +0000 (05:51 +0000)]
in:
typedef void foo(void);

We get a typedef for a functiontypeproto with no arguments, not
one with one argument and type void.  This means the code being
removed in SemaDecl is dead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70013 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: -mkernel disables default use of unwind tables (although I
Daniel Dunbar [Sat, 25 Apr 2009 05:49:54 +0000 (05:49 +0000)]
Driver: -mkernel disables default use of unwind tables (although I
don't yet understand where this is happening in llvm-gcc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70012 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoset NewFD->setInvalidDecl() in one place, sharing code and ensuring that
Chris Lattner [Sat, 25 Apr 2009 05:44:12 +0000 (05:44 +0000)]
set NewFD->setInvalidDecl() in one place, sharing code and ensuring that
functions with prototypes get the bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70011 91177308-0d34-0410-b5e6-96231b3b80d8