summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Clean up and de-XFAIL-ify PCH test for external definitionsDouglas Gregor2009-04-222-8/+0
| | | | llvm-svn: 69831
* remove obsolete tests.Chris Lattner2009-04-222-10/+0
| | | | llvm-svn: 69830
* Support tentative definitions in precompiled headers. This isn't likelyDouglas Gregor2009-04-226-4/+57
| | | | | | to happen (ever), but at least we'll do the right thing when it does. llvm-svn: 69829
* Remove the serialization code that predates precompiledDouglas Gregor2009-04-2235-4595/+8
| | | | | | | headers. Future approaches to (de-)serializing ASTs will be based on the PCH infrastructure. llvm-svn: 69828
* Eliminate some FIXMEs in the PCH reader that were either already fixed or ↵Douglas Gregor2009-04-222-18/+12
| | | | | | aren't actually things to fix llvm-svn: 69827
* Eliminate Sema::KnownFunctionIDs, so that Sema doesn't end up pullingDouglas Gregor2009-04-223-42/+2
| | | | | | | | | | | | | | in a bunch of declarations from the PCH file. We're down to loading very few declarations in Carbon-prefixed "Hello, World!": *** PCH Statistics: 6/20693 types read (0.028995%) 7/59230 declarations read (0.011818%) 50/44914 identifiers read (0.111324%) 0/32954 statements read (0.000000%) 5/6187 macros read (0.080815%) llvm-svn: 69825
* BugReporter (extensive diagnostics): Use correct location for location contexts.Ted Kremenek2009-04-221-1/+1
| | | | llvm-svn: 69824
* BugReporter (extensive diagnostics): always add an edge if there is no locationTed Kremenek2009-04-221-1/+8
| | | | | | context. llvm-svn: 69823
* Add handling for complex->int, int->complex float, and float->complex Eli Friedman2009-04-222-14/+40
| | | | | | | int. Note that constant int->complex float and float->complex int casts were being miscompiled. llvm-svn: 69821
* Minimize the number and kind of "external definitions" that the PCHDouglas Gregor2009-04-223-20/+26
| | | | | | | | | | | | | | | | | | | | | | | file needs to store. CodeGen needs to see these definitions (via HandleTopLevelDecl), otherwise it won't be able to generate code for them. This patch notifies the consumer (e.g., CodeGen) about function definitions and variable definitions when the corresponding declarations are deserialized. Hence, we don't eagerly deserialize the declarations for every variable or function that has a definition in the PCH file. This gives another 5% speedup for the Carbon-prefixed "Hello, World!", and brings our PCH statistics down to something far more reasonable: *** PCH Statistics: 13/20693 types read (0.062823%) 17/59230 declarations read (0.028702%) 54/44914 identifiers read (0.120230%) 0/32954 statements read (0.000000%) 5/6187 macros read (0.080815%) llvm-svn: 69820
* Add missing dependency, patch by Jason Haslam!Chris Lattner2009-04-221-0/+1
| | | | llvm-svn: 69819
* Lazy loading of builtins for precompiled headers.Douglas Gregor2009-04-228-16/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCH files now contain complete information about builtins, including any declarations that have been synthesized as part of building the PCH file. When using a PCH file, we do not initialize builtins at all; when needed, they'll be found in the PCH file. This optimization translations into a 9% speedup for "Hello, World!" with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc with its prefix header. We're also reading less of the PCH file for "Hello, World!": *** PCH Statistics: 286/20693 types read (1.382110%) 1630/59230 declarations read (2.751984%) 764/44914 identifiers read (1.701029%) 1/32954 statements read (0.003035%) 5/6187 macros read (0.080815%) down from *** PCH Statistics: 411/20693 types read (1.986179%) 2553/59230 declarations read (4.310316%) 1093/44646 identifiers read (2.448148%) 1/32954 statements read (0.003035%) 21/6187 macros read (0.339421%) llvm-svn: 69815
* BugReporter (extensive diagnostics):Ted Kremenek2009-04-221-3/+2
| | | | | | | | - Remove stale assertion that was breaking the test suite. - When popping location contexts, only add a control-flow piece for fileID locations. llvm-svn: 69814
* BugReporter (extensive diagnostic algorithm): The initial control-flow edge nowTed Kremenek2009-04-221-2/+16
| | | | | | starts from the first character of the first statement. llvm-svn: 69813
* PathDiagnosticLocation: ranges for terminators now only include the firstTed Kremenek2009-04-221-1/+22
| | | | | | | | character instead of the entire range for the IfStmt, ForStmt, etc. We may gradually refine these ranges later, but basically terminator ranges just refer to the first keyword. llvm-svn: 69812
* Reapply r69771, with updates & fixes:Daniel Dunbar2009-04-223-19/+105
| | | | | | | | | | | | | | | | | | | | | | Rework the shadow struct that is layed out for Objective-C classes. - Superclasses are now always laid out in their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields were incorrect (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal (for example, ivar are looked up recursively, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards llvm-svn: 69811
* Remove some debugging output from the PCH readerDouglas Gregor2009-04-221-3/+0
| | | | llvm-svn: 69803
* ccc-analyzer: Don't create preprocessed files about the ignored 'cdecl' ↵Ted Kremenek2009-04-221-0/+5
| | | | | | attribute. We know Clang doesn't support it yet. llvm-svn: 69802
* Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.Daniel Dunbar2009-04-223-20/+18
| | | | | | - This is only used by CGObjCRuntime now. llvm-svn: 69800
* Simplify addRecordToClass, it is not legal to call it on a forwardDaniel Dunbar2009-04-221-15/+6
| | | | | | declaration now. llvm-svn: 69799
* Don't convert interface types (to structs) as part of CodeGenTypes.Daniel Dunbar2009-04-224-43/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - This has pros and cons, but for now the pros seem to significantly outway the con. The con is that we will always need to cast in the runtime implementation to a struct type, if we wish to access an interface directly. The pros are: - Avoid the cost of generating types which are used. Most manipulation of Objective-C objects is done through messages, and only the implementation of a class will directly access memory. Previously, we would convert the type even if it only appear as a function parameter, for example. - We don't need to worry about incomplete types, and UpdateCompletedType for interfaces is gone. - It becomes easier to narrow the interface to the shadow struct for Objective-C interfaces (so it can be eliminated). Currently the runtimes still use the CodeGenTypes machinery to generate the LLVM structure they need via ConvertTagDecl, but this can eventually be replaced. llvm-svn: 69797
* Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to theDaniel Dunbar2009-04-223-38/+24
| | | | | | underlying llvm::StructType for an interface. llvm-svn: 69796
* Add another workaround for -include.Daniel Dunbar2009-04-221-3/+9
| | | | | | | | | | | | - 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
* Simplify.Daniel Dunbar2009-04-221-23/+11
| | | | llvm-svn: 69793
* Emit meta data using the Ivar, not a looked up FieldDecl.Daniel Dunbar2009-04-221-8/+6
| | | | llvm-svn: 69790
* Use ComputeIvarBaseOffset instead of looking up by hand.Daniel Dunbar2009-04-221-7/+2
| | | | llvm-svn: 69789
* Merge ivar access amongst the three runtimes.Daniel Dunbar2009-04-223-147/+124
| | | | | | | | | - For now, this means we are always doing the address computations by hand instead of constructing a proper GEP. Right now, however, this is less important than having fewer entry points to dealing with Objective-C interface layout. llvm-svn: 69787
* Make sure this test runs on all 3 Objective-C implementations.Daniel Dunbar2009-04-221-1/+3
| | | | llvm-svn: 69786
* implement debug info support for id<proto> and interface<proto>Chris Lattner2009-04-221-9/+9
| | | | llvm-svn: 69784
* ObjCQualifiedClass is dead, remove it.Chris Lattner2009-04-2210-78/+2
| | | | llvm-svn: 69783
* deserialization support for qualified interfacesChris Lattner2009-04-223-5/+14
| | | | llvm-svn: 69782
* pch support for protocol qualified id's.Chris Lattner2009-04-226-14/+22
| | | | llvm-svn: 69781
* add three new objc expression types. @selector doesn't work because we have no Chris Lattner2009-04-226-17/+119
| | | | | | way to serialize selectors yet. llvm-svn: 69780
* implement serialization support for @encode,Chris Lattner2009-04-226-8/+67
| | | | | | | fix a couple of bugs in reader support for ObjCInterfaceDecl, and add support for reading ObjCInterfaceType. llvm-svn: 69779
* rename methods.* -> objc_methods.*Chris Lattner2009-04-222-2/+2
| | | | llvm-svn: 69778
* change implicit int warnings to point to the identifier, not the Chris Lattner2009-04-224-21/+36
| | | | | | | | | | | | start of the declspec. The fixit still goes there, and we underline the declspec. This helps when the start of the declspec came from a macro that expanded from a system header. For example, we now produce: t.c:2:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static x; ~~~~~~ ^ llvm-svn: 69777
* Update checker build.Ted Kremenek2009-04-221-1/+1
| | | | llvm-svn: 69776
* Make ObjCInterfaceDecl's const in some more places.Daniel Dunbar2009-04-225-11/+10
| | | | llvm-svn: 69775
* Reorganize built-in initialization to separate the creation of target ↵Douglas Gregor2009-04-224-9/+17
| | | | | | builtins from marking IdentifierInfos as builtins. No functionality change llvm-svn: 69774
* Revert r69771, I missed some (obvious) details. :/Daniel Dunbar2009-04-224-128/+64
| | | | llvm-svn: 69773
* Mark another TypeForDecl const and make getObjCInterfaceType's argument const.Daniel Dunbar2009-04-226-10/+9
| | | | llvm-svn: 69772
* Rework the shadow struct that is layed out for Objective-C classes.Daniel Dunbar2009-04-224-64/+128
| | | | | | | | | | | | | | | | | | | - Superclasses are now always laid out their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields weren't packed correctly (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards llvm-svn: 69771
* Fix rdar://6814950 - stdint.h isn't "-pedantic -std=c89" clean,Chris Lattner2009-04-223-3/+12
| | | | | | | | | | | | | | | | | | | | 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
* move 64-bit abi functions to lazy model, everything is lazy now, yay.Chris Lattner2009-04-221-75/+81
| | | | llvm-svn: 69767
* remove the last of the non-lazy objc runtime functions for the 32-bit ABI,Chris Lattner2009-04-221-54/+56
| | | | | | 7 left for 64-bit ABI. llvm-svn: 69766
* number of non-lazy runtime functions from 9 -> 4.Chris Lattner2009-04-221-44/+47
| | | | llvm-svn: 69765
* make message send functions lazy, we're down from 14 non-lazy functions to 9.Chris Lattner2009-04-221-64/+65
| | | | llvm-svn: 69764
* move more EH stuff to being lazily created. An empty .m file now Chris Lattner2009-04-221-52/+54
| | | | | | produces just 14 dead "declares" in llvm ir instead of 19. llvm-svn: 69763
* make try/catch objc runtime functions be lazily generated.Chris Lattner2009-04-221-22/+26
| | | | | | rdar://6809612 llvm-svn: 69762
* rename testChris Lattner2009-04-221-0/+0
| | | | llvm-svn: 69761
OpenPOWER on IntegriCloud