summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)Author
2009-04-15Start attempting to generate code for C++ ctors.Anders Carlsson
llvm-svn: 69168
2009-04-14Comment fix.Daniel Dunbar
llvm-svn: 69091
2009-04-14Fix PR3988: extern inline functions get strong symbol definitions inChris Lattner
C99 mode. This is a regression from an earlier patch of mine. This also simplifies the linkage enums a bit. llvm-svn: 69069
2009-04-14implement codegen support for __attribute((__gnuc_inline__)),Chris Lattner
pulling some attribute munging stuff into GetLinkageForFunction. This should fix PR3986 llvm-svn: 69045
2009-04-14Refactor how attributes are set on values.Daniel Dunbar
- Pull out SetCommonAttributes, which handles the things common to aliases, methods, functions, and variables. - Pull out SetLLVMFunctionAttributesForDefinition, which handles the LLVM attributes which we only want to apply to a definition (like noinline and alwaysinline). - Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes and specialized). - Kill SetFunctionAttributesForDefinition (inlined into sole caller). - Inline SetGVDefinitionAttributes into SetMethodAttributes and specialize. - Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes. This is supposed to be a no functionality change commit, but I may have made a mistake. llvm-svn: 69036
2009-04-14Split SetGlobalValueAttributes into definition/declaration halves.Daniel Dunbar
- No functionality change. llvm-svn: 69035
2009-04-14Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes toDaniel Dunbar
disambiguate it. - No functionality change. llvm-svn: 69034
2009-04-14Reduce indentation, no functionality change.Daniel Dunbar
llvm-svn: 69033
2009-04-14defer emission of always_inline, extern_inline, and inline functions (when Chris Lattner
not in c89 mode). llvm-svn: 69032
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. llvm-svn: 69031
2009-04-14set the linkage of an inline function according to its language rules.Chris Lattner
llvm-svn: 69030
2009-04-14Add a comment on SetGlobalValueAttributes.Daniel Dunbar
llvm-svn: 69029
2009-04-14add a new enum type for linkage, no functionality change.Chris Lattner
llvm-svn: 69028
2009-04-14Clean up handling of visibility.Daniel Dunbar
llvm-svn: 69027
2009-04-14reduce indentation, no functionality change.Chris Lattner
llvm-svn: 69026
2009-04-14do not set visibility on "private" or "available externally" linkage objects.Chris Lattner
llvm-svn: 69025
2009-04-13Update to use hasAttr() instead of getAttr().Daniel Dunbar
- No functionality change. llvm-svn: 68987
2009-04-13Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).Steve Naroff
llvm-svn: 68982
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). llvm-svn: 68975
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. llvm-svn: 68818
2009-04-10reject codegen of __thread variables as unimplemented, rdar://6775265Chris Lattner
llvm-svn: 68755
2009-04-09Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor
No functionality change (really). llvm-svn: 68726
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) llvm-svn: 68593
2009-04-07Visibility attributes should only be set on definition.Daniel Dunbar
llvm-svn: 68561
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. llvm-svn: 68510
2009-04-04Add some basic support for generating C++ member functions.Anders Carlsson
llvm-svn: 68425
2009-04-04Basic support for regparm codegenAnton Korobeynikov
llvm-svn: 68414
2009-04-03Add a comment/FIXME so Eli can sleep better:-))Steve Naroff
llvm-svn: 68379
2009-04-03Implement -fvisibility.Fariborz Jahanian
llvm-svn: 68369
2009-04-03Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar
string literals. llvm-svn: 68363
2009-04-02Emit code for linkage specifications.Anders Carlsson
llvm-svn: 68300
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). llvm-svn: 68245
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... llvm-svn: 68208
2009-04-01More "prep" work for handling UTF16 CFString.Steve Naroff
Patch by Jean-Daniel Dupas. Thanks! llvm-svn: 68203
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. llvm-svn: 68177
2009-04-01move trivial forwarding function inline.Chris Lattner
llvm-svn: 68176
2009-04-01Implement code generation of namespaces and add mangling tests.Anders Carlsson
llvm-svn: 68170
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 llvm-svn: 68160
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. llvm-svn: 68155
2009-03-31remove some obsolete comments, use an AssertingVH.Chris Lattner
llvm-svn: 68151
2009-03-27Finish off semantic analysis for regparm, and remove the warning. Also Eli Friedman
remove a redundant error in CodeGen. llvm-svn: 67868
2009-03-27Besides the warning, issue unsupported diagnostics in Fariborz Jahanian
ir gen. No intended change in functionality. llvm-svn: 67857
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. llvm-svn: 67735
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 llvm-svn: 67484
2009-03-22emit aliases as the definitions fly by, don't bother deferring untilChris Lattner
the end of the module. llvm-svn: 67482
2009-03-22make alias definition logic more similar to functions/globals.Chris Lattner
llvm-svn: 67481
2009-03-22fix PR3200 by making alias emission use the new infrastructure. Fold Chris Lattner
some tests into the alias.c file. llvm-svn: 67479
2009-03-22pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner
variables. No intended functionality change. llvm-svn: 67478
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 { llvm-svn: 67475
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% llvm-svn: 67457