summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-509/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* add initial support for generating an llvm.globalctors list. Patch by David ↵Chris Lattner2008-03-141-0/+54
| | | | | | Chisnall llvm-svn: 48362
* Propagate calling convention information to function declarations and CallInstNate Begeman2008-03-091-2/+8
| | | | | | instructions. llvm-svn: 48077
* Fix a fixme by allowing pointers in different address spaces to haveChris Lattner2008-03-081-6/+2
| | | | | | different widths. Start simplifying TargetInfo accessor methods. llvm-svn: 48050
* remove the source location arguments to various target query methods.Chris Lattner2008-03-051-3/+3
| | | | llvm-svn: 47954
* Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner2008-03-031-17/+30
| | | | llvm-svn: 47837
* Add codegen support for ObjC message expressions with the GNU runtime.Chris Lattner2008-03-011-1/+8
| | | | | | Patch by David Chisnall! llvm-svn: 47789
* Implement CodeGenModule::getMemSetFn method.Lauro Ramos Venancio2008-02-191-1/+13
| | | | llvm-svn: 47346
* A global without initializer must be emitted as weak.Lauro Ramos Venancio2008-02-191-0/+3
| | | | | | Fix Olden/bh test. llvm-svn: 47292
* Fix PR1992 by computing the right type for string literals, whichChris Lattner2008-02-111-6/+3
| | | | | | | | is an array type not a pointer type. This requires updating some diags that change and updating the code generator to handle the proper form of strings. llvm-svn: 46941
* sink more of the type related code into CodeGenTypes.Chris Lattner2008-02-061-18/+3
| | | | llvm-svn: 46801
* rewrite some of the type refinement code to eliminate dangling pointersChris Lattner2008-02-051-0/+21
| | | | | | simplify the code and generally make it more robust. llvm-svn: 46745
* Relax an assertion, fixing PR1968Chris Lattner2008-02-051-1/+12
| | | | llvm-svn: 46742
* Add experimental support for address space qualified types. Address spaceChristopher Lamb2008-02-041-3/+6
| | | | | | qualifiers use the __attribute__((address_space(id))) syntax. llvm-svn: 46691
* fix codegen on static variables which have multiple decl nodes. These Chris Lattner2008-02-021-1/+1
| | | | | | | | | | | should be merged just like normal globals. This fixes this testcase that Anders provided: static struct s a; static struct s *ap1 = &a; static struct s a = { 10 }; llvm-svn: 46661
* Factor out the constant generation into its own file.Anders Carlsson2008-01-261-343/+2
| | | | llvm-svn: 46386
* Add more support for Apple's "private extern" extension...Steve Naroff2008-01-251-0/+1
| | | | llvm-svn: 46371
* Support checking and codegen of constant vector globalsNate Begeman2008-01-251-1/+11
| | | | llvm-svn: 46343
* Add first pieces of support for parsing and representing Chris Lattner2008-01-121-0/+10
| | | | | | extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
* implement proper support for _Bool in memory, which is usually i8, not i1.Chris Lattner2008-01-091-1/+1
| | | | | | This fixes a crash reported by Seo Sanghyeon llvm-svn: 45778
* implement codegen support for most unary operators when Chris Lattner2007-12-291-1/+36
| | | | | | | initializing a global. This handles important cases like: float foo3 = -0.01f; llvm-svn: 45427
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* local static vars are globals also. This fixes a testcaseChris Lattner2007-12-181-5/+7
| | | | | | reported by Seo. llvm-svn: 45156
* introduce a new CodeGenModule::getIntrinsic method, which wraps Chris Lattner2007-12-181-1/+7
| | | | | | Intrinsic::getDeclaration, allowing much more terse code. llvm-svn: 45136
* add a hack so that codegen doesn't abort on missing sema of initializers, nowChris Lattner2007-12-171-1/+15
| | | | | | | | | | | | | | | we emit stuff like this: abort on missing sema of initializers, now we emit stuff like this: t3.c:1:24: warning: cannot codegen this initializer yet const char x[2][4] = { { 'a', 'b', '\0', '\0' }, { 'c', 'd', 'e', '\0' } }; ^~~~~~~~~~~~~~~~~~~~~~~~ This should be removed when sema is finished. llvm-svn: 45086
* Update to use new PointerType::getUnqual() api.Christopher Lamb2007-12-171-2/+2
| | | | llvm-svn: 45081
* builtin id 0 is invalid, don't use a slot for it.Chris Lattner2007-12-131-4/+6
| | | | llvm-svn: 44968
* fix off-by-one error.Chris Lattner2007-12-121-1/+1
| | | | llvm-svn: 44963
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-121-2/+2
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-111-1/+2
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* Reimplement support for strings that initialize global inits now thatChris Lattner2007-12-111-34/+26
| | | | | | the types are right in sema. Thanks Steve. llvm-svn: 44834
* add support for implicit cast from array to pointer that is not the elementChris Lattner2007-12-101-1/+8
| | | | | | type. llvm-svn: 44809
* abort when we lower an initializer to the wrong type, as we currently do for:Chris Lattner2007-12-101-2/+2
| | | | | | char text[] = "string"; llvm-svn: 44752
* extend or truncate the initializer for a string initializer to match its type.Chris Lattner2007-12-101-6/+15
| | | | llvm-svn: 44751
* Implement codegen support for:Chris Lattner2007-12-091-0/+21
| | | | | | | | char text[8] = "string"; Big fixme remains. llvm-svn: 44750
* implement support for functions that initialize globals.Chris Lattner2007-12-091-6/+13
| | | | llvm-svn: 44730
* Treat discarding array initializer elements as an extwarn (so ↵Christopher Lamb2007-12-021-8/+20
| | | | | | -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed. llvm-svn: 44518
* globals can't be vla'sChris Lattner2007-12-021-4/+2
| | | | llvm-svn: 44512
* add codegen support for global inits that require array decay.Chris Lattner2007-12-021-0/+21
| | | | llvm-svn: 44511
* warn about unhandled initializers instead of crashing on them.Chris Lattner2007-12-021-24/+32
| | | | llvm-svn: 44510
* Handle global variable definitions which change the type of a definition, ↵Chris Lattner2007-12-021-28/+112
| | | | | | | | | | | such as: extern int x[]; void foo() { x[0] = 1; } int x[10]; void bar() { x[0] = 1; } llvm-svn: 44509
* merge the llvm global variable when there are multiple C decls.Chris Lattner2007-12-021-3/+10
| | | | llvm-svn: 44507
* implement codegen for functions whose function body type don't matchChris Lattner2007-12-021-0/+12
| | | | | | their prototype. llvm-svn: 44506
* merge functions with multiple function decls if they have the same name.Chris Lattner2007-12-021-0/+7
| | | | llvm-svn: 44505
* Warn about unsupported codegen with the diags machinery, giving us:Chris Lattner2007-12-021-2/+3
| | | | | | | | | | | | | t.c:3322:5: warning: cannot codegen this yet __asm__ ("bswap %0" : "+r" (_data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instead of: Unimplemented stmt! (AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>) llvm-svn: 44501
* Support initalisers for more than just int-typed static variables.Oliver Hunt2007-12-021-4/+3
| | | | | | | | We now use the CodeGenModule logic for generating the constant initialiser expression, so happily further initialiser fixes should automatically work for statics as well. llvm-svn: 44495
* Implement support for -fwritable-strings and make the code generatorChris Lattner2007-11-281-25/+44
| | | | | | merge string literals when it is not provided. llvm-svn: 44394
* improve codegen for global variable initializers, implementing Chris Lattner2007-11-231-27/+227
| | | | | | | | test/CodeGen/global-with-initialiser.c Patch by Oliver Hunt! llvm-svn: 44290
* Put constant CFStrings in the __DATA,__cfstring section.Anders Carlsson2007-11-011-6/+7
| | | | llvm-svn: 43593
* Take 2.Devang Patel2007-10-311-3/+4
| | | | | | | | Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress. At the moment target triplet and target description strings are hard coded in clang::TargetInfo llvm-svn: 43572
OpenPOWER on IntegriCloud