summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix the required args count for variadic blocks.John McCall2012-12-071-4/+7
| | | | | | | | | | | | | | | | | We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation. llvm-svn: 169588
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-1/+3
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Don't use a varargs convention for calls unprototyped functions where one of ↵Eli Friedman2011-12-011-1/+2
| | | | | | the arguments is an AVX vector. llvm-svn: 145574
* ANSI C requires that a call to an unprototyped function type succeedJohn McCall2011-09-211-0/+35
| | | | | | | | | | | | | | | | | if the definition has a non-variadic prototype with compatible parameters. Therefore, the default rule for such calls must be to use a non-variadic convention. Achieve this by casting the callee to the function type with which it is required to be compatible, unless the target specifically opts out and insists that unprototyped calls should use the variadic rules. The only case of that I'm aware of is the x86-64 convention, which passes arguments the same way in both cases but also sets a small amount of extra information; here we seek to maintain compatibility with GCC, which does set this when calling an unprototyped function. Addresses PR10810 and PR10713. llvm-svn: 140241
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-301-1/+1
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-2/+3
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-111-3/+3
| | | | llvm-svn: 134893
* Automatic Reference Counting.John McCall2011-06-151-0/+14
| | | | | | | | | | 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
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-0/+9
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-9/+0
| | | | llvm-svn: 126050
* Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfoPeter Collingbourne2011-02-181-0/+9
| | | | llvm-svn: 125819
* Fix the IR generation for catching pointers by references.John McCall2010-07-201-0/+10
| | | | | | Fixes <rdar://problem/8212123>. llvm-svn: 108944
* Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),John McCall2010-03-061-0/+17
| | | | | | | and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all). llvm-svn: 97859
* Add proper target hooks for __builtin_extract_return_address andJohn McCall2010-03-031-0/+22
| | | | | | | __builtin_frob_return_address. The implementations for both are still trivial in the default case. llvm-svn: 97638
* Inspired by seeing "MIPS" go by in the commits, I've gone ahead andJohn McCall2010-03-021-0/+9
| | | | | | | | | | | implemented a (codegen) target hook for __builtin_extend_pointer. I'm also making it return a uint64_t instead of an unsigned word; this comports with typical usage (i.e. the one use I know of). I don't know if any of the existing targets requires this hook to be set (other than x86 and x86_64, which I know do not). llvm-svn: 97547
* Eliminate some Clang warningsDouglas Gregor2010-01-221-2/+2
| | | | llvm-svn: 94177
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-0/+50
1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
OpenPOWER on IntegriCloud