aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)Author
2009-04-14Split SetGlobalValueAttributes into definition/declaration halves.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes toDaniel Dunbar
disambiguate it. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Reduce indentation, no functionality change.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14defer emission of always_inline, extern_inline, and inline functions (when Chris Lattner
not in c89 mode). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14give always_inline functions internal linkage. If they cannot be Chris Lattner
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
2009-04-14set the linkage of an inline function according to its language rules.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Add a comment on SetGlobalValueAttributes.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14add a new enum type for linkage, no functionality change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Clean up handling of visibility.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14reduce indentation, no functionality change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14do not set visibility on "private" or "available externally" linkage objects.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Update to use hasAttr() instead of getAttr().Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result ↵Steve Naroff
== 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
2009-04-10Internal variables could mistakenly have "hidden" visibility whenDaniel Dunbar
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
2009-04-10reject codegen of __thread variables as unimplemented, rdar://6775265Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-09Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor
No functionality change (really). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08Add a destination type argument to EmitConstantExpr. This will be used for ↵Anders Carlsson
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
2009-04-07Visibility attributes should only be set on definition.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Various fixes to symbols used for Obj-C x86_64 metadata.Daniel Dunbar
- 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
2009-04-04Add some basic support for generating C++ member functions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04Basic support for regparm codegenAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03Add a comment/FIXME so Eli can sleep better:-))Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03Implement -fvisibility.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar
string literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-02Emit code for linkage specifications.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01CodeGenModule::GetAddrOfConstantCFString():Steve Naroff
- 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
2009-04-01Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.Steve Naroff
#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
2009-04-01More "prep" work for handling UTF16 CFString.Steve Naroff
Patch by Jean-Daniel Dupas. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01fix the two xfails I added with a previous patch by making ObjC interfaceChris Lattner
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
2009-04-01move trivial forwarding function inline.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01Implement code generation of namespaces and add mangling tests.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-31Add Target hooks for IRgen of [cf]string literals.Daniel Dunbar
- 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
2009-03-31Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem ↵Chris Lattner
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
2009-03-31remove some obsolete comments, use an AssertingVH.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27Finish off semantic analysis for regparm, and remove the warning. Also Eli Friedman
remove a redundant error in CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-27Besides the warning, issue unsupported diagnostics in Fariborz Jahanian
ir gen. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26most of this is plumbing to get CompileOptions down into Chris Lattner
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
2009-03-22switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction Chris Lattner
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
2009-03-22emit aliases as the definitions fly by, don't bother deferring untilChris Lattner
the end of the module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22make alias definition logic more similar to functions/globals.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22fix PR3200 by making alias emission use the new infrastructure. Fold Chris Lattner
some tests into the alias.c file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner
variables. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22fix a fixme: non-proto struct returning function definitions should be compiledChris Lattner
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
2009-03-22set function/global names with setName instead of passing the name into theChris Lattner
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
2009-03-21Issue error if variables are defined inside an objc class,Fariborz Jahanian
category or protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21now that all the decl reference and creation stuff is going through twoChris Lattner
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
2009-03-21fix a crash that could occur when a variable declaration became aChris Lattner
function definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21simplify and cleanup global variable creation stuff to all go through oneChris Lattner
code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21simplify management of llvm::Function creation to all go throughChris Lattner
GetAddrOfFunction. This is simpler and more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8