summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use new DIBuilder::finalize() at the end to wrap up debug info encoding for ↵Devang Patel2011-08-151-0/+2
| | | | | | a translation unit. llvm-svn: 137674
* Move the creation of the record type for the state of Objective-C fastDouglas Gregor2011-08-091-0/+35
| | | | | | | | enumerations from the ASTContext into CodeGen, so that we don't need to serialize it to AST files. This appears to be the last of the low-hanging fruit for SpecialTypes. llvm-svn: 137124
* Move the construction of the RecordDecl representing the runtimeDouglas Gregor2011-08-091-6/+46
| | | | | | | | layout of a constant NSString from the ASTContext over to CodeGen, since this is solely CodeGen's responsibility. Eliminates one of the unnecessary "special" types that we serialize. llvm-svn: 137121
* Emit wide string literals with the appropriate alignment.John McCall2011-08-041-14/+24
| | | | | | Patch by Craig Topper and Sundeep! llvm-svn: 136856
* When rewriting a call to a K&R function to lead to a well-prototypedJohn McCall2011-08-031-1/+20
| | | | | | | function, be sure to drop parameter attributes when dropping their associated arguments. Patch by Aaron Landwehr! llvm-svn: 136753
* CodeGen: rename CodeGenModule::Runtime to ObjCRuntimePeter Collingbourne2011-07-271-9/+9
| | | | llvm-svn: 136254
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-271-2/+14
| | | | llvm-svn: 136210
* Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth2011-07-251-2/+2
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135969
* fix PR10415, tidying up IR representation of module level inline asmChris Lattner2011-07-231-0/+2
| | | | | | to avoid extraneous \n's. llvm-svn: 135862
* Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner2011-07-231-1/+1
| | | | | | Mulder! llvm-svn: 135855
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-32/+32
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.Jordy Rose2011-07-221-3/+2
| | | | | | | | | This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. llvm-svn: 135741
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-4/+4
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* In C99, emit an inline function when encountering an extern redeclaration.Nick Lewycky2011-07-181-2/+15
| | | | | | Fixes PR10233! llvm-svn: 135377
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-29/+29
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-2/+1
| | | | llvm-svn: 135265
* Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer2011-07-141-3/+3
| | | | | | function in LLVM does. llvm-svn: 135155
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-6/+4
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-4/+6
| | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, line 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134888 into '.': U lib/CodeGen/CodeGenModule.cpp llvm-svn: 134950
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-6/+4
| | | | llvm-svn: 134888
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-6/+7
| | | | llvm-svn: 134831
* r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,Cameron Zwarich2011-07-071-15/+2
| | | | | | so roll it out. llvm-svn: 134638
* A redeclaration of an inline method in C99 mode should trigger emission of thatNick Lewycky2011-07-071-2/+15
| | | | | | function. Fixes PR10233! llvm-svn: 134634
* Change the IR-generation of VLAs so that we capture bounds,John McCall2011-06-241-0/+4
| | | | | | | not sizes; so that we use well-typed allocas; and so that we properly recurse through the full set of variably-modified types. llvm-svn: 133827
* IRgen: Add CGOptions to CGTypes.Daniel Dunbar2011-06-211-1/+1
| | | | llvm-svn: 133530
* llvm-gcc treats a tentative definition with a previousFariborz Jahanian2011-06-201-1/+2
| | | | | | | | | (or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import llvm-svn: 133450
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-2/+2
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* update for api change.Chris Lattner2011-06-181-1/+1
| | | | llvm-svn: 133365
* Move computation of __private_extern__ visibilty toFariborz Jahanian2011-06-161-11/+2
| | | | | | getLVForNamespaceScopeDecl(). // rdar://9609649 llvm-svn: 133182
* Set the visibility to 'hidden' when previousFariborz Jahanian2011-06-161-2/+11
| | | | | | | declaration of global var is __private_extern__. // rdar://9609649 llvm-svn: 133157
* Automatic Reference Counting.John McCall2011-06-151-4/+17
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to ↵Eli Friedman2011-06-101-1/+1
| | | | | | | | determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates. While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp. llvm-svn: 132861
* When inferring the result type of a block based on a return statementDouglas Gregor2011-06-051-0/+1
| | | | | | | | with a type-dependent expression, infer the placeholder type 'Context.DependentTy' to indicate that this is just a placeholder. Fixes PR9982 / <rdar://problem/9486685>. llvm-svn: 132657
* Match llvm-gcc's string literals alignment by forcing alignment on string ↵Eli Friedman2011-05-271-0/+1
| | | | | | literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 . llvm-svn: 132223
* Update for llvm api change.Rafael Espindola2011-05-251-0/+3
| | | | llvm-svn: 132034
* Code cleanup of my last patch.Fariborz Jahanian2011-05-171-13/+8
| | | | llvm-svn: 131499
* Patch to fix IR-gen crash generating structure ABI which implementsFariborz Jahanian2011-05-171-14/+21
| | | | | | | user specified string class via -fconstant-string-class option. pr9914. llvm-svn: 131496
* Use arrays and SmallVectors instead of std::vectors when building functionJohn McCall2011-05-151-21/+14
| | | | | | | types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t alias. No functionality change. llvm-svn: 131373
* SimplifyJoerg Sonnenberger2011-05-131-1/+1
| | | | llvm-svn: 131321
* Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger2011-05-131-4/+14
| | | | | | | mangled to avoid doing it twice for platforms that use prefixes like Darwin. llvm-svn: 131311
* Produce UTF-8 strings with -fconstant-string-classFariborz Jahanian2011-05-131-21/+15
| | | | | | -fno-constant-cfstrings. Patch by Jonathan Schleifer. llvm-svn: 131298
* When determining whether we can make a declaration into a globalDouglas Gregor2011-05-131-1/+3
| | | | | | | constant, also consider whether it's a class type that has any mutable fields. If so, it can't be a global constant. llvm-svn: 131276
* In C++, allow us to emit a global as 'constant' even if it has classDouglas Gregor2011-05-071-7/+10
| | | | | | | type, so long as it is known to have a constant initializer and the class type is a POD class. Fixes <rdar://problem/9306265>. llvm-svn: 131060
* Modify some deleted function methods to better reflect reality:Alexis Hunt2011-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
* Add an implementation of thunks for varargs methods. The implementation is ↵Eli Friedman2011-05-061-5/+10
| | | | | | a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 . llvm-svn: 130993
* Implement support for C++0x alias templates.Richard Smith2011-05-051-0/+1
| | | | llvm-svn: 130953
* Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky2011-05-051-6/+6
| | | | | | foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
* Record where the GCOV data files should be placed.Nick Lewycky2011-05-041-0/+20
| | | | llvm-svn: 130866
* Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet2011-04-221-2/+6
| | | | | | | | | function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
* Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky2011-04-211-3/+6
| | | | | | | | | compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
OpenPOWER on IntegriCloud