aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Builtins.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-07-04[OpenCL] Make OpenCL Builtins added according to the right version.Anastasia Stulova1-1/+2
Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have to be added only in the version 2.0 compilation mode to make the identifiers available for use in the other versions. Review: http://reviews.llvm.org/D20249 llvm-svn: 274509
2016-01-26Recommit: R258773 [OpenCL] Pipe builtin functionsXiuli Pan1-1/+2
Fix arc patch fuzz error. Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one approach would be to just generate calls that would always use generic types such as void*. This patch is based on bader's opencl support patch on SPIR-V branch. Reviewers: Anastasia, pekka.jaaskelainen Subscribers: keryell, bader, cfe-commits Differential Revision: http://reviews.llvm.org/D15914 llvm-svn: 258782
2016-01-26Revert "[OpenCL] Pipe builtin functions"David Majnemer1-2/+1
This reverts commit r258773, it broke the build bots: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/43853 llvm-svn: 258775
2016-01-26[OpenCL] Pipe builtin functionsXiuli Pan1-1/+2
Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one approach would be to just generate calls that would always use generic types such as void*. This patch is based on bader's opencl support patch on SPIR-V branch. Reviewers: Anastasia, pekka.jaaskelainen Subscribers: keryell, bader, cfe-commits Differential Revision: http://reviews.llvm.org/D15914 llvm-svn: 258773
2016-01-06[Driver] Add support for -fno-builtin-foo options.Chad Rosier1-2/+12
Addresses PR4941 and rdar://6756912. http://reviews.llvm.org/D15195 llvm-svn: 256937
2015-10-19Make getTargetBuiltins return an ArrayRef instead of having two out ↵Craig Topper1-15/+8
parameters of a pointer and length. NFC llvm-svn: 250681
2015-09-22[CUDA] Allow parsing of host and device code simultaneously.Artem Belevich1-3/+16
* adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 llvm-svn: 248299
2015-09-15Doxygen fix InitializeBuiltins -> initializeBuiltinsIsmail Donmez1-1/+1
llvm-svn: 247668
2015-09-14Test commitRachel Craik1-2/+2
Remove some trailing whitespace llvm-svn: 247560
2015-08-07Make sure the Features field of the Builtin Info struct is always ↵Craig Topper1-6/+5
initialized. Silences -Wmissing-field-initializers. While there convert 0 in the BUILTIN macros to nullptr. llvm-svn: 244307
2015-08-06Rename the non-coding style conformant functions in namespace BuiltinsEric Christopher1-9/+9
to match the rest of their brethren and reformat the bits that need it. llvm-svn: 244186
2015-08-05Remove unused header includes.Eric Christopher1-1/+0
llvm-svn: 244131
2015-08-05Rename builtin_lang -> Langs to match the rest of the code a bit better.Eric Christopher1-9/+10
llvm-svn: 244126
2015-08-05Remove unused function GetBuiltinNames.Eric Christopher1-13/+0
llvm-svn: 244125
2014-07-02CodeGen: make target builtins support languagesSaleem Abdulrasool1-1/+1
This extends the target builtin support to allow language specific annotations (i.e. LANGBUILTIN). This is to allow MSVC compatibility whilst retaining the ability to have EABI targets use a __builtin_ prefix. This is merely to allow uniformity in the EABI case where the unprefixed name is provided as an alias in the header. llvm-svn: 212196
2014-05-08[C++11] Use 'nullptr'.Craig Topper1-3/+3
llvm-svn: 208280
2014-01-03Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper ↵Aaron Ballman1-28/+23
function. The implementations are identical, except for the format arguments being searched for. No functional changes intended. llvm-svn: 198446
2013-11-13Only provide MS builtins when -fms-extensions is onReid Kleckner1-1/+4
We already have builtins that are only available in GNU mode, so this mirrors that. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2128 llvm-svn: 194615
2013-07-23Add a -fno-math-builtin option to the Clang -cc1Eli Bendersky1-3/+18
llvm-svn: 186899
2013-07-11Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.Eli Bendersky1-4/+3
llvm-svn: 186106
2013-05-31Disable non-standard library builtins in non-gnu language modes.Benjamin Kramer1-5/+4
Fixes PR16138. llvm-svn: 183015
2012-12-20Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling1-6/+6
which is wrong here. llvm-svn: 170721
2012-12-19Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling1-6/+6
single attribute in the future. llvm-svn: 170500
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-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
2012-02-04Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer1-0/+1
include. Fix all the transitive include users. llvm-svn: 149783
2011-09-01Allow the preprocessor to be constructed without performing target-Douglas Gregor1-2/+6
and language-specific initialization. Use this to allow ASTUnit to create a preprocessor object *before* loading the AST file. No actual functionality change. llvm-svn: 138983
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-1/+1
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-05Remove unused member of Builtin::Info.Eli Friedman1-15/+7
llvm-svn: 134443
2011-02-20Test commit.Richard Smith1-1/+0
llvm-svn: 126063
2010-12-21In C++, if the user redeclares a builtin function with a type that isDouglas Gregor1-0/+4
inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. llvm-svn: 122351
2010-11-30Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian1-7/+12
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. llvm-svn: 120429
2010-07-16Add builtin definition for scanf, including extending the builtin encoding toTed Kremenek1-0/+20
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. llvm-svn: 108499
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump1-9/+9
llvm-svn: 81346
2009-06-16follow-on to my patch: some targets (like sparc) do notChris Lattner1-0/+2
have target-specific builtins, and do not set the count. Just default to 0 for these targets. llvm-svn: 73510
2009-06-16my refactoring of builtins changed target-specific builtins to only beChris Lattner1-4/+5
registered when PCH wasn't being used. We should always install (in BuiltinInfo) information about target-specific builtins, but we shouldn't register any builtin identifier infos. This fixes the build of apps that use PCH and target specific builtins together. llvm-svn: 73492
2009-06-14Sink the BuiltinInfo object from ASTContext into theChris Lattner1-6/+4
preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. llvm-svn: 73319
2009-06-14move the various builtins stuff from libast to libbasic. ThisChris Lattner1-0/+94
fixes a layering violation in lib/Basic/Targets.cpp. llvm-svn: 73318