summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAge
...
* Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes toDaniel Dunbar2009-04-14
| | | | | | | | disambiguate it. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce indentation, no functionality change.Daniel Dunbar2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8
* defer emission of always_inline, extern_inline, and inline functions (when Chris Lattner2009-04-14
| | | | | | | not in c89 mode). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032 91177308-0d34-0410-b5e6-96231b3b80d8
* give always_inline functions internal linkage. If they cannot be Chris Lattner2009-04-14
| | | | | | | | inlined for some reason, then we don't want a strong or even weak definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69031 91177308-0d34-0410-b5e6-96231b3b80d8
* set the linkage of an inline function according to its language rules.Chris Lattner2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment on SetGlobalValueAttributes.Daniel Dunbar2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new enum type for linkage, no functionality change.Chris Lattner2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up handling of visibility.Daniel Dunbar2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce indentation, no functionality change.Chris Lattner2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026 91177308-0d34-0410-b5e6-96231b3b80d8
* do not set visibility on "private" or "available externally" linkage objects.Chris Lattner2009-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to use hasAttr() instead of getAttr().Daniel Dunbar2009-04-13
| | | | | | | - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
* Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).Steve Naroff2009-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result ↵Steve Naroff2009-04-13
| | | | | | | | | == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063. Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68975 91177308-0d34-0410-b5e6-96231b3b80d8
* Internal variables could mistakenly have "hidden" visibility whenDaniel Dunbar2009-04-10
| | | | | | | | | their emission was deferred. - <rdar://problem/6775234> variables with internal linkage should not be exposed with -fvisibility=hidden. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68818 91177308-0d34-0410-b5e6-96231b3b80d8
* reject codegen of __thread variables as unimplemented, rdar://6775265Chris Lattner2009-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8
* 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