summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an ↵Ted Kremenek2011-10-081-0/+1
| | | | | | obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise. llvm-svn: 141479
* CUDA: add -fcuda-is-device flagPeter Collingbourne2011-10-061-0/+17
| | | | | | | This frontend-only flag is used by the IR generator to determine whether to filter CUDA declarations for the host or for the device. llvm-svn: 141301
* CUDA: IR generation support for kernel call expressionsPeter Collingbourne2011-10-061-3/+11
| | | | llvm-svn: 141300
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-031-2/+0
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Pass from the parser the locations of selector identifiers when creatingArgyrios Kyrtzidis2011-10-031-1/+4
| | | | | | | | objc method decls. They are not stored in the AST yet. llvm-svn: 140984
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-1/+21
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140478
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-191-3/+11
| | | | llvm-svn: 140068
* In apple-kext mode, use external linkage for explicit template instantiationsJohn McCall2011-09-191-2/+7
| | | | | | instead of internal linkage. llvm-svn: 140030
* Correctly generate IR for casted "builtin" functions, whereJohn McCall2011-09-131-30/+0
| | | | | | | the builtin is really just a predefined declaration. These are totally valid to cast. llvm-svn: 139657
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-131-2/+2
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge2011-09-091-61/+70
| | | | | | | annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. llvm-svn: 139423
* Treat the weak export of block runtime symbols as a deployment-targetJohn McCall2011-09-091-90/+0
| | | | | | | | feature akin to the ARC runtime checks. Removes a terrible hack where IR gen needed to find the declarations of those symbols in the translation unit. llvm-svn: 139404
* Do a lookup for the blocks runtime globals to see if they were declared,Argyrios Kyrtzidis2011-09-091-45/+36
| | | | | | | | | instead of codegen waiting to consume such a declaration, which won't happen if that decls are coming from a PCH. Fixes rdar://10028656. llvm-svn: 139359
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-11/+11
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Make sure we don't inline functions marked with __attribute__((naked)). ↵Eli Friedman2011-08-221-4/+9
| | | | | | <rdar://problem/9973228> llvm-svn: 138310
* Mark objc methods that are implicitly declared for properties (not ↵Argyrios Kyrtzidis2011-08-171-3/+9
| | | | | | | | user-declared) as implicit. This results in libclang ignoring such methods. llvm-svn: 137852
* Finalize debug info after all deferred globals are emitted.Devang Patel2011-08-161-2/+3
| | | | llvm-svn: 137750
* 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
OpenPOWER on IntegriCloud