summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Adjust to LLVM API changes that went into r70157.Chris Lattner2009-04-262-8/+10
| | | | llvm-svn: 70158
* Fix for PR4079: make sure to construct the member expressions for Eli Friedman2009-04-262-4/+12
| | | | | | | | | 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. llvm-svn: 70156
* Implement function-try-blocks. However, there's a very subtle bug that I ↵Sebastian Redl2009-04-2620-62/+180
| | | | | | can't track down. llvm-svn: 70155
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-269-33/+14
| | | | llvm-svn: 70145
* Minor code cleanup.Eli Friedman2009-04-261-16/+4
| | | | llvm-svn: 70144
* Add PCH read/write support for ObjC statements.Steve Naroff2009-04-264-5/+192
| | | | llvm-svn: 70143
* implement PR4077: [Linux kernel] inscrutable error on inline asm ↵Chris Lattner2009-04-263-0/+27
| | | | | | | | | | | | | | | | | 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)); ~~~ ~^~ llvm-svn: 70142
* in a tied operand, don't copy over the name or constraint string, just the ↵Chris Lattner2009-04-263-4/+10
| | | | | | flags. llvm-svn: 70137
* pull operands names "[foo]" into ConstraintInfo.Chris Lattner2009-04-264-44/+35
| | | | llvm-svn: 70136
* pull the constraint string into the ConstraintInfo structChris Lattner2009-04-265-34/+33
| | | | | | instead of passing it around in addition to it. llvm-svn: 70135
* Make sure we have a code in the node:-)Steve Naroff2009-04-261-0/+4
| | | | | | This fixes all the -emit-pch problems discovered by utils/pch-test.pl. llvm-svn: 70125
* Update StmtNodes.def with the new base class of CXXTemporaryObjectExprSebastian Redl2009-04-261-1/+1
| | | | llvm-svn: 70122
* Make reference class unification in conditional expressions check for ↵Sebastian Redl2009-04-262-11/+11
| | | | | | validity of the conversion. llvm-svn: 70121
* Add missing include. This fixes the build with gcc 4.3.3.Torok Edwin2009-04-261-0/+1
| | | | llvm-svn: 70115
* change TargetInfo::ConstraintInfo to be a struct that containsChris Lattner2009-04-265-49/+60
| | | | | | the enum along with some other data. llvm-svn: 70114
* Turn off PCH by default, againDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70113
* One more crazy try with PCH-by-defaultDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70112
* Make sure to pull in the target builtin records when initialize the AST ↵Douglas Gregor2009-04-261-1/+1
| | | | | | context, even if we're not going to initialize the __builin_* identifiers llvm-svn: 70111
* Simple little smoke-test script that tries to build PCH files and thenDouglas Gregor2009-04-261-0/+49
| | | | | | | | 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. llvm-svn: 70110
* When writing a PCH file, write multiple type and declaration blocks asDouglas Gregor2009-04-263-12/+26
| | | | | | | | | | | 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. llvm-svn: 70109
* Add a new -ast-dump-full option that traverses the translation unitDouglas Gregor2009-04-263-4/+29
| | | | | | | | declaration rather than printing through the HandleTopLevelDecl action. Using this, one can deserialize an entire PCH file and dump it. llvm-svn: 70108
* Split C++ statements out to their own file.Chris Lattner2009-04-261-0/+95
| | | | llvm-svn: 70107
* Turn of PCH by default. I got the info I was looking forDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70106
* split ObjC and C++ Statements out into their own headers.Chris Lattner2009-04-2615-318/+290
| | | | llvm-svn: 70105
* Correct the order of the parameters to CheckAssignmentConstraints in Eli Friedman2009-04-262-1/+8
| | | | | | | cleanup attribute checking. The difference isn't normally visible, but it can make a difference... llvm-svn: 70104
* Make this code a little more generic.Daniel Dunbar2009-04-261-20/+19
| | | | llvm-svn: 70103
* Driver: Add -std-default= option.Daniel Dunbar2009-04-262-1/+19
| | | | | | | | | - 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. llvm-svn: 70102
* Add option for AddAllArgsTranslated to control whether output argumentDaniel Dunbar2009-04-262-7/+19
| | | | | | should be joined or separate. llvm-svn: 70101
* implement PCH support for the rest of ExprObjC.h, includingChris Lattner2009-04-266-46/+180
| | | | | | the missing bits of ObjCMessageExpr. llvm-svn: 70100
* Another shot at switching PCH on by default, now that we've cleaned up some ↵Douglas Gregor2009-04-261-1/+1
| | | | | | bugs and improved performance. Will be reverted after Mr. Speedy gets done with it llvm-svn: 70099
* When calling the cleanup function specified by __attribute__((cleanup)), ↵Anders Carlsson2009-04-262-2/+21
| | | | | | make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>. llvm-svn: 70098
* Don't read all of the records in the PCH file's preprocessor block,Douglas Gregor2009-04-265-125/+59
| | | | | | | | | | | | 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. llvm-svn: 70097
* Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.Eli Friedman2009-04-253-2/+37
| | | | | | | I wasn't originally going to use this approach, but cases like test/Sema/expr-comma.c make things difficult. llvm-svn: 70096
* minor cleanups to ast-dump, use getBody(context).Chris Lattner2009-04-251-8/+8
| | | | llvm-svn: 70095
* Lazily load the controlling macros for all of the headers known in theDouglas Gregor2009-04-256-13/+77
| | | | | | | | 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. llvm-svn: 70094
* "This fixes message sends to super in a way that both works with real code ↵Chris Lattner2009-04-251-20/+28
| | | | | | | | 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! llvm-svn: 70093
* minor diagnostics improvements.Chris Lattner2009-04-252-7/+8
| | | | llvm-svn: 70092
* Minor simplification.Eli Friedman2009-04-251-7/+2
| | | | llvm-svn: 70091
* Change isNullPointerConstant to be strict; hopefully this won't cause Eli Friedman2009-04-252-7/+3
| | | | | | any issues now that we have our own tgmath.h. llvm-svn: 70090
* Make VerifyIntegerConstantExpr print extension warnings for non-ICEs.Eli Friedman2009-04-252-8/+13
| | | | | | | Overall, I'm not particularly happy with the current situation regarding constant expression diagnostics, but I plan to improve it at some point. llvm-svn: 70089
* Silence gcc warnings.Eli Friedman2009-04-253-5/+5
| | | | llvm-svn: 70086
* fix PR4073 by making designated initializer checking code useChris Lattner2009-04-254-32/+28
| | | | | | | | | | | | | | 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. llvm-svn: 70081
* Optimize the loading of an identifier from a PCH file when given theDouglas Gregor2009-04-251-17/+35
| | | | | | | | | | 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. llvm-svn: 70078
* PCH optimization for the identifier table, where we separateDouglas Gregor2009-04-252-5/+62
| | | | | | | | | | | | | | | "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. llvm-svn: 70075
* Revert my changes that try to avoid creating StringMap entries forDouglas Gregor2009-04-254-33/+32
| | | | | | | identifiers. They don't yet work, but will inhibit future optimizations. llvm-svn: 70071
* Start implementing the PTH IdentifierInfo-saving trick in PCH,Douglas Gregor2009-04-253-30/+25
| | | | | | | | | | | | | | | | | 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). llvm-svn: 70070
* fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue Chris Lattner2009-04-254-5/+22
| | | | llvm-svn: 70067
* Tweak the data layout for the on-disk hash table of identifiers in the PCH ↵Douglas Gregor2009-04-252-2/+8
| | | | | | file so that the key layout matches that of the PTH key layout llvm-svn: 70066
* Updated checker build.Ted Kremenek2009-04-251-1/+1
| | | | llvm-svn: 70065
* remove a fixme that is already done.Chris Lattner2009-04-251-5/+1
| | | | llvm-svn: 70064
OpenPOWER on IntegriCloud