summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAge
...
* Finish off semantic analysis for regparm, and remove the warning. Also Eli Friedman2009-03-27
| | | | | | | | remove a redundant error in CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
* Besides the warning, issue unsupported diagnostics in Fariborz Jahanian2009-03-27
| | | | | | | ir gen. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
* most of this is plumbing to get CompileOptions down into Chris Lattner2009-03-26
| | | | | | | | CodeGenModule. Once there, add a new NoCommon option to it and implement -fno-common. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67735 91177308-0d34-0410-b5e6-96231b3b80d8
* switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction Chris Lattner2009-03-22
| | | | | | | | | functionality, fixing a crash on the attached testcase. Eliminate the BuiltinFunctions cache, as it can contain dangling pointers. This fixes a bunch of valgrind errors on test/CodeGen/builtins.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67484 91177308-0d34-0410-b5e6-96231b3b80d8
* emit aliases as the definitions fly by, don't bother deferring untilChris Lattner2009-03-22
| | | | | | | the end of the module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482 91177308-0d34-0410-b5e6-96231b3b80d8
* make alias definition logic more similar to functions/globals.Chris Lattner2009-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR3200 by making alias emission use the new infrastructure. Fold Chris Lattner2009-03-22
| | | | | | | some tests into the alias.c file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
* pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner2009-03-22
| | | | | | | | | variables. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a fixme: non-proto struct returning function definitions should be compiledChris Lattner2009-03-22
| | | | | | | | | | | to something like: define void @bar(%struct.foo* noalias sret %agg.result) nounwind { instead of: define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind { git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475 91177308-0d34-0410-b5e6-96231b3b80d8
* set function/global names with setName instead of passing the name into theChris Lattner2009-03-22
| | | | | | | | ctor function. This avoids creating a temporary std::string for the name, speeding up the testcase in PR3810 by 3.8% git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457 91177308-0d34-0410-b5e6-96231b3b80d8
* Issue error if variables are defined inside an objc class,Fariborz Jahanian2009-03-21
| | | | | | | category or protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
* now that all the decl reference and creation stuff is going through twoChris Lattner2009-03-21
| | | | | | | | very simple places, reimplement the deferred decl emission logic to not be O(N^2), fixing PR3810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash that could occur when a variable declaration became aChris Lattner2009-03-21
| | | | | | | function definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify and cleanup global variable creation stuff to all go through oneChris Lattner2009-03-21
| | | | | | | code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify management of llvm::Function creation to all go throughChris Lattner2009-03-21
| | | | | | | GetAddrOfFunction. This is simpler and more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8
* code cleanups, rename EmitForwardFunctionDefinition -> Chris Lattner2009-03-21
| | | | | | | | CreateFunctionPrototypeIR, though my next patch will eliminate it entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67443 91177308-0d34-0410-b5e6-96231b3b80d8
* fix several problems with asm renaming, by pulling it into the mangling code:Chris Lattner2009-03-21
| | | | | | | | | | 1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo") 2. multiple definitions were conflicting, they weren't getting merged. 3. the code was duplicated in several places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442 91177308-0d34-0410-b5e6-96231b3b80d8
* add some fixmesChris Lattner2009-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67441 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce redundant calls of getMangledName.Chris Lattner2009-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67440 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some more code.Chris Lattner2009-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67439 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify and comment some code better. Make BindRuntimeGlobalsChris Lattner2009-03-21
| | | | | | | more optimistic that it will work (optimizing for the common case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67438 91177308-0d34-0410-b5e6-96231b3b80d8
* random code cleanups.Chris Lattner2009-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67437 91177308-0d34-0410-b5e6-96231b3b80d8
* remove obviously dead code: you can't bitcast a pointer to "Ty" (a function ↵Chris Lattner2009-03-21
| | | | | | type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid making constant folding logic eliminate obviously dead bitcasts, ↵Chris Lattner2009-03-21
| | | | | | | | | speeding up PR3810 by ~2%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67434 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a fast path to CodeGenModule::getMangledName for almost all C functions,Chris Lattner2009-03-21
| | | | | | | speeding up the testcase in PR3810 by 60%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67431 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen support for alias of global variable.Daniel Dunbar2009-03-19
| | | | | | | - PR3818. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67297 91177308-0d34-0410-b5e6-96231b3b80d8
* objc: Implemented variables declared in class interface Fariborz Jahanian2009-03-18
| | | | | | | whose sema decl is at the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust for linkage name change.Duncan Sands2009-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66691 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct for change of this name in LLVM.Duncan Sands2009-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66652 91177308-0d34-0410-b5e6-96231b3b80d8
* Backout r66408, we don't want handling of globals to rely on theDaniel Dunbar2009-03-09
| | | | | | | | module symbol table. The root problem inspiring this was fixed in r66316 (and again in r66506). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66512 91177308-0d34-0410-b5e6-96231b3b80d8
* Be sure to never create two functions with the same name, instead arrange toMike Stump2009-03-09
| | | | | | | reuse the prior one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66408 91177308-0d34-0410-b5e6-96231b3b80d8
* Make constant emission for @encode use the common string emission code. Eli Friedman2009-03-07
| | | | | | | | | This is a bit cleaner, and also "fixes" bad code that compares the addresses of the string constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66346 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup our uses of various linkages to match how llvm now works. I think ↵Mike Stump2009-03-07
| | | | | | | | | they are all correct, but an extra set of ObjC eyes would be good. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66342 91177308-0d34-0410-b5e6-96231b3b80d8
* (LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and addDaniel Dunbar2009-03-06
| | | | | | | | | | | | | | | CodeGenModule::CreateRuntimeVariable. - No real functionality change; although we now assert on silly things like: -- int objc_exception_throw; void f0() { @throw(@"A"); } -- instead of accepting it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66292 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen support for weak_import.Daniel Dunbar2009-03-06
| | | | | | | - <rdar://problem/6652110> clang should support weak_import git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66270 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't mangle names of local variables.Daniel Dunbar2009-03-05
| | | | | | | | | - For one thing, this adds unneeded overhead; for another, this routine can be used to emit unnamed decls which we shouldn't try to mangle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66212 91177308-0d34-0410-b5e6-96231b3b80d8
* Make IRGen compatible with declaring a function with incomplete Eli Friedman2009-03-05
| | | | | | | | | return/argument types. (The generated IR isn't ideal, but we can't really do better in general.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66132 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more of the blocks code up and out.Mike Stump2009-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66046 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more of blocks codegen out of CodeGenModule and into theMike Stump2009-03-04
| | | | | | | | | | BlockModule. No functionality change. This should help people that don't want to know anything about blocks not be confused by the overloaded use of the term block or nor want to see all the blocks goop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66042 91177308-0d34-0410-b5e6-96231b3b80d8
* Support "asm" renaming of external symbols.Daniel Dunbar2009-03-04
| | | | | | | - PR3698. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66038 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't set nounwind on functions when in using the new Obj-C ABI.Daniel Dunbar2009-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65806 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code.Chris Lattner2009-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65782 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize NSConcreteStackBlockAnders Carlsson2009-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65749 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3612. We ensure that we add builtins to the GlobalDeclMap andMike Stump2009-02-27
| | | | | | | | | | we ensure that things added to the module can be found even when they are not in GlobalDeclMap. The later is for increased flexibility, should someone want to do something tricky like extern "Ada" in the same module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65657 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup: use getDeclAlignInBytes helper.Eli Friedman2009-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65611 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some sema problems with wide strings and hook up basic codegen for them.Chris Lattner2009-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
* first wave of fixes for @encode sema support. This is part of PR3648.Chris Lattner2009-02-24
| | | | | | | | The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit extern_weak when needed.Daniel Dunbar2009-02-21
| | | | | | | - PR3629. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65203 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize the Init variable to something reasonable when we emit an Eli Friedman2009-02-20
| | | | | | | | error, so we don't crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65099 91177308-0d34-0410-b5e6-96231b3b80d8
* Add irgen support for the noinline attribute.Anders Carlsson2009-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65056 91177308-0d34-0410-b5e6-96231b3b80d8