summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wcharSanjiv Gupta2008-10-311-1/+1
| | | | | | | | | | etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. llvm-svn: 58501
* Debug info: Bug fix, function types should always include the returnDaniel Dunbar2008-10-311-1/+1
| | | | | | type. llvm-svn: 58497
* Quick fix for PR2950, infinite loop generating debug info forDaniel Dunbar2008-10-312-20/+25
| | | | | | | recursive types. - Style will be clean up in further patches. llvm-svn: 58490
* Formatting tweaks.Daniel Dunbar2008-10-312-18/+17
| | | | | | - No functionality change. llvm-svn: 58488
* NeXT: Emit protocol objects lazily.Daniel Dunbar2008-10-291-21/+76
| | | | | | | | | | - That is, the metadata for a protocol is only emitted if that protocol is actually used in the translation unit. This is important because Objective-C headers frequently contain a large number of protocol definitions, only a few of which will be used in any given file. llvm-svn: 58400
* Fix for PR2966: va_start/va_end use the *address* of the Eli Friedman2008-10-291-1/+1
| | | | | | | | | | | va_list, not the value. Patch fixes an assert on x86-64 and a wrong-code bug on x86. I'm not completely sure, but I think it's a regression from r58306. Does anyone run regression tests regularly on x86-64? The crash should have been picked up there. llvm-svn: 58366
* Don't run the verifier as part of IRgen, this is now down (per module)Daniel Dunbar2008-10-282-13/+0
| | | | | | in the driver (this means we no longer run the verifier per function, however). llvm-svn: 58307
* Add attribute always_inline support.Daniel Dunbar2008-10-281-0/+3
| | | | llvm-svn: 58304
* make codegen reject initializes with designators, like this:Chris Lattner2008-10-263-2/+24
| | | | | | | | t.c:1:13: error: cannot codegen this designators yet int a[10] = {2, 4, [8]=9, 10}; ^~~~~~~~~~~~~~~~~ llvm-svn: 58220
* CMake: Builds and installs clang binary and libs (no docs yet). ItOscar Fuentes2008-10-261-0/+22
| | | | | | must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180
* Don't crash on invalid source locations inDaniel Dunbar2008-10-241-3/+6
| | | | | | CGDebugInfo::getOrCreateCompileUnit. llvm-svn: 58081
* Map compilation units using FileEntry pointers instead ofDaniel Dunbar2008-10-242-11/+8
| | | | | | | | | FileIDs. This seems better conceptually and lets the SourceManager handle details of mapping the location to a file ID. - In practice, fixes an assert because this code wasn't using getPhysicalLoc. llvm-svn: 58055
* Add GetModule accessor to ModuleBuilderDaniel Dunbar2008-10-211-0/+4
| | | | llvm-svn: 57924
* Preliminary support for function overloadingDouglas Gregor2008-10-211-2/+2
| | | | llvm-svn: 57909
* Debug info bug fix, function start wasn't getting generated correctlyDaniel Dunbar2008-10-185-24/+24
| | | | | | for Obj-C methods. llvm-svn: 57769
* Emit more descriptive unsupported error message on dot-syntax use of super.Daniel Dunbar2008-10-171-0/+2
| | | | llvm-svn: 57745
* Add FIXME about potential problem in how property ref lvalues are handled.Daniel Dunbar2008-10-171-0/+3
| | | | llvm-svn: 57743
* Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.Daniel Dunbar2008-10-172-23/+28
| | | | | | | - Shouldn't assume predefined expr is a function printing one. - Uses CGM functionality to cache function names per module. llvm-svn: 57737
* Add option argument to GetAddrOfConstantString to use for name ofDaniel Dunbar2008-10-172-10/+23
| | | | | | | (first) global holding the string. - No functionality change. llvm-svn: 57736
* Emit error unsupported when asm string conversion fails instead ofDaniel Dunbar2008-10-171-3/+13
| | | | | | assert. llvm-svn: 57721
* Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.Daniel Dunbar2008-10-173-12/+4
| | | | llvm-svn: 57716
* More Obj-C type encoding improvements.Daniel Dunbar2008-10-171-1/+2
| | | | | | | - Encode unions and bit-fields correctly. - Accept option to name record fields (used for NeXT runtime). llvm-svn: 57685
* Change CGDebugInfo::setLocation to just ignore invalid locations. ThisDaniel Dunbar2008-10-176-23/+16
| | | | | | | | | simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. llvm-svn: 57684
* NeXT: Use objc_msgSend_fpret for calling functions which returnDaniel Dunbar2008-10-171-14/+40
| | | | | | floating point. This is only correct for x86-32 at the moment. llvm-svn: 57667
* Quick patch for PR2784, assert genereting debug info for opaqueDaniel Dunbar2008-10-171-1/+9
| | | | | | | | | | structure. - I'm not sure yet about the behavior, but this at least prevents the crash. Add some asserts on RegionStack usage. llvm-svn: 57661
* Added pinsrd, pinsrq, and some other vector intrinsicsMon P Wang2008-10-151-0/+4
| | | | llvm-svn: 57563
* Simplify handling of struct/union/class tags.Argyrios Kyrtzidis2008-10-151-6/+2
| | | | | | | Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl. Cleans up the code a bit and better reflects that Decl class structure. llvm-svn: 57541
* Lift out ABIInfo abstract base class.Daniel Dunbar2008-10-133-21/+102
| | | | | | | | - Currently still lives in CGCall.cpp but is intended to be the target specific place for hooking ABI information. - Select ABIInfo to use based on Target's prefix and pointer width. llvm-svn: 57445
* silence release-assert warnings.Chris Lattner2008-10-124-11/+12
| | | | llvm-svn: 57392
* Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.Daniel Dunbar2008-10-102-8/+15
| | | | llvm-svn: 57335
* Adjust calls to APFloat conversion for new interface.Dale Johannesen2008-10-091-1/+3
| | | | llvm-svn: 57332
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-3/+3
| | | | | | processing the Decl of an Objective-C foreach statement. llvm-svn: 57209
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-1/+1
| | | | | | processing the Decl of a @catch statement. llvm-svn: 57208
* In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the ↵Ted Kremenek2008-10-061-3/+3
| | | | | | scoped decl chain. llvm-svn: 57192
* Make sema and codegen allow __builtin___CFStringMakeConstantString as a validChris Lattner2008-10-062-17/+20
| | | | | | | constant lvalue. Implement this in codegen by moving the code out of CGBuiltin into EmitConstantExpr. llvm-svn: 57163
* always try to fold a builtin before emitting it. In the futureChris Lattner2008-10-061-18/+5
| | | | | | | it is possible that a builtin could sometimes be folded (e.g. __builtin_clz) if it's operand is a constant. llvm-svn: 57161
* Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cppChris Lattner2008-10-061-18/+5
| | | | llvm-svn: 57157
* remove some code where CGBuiltin folds constants, and use tryEvaluate toChris Lattner2008-10-061-22/+19
| | | | | | | do it instead. We should still handle __builtin_nan etc, but don't yet. This fixes incorrect evaluation of __builtin_constant_p, a FIXME. llvm-svn: 57156
* instead of making codegen try to know about all of the builtins to generateChris Lattner2008-10-061-23/+8
| | | | | | | constants for them, just use the constant evaluator to do the job. This also fixes crashes on 'unknown constant builtins'. llvm-svn: 57155
* Implement support for the const and pure attributes.Anders Carlsson2008-10-051-0/+4
| | | | llvm-svn: 57142
* Emit error unsupported for break/continue/goto inside Obj-C exceptionDaniel Dunbar2008-10-021-2/+30
| | | | | | | handling blocks. - This has false positives, but at least prevents miscompiles. llvm-svn: 56958
* (LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.Daniel Dunbar2008-10-021-3/+3
| | | | llvm-svn: 56954
* NeXT: Update to use CreateRuntimeFunction for the routines it imports.Daniel Dunbar2008-10-011-80/+54
| | | | llvm-svn: 56902
* Add simple interface for protecting runtime functions from nameDaniel Dunbar2008-10-012-0/+56
| | | | | | | | | | | | | | | | | collisions. - Provide CodeGenModule::CreateRuntimeFunction which guarantees that the function it creates will have the provided name in the final module. This allows the runtime to have its functions protected from declarations of the same name in the source code. - One could argue that this is a reason to abuse the llvm::Module namespace for dealing with function redeclarations. However, that approach seems conceptually flawed to me. This one also happens to be somewhat more efficient. No functionality change. llvm-svn: 56899
* Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128Mon P Wang2008-09-301-0/+7
| | | | llvm-svn: 56830
* Add infrastructure for proper @finally support.Daniel Dunbar2008-09-303-60/+145
| | | | | | | | | | | | - Provides a basic primitive to jump to an arbitrary basic block, through the finally code. - Only used for return statements and rethrow currently. Still need to handle break, continue and goto. - Code still needs to be shuffled around to live elsewhere. llvm-svn: 56827
* Add support for implicit rethrows in @catch blocks.Daniel Dunbar2008-09-282-10/+102
| | | | | | Comment exception-handling code generation strategy. llvm-svn: 56763
* Skip redundant if.Daniel Dunbar2008-09-281-5/+3
| | | | llvm-svn: 56762
* (Update LLVM) Clean up obj-c exception generation to be a bit moreDaniel Dunbar2008-09-271-23/+15
| | | | | | readable and to generate more readable IR. llvm-svn: 56758
* Bug fix, codegen @catch(id<X> ...) acceptably.Daniel Dunbar2008-09-271-2/+5
| | | | | | | - This should be rejected by sema (IMHO) but that needs some investigation. llvm-svn: 56756
OpenPOWER on IntegriCloud