aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/Builtins.def
AgeCommit message (Collapse)Author
2011-10-06llvm.memory.barrier is going away; remove the wrapper intrinsic ↵Eli Friedman
__builtin_llvm_memory_barrier. __atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge
annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08The frexp, modf, and remquo builtins are not 'const'.Jakob Stoklund Olesen
These functions return a second value by writing to a pointer argument, so they cannot be marked 'readnone' which implies that they don't access memory. <rdar://problem/10070234> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-27The lvalue-to-rvalue on structs in C++ is actually partJohn McCall
of default argument promotion and needs to happen unconditionally. This is particularly semantically important in C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138691 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-23objc - fix up the builtin type for objc_assign_ivar.Fariborz Jahanian
// rdar://9362887. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138412 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18Reapply r137903, but fix the definition of size_t in the test case to use ↵Ted Kremenek
__SIZE_TYPE__ (and hence be portable). Also, change the warning to -Wstrl-incorrect-size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137980 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18Revert r137903, "Add experimental -Wstrlcpy-size warning that looks to see ↵Ted Kremenek
if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now)." This currently doesn't work on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137920 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Add experimental -Wstrlcpy-size warning that looks to see if the size ↵Ted Kremenek
argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now). Warning logic provided by Geoff Keating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137903 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-10Change __debugbreak signature to void __debugbreak(void); MSVC compatibility.Francois Pichet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08Add codegen support for the fma/fmal/fmaf builtins.Cameron Zwarich
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-19Add support for MSVC __debugbreak compiler intrinsic.Francois Pichet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133372 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-09add a __sync_swap builtin to fill out the rest of the __sync builtins. Chris Lattner
Patch by Dave Zarzycki! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05Make this const, there's probably no harm in it and it silences a bunchEric Christopher
of warnings when passing const arguments into the function. Fixes PR9426 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26Provide a bit saying that a builtin undergoes custom type-checking, thenJohn McCall
don't let calls to such functions go down the normal type-checking path. Test this out with __builtin_classify_type and __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126539 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14Add support for the builtins used in gcc 4.4's <cmath> and <complex>Jeffrey Yasskin
headers in C++0x mode. Fixes PR9138. Patch by John Bytheway! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125492 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06add some missing builtins.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10Added remaining objective-c library builtins (as in gcc) toFariborz Jahanian
clang. // rdar://8735023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-30Add objc_getClass as an objc builtin functionFariborz Jahanian
(// rdar://8592641). Also rename LANGUAGEID to LanguageID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120437 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-30Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian
a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-25Basic: add log2{,f,l}, round{,f,l} builtinsPeter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120136 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09Restore patch reversed in r118475. FixesFariborz Jahanian
// rdar://8632525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09Reverse patch for // rdar://8632525. It mightFariborz Jahanian
has broken a build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08Provide a precise builtin declaration for objc_msgSendFariborz Jahanian
to avoid a bogus warning. Fixes //rdar: //8632525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12fix the definition of __builtin_constant_p, the first arg isn't a short.Chris Lattner
Patch by the "pax team" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11Add 2 Microsoft compiler intrinsics that don't require prototypes:Francois Pichet
__assume __noop git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-09Fixed __builtin_constant_p return type.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01move imperative code to declarative definitions.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01fix a bogus "I" that I added to the per-function attribute list.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Various builtins a require an integer constant. Not providingChris Lattner
one results in an obscure error from the backend that doesn't make sense. Capture this information in the .def files for builtins with a new "I" modifier letter indicating the an argument needs to be an ICE. Nothing uses this yet, but sema will eventually enforce this (eliminating some special cases from semachecking.cpp) and codegen will use this to force an ICE value, preventing backend error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16Basic: Add f{dim,ma,max,min}[lf]? builtins.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114068 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/8336581>.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112049 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16Fixed typo in conj, conjf, conjl signature.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28Make the pointer arguments to the __sync_* builtins pointers toDouglas Gregor
volatile-qualified types. Fixes <rdar://problem/8228293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-16Add builtin definition for scanf, including extending the builtin encoding toTed Kremenek
represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-16IRgen: Support user defined attributes on block runtime functions.Daniel Dunbar
- This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the target. This doesn't work in Clang because we aren't using the AST decl for these globals. - The fix is a pretty gross hack which just watches all the decls for the specific blocks globals we need to know about; if we see one we use it, otherwise we use the hand coded type. In time, I would like to clean this up by changing IRgen to ask Sema/AST for the decl, which would then be lazily loaded from the builtin table if necessary. This could be used in a whole host of places in IRgen and would get rid of a lot of grotty hand coding of LLVM IR; however, we need some extra Sema support for this as well as support for builtin global variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13Add __builtin_snprintf.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16Fixed conflict between objc_memmove_collectable builtin Fariborz Jahanian
decl. and one ddefined in darwin header file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15Patch adds support for copying of thoseFariborz Jahanian
objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20add __builtin_[r]index. Perhaps all LIBBUILTIN's should get Chris Lattner
these or something? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14add builtin for __builtin_vsprintf, patch by Paul DaveyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07Add support for stpncpy_chk.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25Remove support for nand atomic builtins. They are inconsistently implemented inDaniel Dunbar
gcc, and the common expectation seems to be that they are unused. If and when someone cares we can add them back with well documented demantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12Extend the builtin syntax to allow address-space qualifiers on pointers andJohn McCall
references. Based on a patch by Arnaud de Grandmaison! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06PR6515: Implement __builtin_signbit and friends.Eli Friedman
I'm reasonably sure my implementation is correct, but it would be nice if someone could double-check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02Inspired by seeing "MIPS" go by in the commits, I've gone ahead andJohn McCall
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02After much consultation aimed at figuring out what this builtin actuallyJohn McCall
does, document the results and then implement __builtin_extend_pointer for platforms where it's a no-op. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16mark __builtin_longjmp noreturn, PR6312Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15Add Sema support for __builtin_fpclassify by extending the existing check ↵Benjamin Kramer
for __builtin_isinf and friends. Part of PR6083. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Add builtins from PR5255. Implementations coming soon.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95894 91177308-0d34-0410-b5e6-96231b3b80d8