- Apr 23, 2009
-
-
Devang Patel authored
Handle corner case where clang-cc is invoked directly to compile preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file. This patch takes conservative approach by not emitting more then one compile unit with isMain bit set. llvm-svn: 69902
-
Fariborz Jahanian authored
llvm-svn: 69896
-
Daniel Dunbar authored
- This shouldn't change anything, we never actually access it, but this is consistent with llvm-gcc (and 32-bit) llvm-svn: 69880
-
Chris Lattner authored
llvm-svn: 69875
-
Chris Lattner authored
llvm-svn: 69873
-
Chris Lattner authored
the type assigned by sema (and is visible with sizeof(__func__) for example) has nothing to do with what codegen ends up producing. We should eventually add a method on PredefinedExpr to handle this. In the meantime, just set up some framework and add some fixme's. llvm-svn: 69872
-
Daniel Dunbar authored
- Notably, there was a memory error here, SkipIvars does not have to be the same size as IvarsInfo. - Fariborz, please check. llvm-svn: 69850
-
Douglas Gregor authored
methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
-
Fariborz Jahanian authored
llvm-svn: 69838
-
- Apr 22, 2009
-
-
Daniel Dunbar authored
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
-
Daniel Dunbar authored
- This is only used by CGObjCRuntime now. llvm-svn: 69800
-
Daniel Dunbar authored
- 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
-
Daniel Dunbar authored
underlying llvm::StructType for an interface. llvm-svn: 69796
-
Daniel Dunbar authored
llvm-svn: 69793
-
Daniel Dunbar authored
llvm-svn: 69790
-
Daniel Dunbar authored
llvm-svn: 69789
-
Daniel Dunbar authored
- 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
-
Chris Lattner authored
llvm-svn: 69784
-
Chris Lattner authored
llvm-svn: 69783
-
Daniel Dunbar authored
llvm-svn: 69775
-
Daniel Dunbar authored
llvm-svn: 69773
-
Daniel Dunbar authored
llvm-svn: 69772
-
Daniel Dunbar authored
- 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
-
Chris Lattner authored
llvm-svn: 69767
-
Chris Lattner authored
7 left for 64-bit ABI. llvm-svn: 69766
-
Chris Lattner authored
llvm-svn: 69765
-
Chris Lattner authored
llvm-svn: 69764
-
Chris Lattner authored
produces just 14 dead "declares" in llvm ir instead of 19. llvm-svn: 69763
-
Chris Lattner authored
rdar://6809612 llvm-svn: 69762
-
Chris Lattner authored
extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
-
Chris Lattner authored
llvm-svn: 69747
-
- Apr 21, 2009
-
-
Daniel Dunbar authored
@implementation that closes a @class delcaration. - I don't know how to make a test case for this, but this strengthens the invariants that hold internally. The functionality change here is the edit to SemaDeclObjC.cpp. llvm-svn: 69728
-
Douglas Gregor authored
llvm-svn: 69699
-
Fariborz Jahanian authored
llvm-svn: 69695
-
Chris Lattner authored
in cases like this: typedef struct { short instance; char name[0]; } ATTR_LIST_ENTRY2; void test() { ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, }; } While it is safe to emit them, it is pretty silly. llvm-svn: 69687
-
Douglas Gregor authored
tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681
-
Sanjiv Gupta authored
llvm-svn: 69668
-
Chris Lattner authored
but crashed codegen. Fix this to report the name of the llvm function. This fixes rdar://6808051 llvm-svn: 69658
-
Daniel Dunbar authored
llvm-svn: 69650
-
Daniel Dunbar authored
when we need them -- which is exactly what some code was already doing! - No intended functionality change. llvm-svn: 69648
-