summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/builtins.cpp
Commit message (Collapse)AuthorAgeFilesLines
* clang/test/CodeGenCXX/builtins.cpp: Fix for -Asserts.NAKAMURA Takumi2013-11-021-4/+3
| | | | | | | - Don't seek "entry:" It dosen't appear with -Asserts. - Take care that Codegen'ed Instruction(s) wouldn't have name(s) in -Asserts. llvm-svn: 193908
* Adding triple to lit test fixed in r193901Warren Hunt2013-11-021-4/+4
| | | | llvm-svn: 193902
* Fixes lit test that doesn't fail on windowsWarren Hunt2013-11-021-3/+3
| | | | | | | long in linux 64 is 64 bits but is always 32 bits on windows. The lit test was modified to use long long instead of long and check for 64-bit mangling. llvm-svn: 193901
* Wraps lazily generated builtins in an extern "C" contextWarren Hunt2013-11-011-0/+12
| | | | | | | | | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2082 Adds a lang_c LinkageSpecDecl to lazily generated builtins. This enforces correct behavior for builtins in a variety of cases without special treatment elsewhere within the compiler (special treatment is removed by the patch). It also allows for C++ overloads of builtin functions, which Microsoft uses in their headers e.g. _InterlockedExchangeAdd is an extern C builtin for the long type but an inline wrapper for int type. llvm-svn: 193896
* Add a __builtin_addressof that performs the same functionality as the built-inRichard Smith2013-07-111-0/+8
| | | | | | | | | | | & operator (ignoring any overloaded operator& for the type). The purpose of this builtin is for use in std::addressof, to allow it to be made constexpr; the existing implementation technique (reinterpret_cast to some reference type, take address, reinterpert_cast back) does not permit this because reinterpret_cast between reference types is not permitted in a constant expression in C++11 onwards. llvm-svn: 186053
* Permit ABIs where the caller extends the result (test change).Tim Northover2013-02-071-1/+1
| | | | | | | | | This test was written to make sure *something* sane is generated, not to test any ABI's signedness semantics. This should allow the test to pass if AArch64 is the default target. llvm-svn: 174618
* Change the representation of builtin functions in the ASTEli Friedman2012-08-311-12/+0
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* When extracting the callee declaration from a call expression, be sureDouglas Gregor2011-09-061-0/+12
| | | | | | | | | | to look through SubstNonTypeTemplateParmExprs. Then, update the IR generation of CallExprs to actually use CallExpr::getCalleeDecl() rather than attempting to mimick its behavior (badly). Fixes <rdar://problem/10063539>. llvm-svn: 139185
* In C++, if the user redeclares a builtin function with a type that isDouglas Gregor2010-12-211-0/+9
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
OpenPOWER on IntegriCloud