summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAge
...
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-09
| | | | | | | No functionality change (really). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a destination type argument to EmitConstantExpr. This will be used for ↵Anders Carlsson2009-04-08
| | | | | | when the destination has a reference type. (No functionality change yet) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
* Visibility attributes should only be set on definition.Daniel Dunbar2009-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68561 91177308-0d34-0410-b5e6-96231b3b80d8
* Various fixes to symbols used for Obj-C x86_64 metadata.Daniel Dunbar2009-04-07
| | | | | | | | | | | | | | | | | | | | | | - Changed method names to match gcc (categories names still aren't mangled in). - Expose correct name for class and metadata symbols (although -fvisibility=hidden isn't yet correct). - Remove several things from llvm.used that didn't need to be there (I suspect this can still be trimmed). - Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not needed). - Hide EH type class info with -fvisibility=hidden - Change setGlobal[Option]Visibility to not change the visibility of functions with internal linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some basic support for generating C++ member functions.Anders Carlsson2009-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68425 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic support for regparm codegenAnton Korobeynikov2009-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment/FIXME so Eli can sleep better:-))Steve Naroff2009-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -fvisibility.Fariborz Jahanian2009-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
* Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar2009-04-03
| | | | | | | string literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit code for linkage specifications.Anders Carlsson2009-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68300 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGenModule::GetAddrOfConstantCFString():Steve Naroff2009-04-01
| | | | | | | | | | | - Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants. Remove warning from CheckObjCString. As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.Steve Naroff2009-04-01
| | | | | | | | | | | #ifdef'd out the 5 conversion routines that we don't currently need. Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this. Expect to remove the FIXME today... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
* More "prep" work for handling UTF16 CFString.Steve Naroff2009-04-01
| | | | | | | Patch by Jean-Daniel Dupas. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the two xfails I added with a previous patch by making ObjC interfaceChris Lattner2009-04-01
| | | | | | | | types get completed when their definition is seen if previously laid out by the code generator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68177 91177308-0d34-0410-b5e6-96231b3b80d8
* move trivial forwarding function inline.Chris Lattner2009-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68176 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement code generation of namespaces and add mangling tests.Anders Carlsson2009-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68170 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Target hooks for IRgen of [cf]string literals.Daniel Dunbar2009-03-31
| | | | | | | | | | | | - Notably, set section on cfstring literal string data (for now, this is done everywhere because it matches what we were already doing for the CFString data itself) - <rdar://problem/6599098> [irgen] linker requires objc string data to go into cstring git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
* Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem ↵Chris Lattner2009-03-31
| | | | | | | | | that occurs when attribute(used) and asm renaming are used together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68155 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some obsolete comments, use an AssertingVH.Chris Lattner2009-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151 91177308-0d34-0410-b5e6-96231b3b80d8
* 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