aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2014-04-25Don't align member functions.Dan Gohman
Emscripten uses the ARM ABI for pointers to member functions and doesn't require that member functions are aligned.
2014-04-25Introduce an Emscripten C++ ABI.Dan Gohman
Emscripten uses the Itanium C++ ABI for most things, except that it uses ARM C++ ABI pointers to member functions, to avoid the overhead of aligning functions.
2013-08-01Add the __nacl_atomic_is_lock_free builtinJF Bastien
This is part of a bigger CL to fix C++11 in PNaCl, to commit in the following order: - https://codereview.chromium.org/20552002 - https://codereview.chromium.org/20554002 - https://codereview.chromium.org/20560002 - https://codereview.chromium.org/20561002 This change is needed in Clang so that it can recognize the builtin and translate it to the intrinsic that 20554002 adds. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 TEST= ./scons run_synchronization_cpp11_test --verbose bitcode=1 platform=x86-64 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/20552002
2013-07-25Change __cyg_profile_func_enter/exit to __pnacl_profile... and change the ↵Robert Grosse
signature. __pnacl_profile_function_x takes a single argument - the name of the current function as a constant string, rather than a pair of function addresses like __cyg takes. This makes it work even in PNaCl and removes the need to track symbol information separately. BUG=none R=dschuff@chromium.org Review URL: https://codereview.chromium.org/20000003
2013-07-25Add a -finstrument-functions-size=n option to control basic blockRobert Grosse
filtering. If omitted entirely, the original behavior is restored. This also undos the string and __pnacl_profile stuff from the previous CL. Finally, it fixes and updates the -finstrument-function tests. BUG=none R=bradnelson@google.com, dschuff@chromium.org Review URL: https://codereview.chromium.org/19793007
2013-05-21Reverting r182337, which merged r182266, __declspec(selectany)Reid Kleckner
Was "Implement __declspec(selectany) under -fms-extensions ..." git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r181487:Bill Wendling
------------------------------------------------------------------------ r181487 | fjahanian | 2013-05-08 16:38:56 -0700 (Wed, 08 May 2013) | 4 lines put noisy "unknown command tag name" warning under -Wdocumentation-unknown-command and off by default. patch by Dmitri Gribenko. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182338 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r182266:Bill Wendling
------------------------------------------------------------------------ r182266 | rnk | 2013-05-20 07:02:37 -0700 (Mon, 20 May 2013) | 13 lines Implement __declspec(selectany) under -fms-extensions selectany only applies to externally visible global variables. It has the effect of making the data weak_odr. The MSDN docs suggest that unused definitions can only be dropped at linktime, so Clang uses weak instead of linkonce. MSVC optimizes away references to constant selectany data, so it must assume that there is only one definition, hence weak_odr. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D814 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182337 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17Merging r182072:Bill Wendling
------------------------------------------------------------------------ r182072 | rsmith | 2013-05-16 19:19:35 -0700 (Thu, 16 May 2013) | 6 lines PR15757: When we instantiate an inheriting constructor template, also instantiate the inherited constructor template and mark that as the constructor which the instantiated specialization is inheriting. This fixes a crash-on-valid when trying to compute the exception specification of a specialization of the inheriting constructor. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182150 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Grab-bag of bit-field fixes:John McCall
- References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Move PragmaCommentHandler to lib/Parse in preparation for calling SemaReid Kleckner
Summary: No functionality change. The existing tests for this pragma only verify that we can preprocess it. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D751 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181246 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Modify ASTReaderListener to allow visiting the input files of an AST file.Argyrios Kyrtzidis
We can pass such an input-file-visiting ASTReaderListener to ASTReader::readASTFileControlBlock. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Have the RecursiveASTVisitor traverse the type source info of an objc class ↵Argyrios Kyrtzidis
message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06[analyzer] Remove now-unused bindCompoundLiteral helper function.Jordan Rose
The one user has been changed to use getLValue on the compound literal expression and then use the normal bindLoc to assign a value. No need to special case this in the StoreManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Fix representation of compound literals for C++ objects with destructors.Jordan Rose
Previously, this compound literal expression (a GNU extension in C++): (AggregateWithDtor){1, 2} resulted in this AST: `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...]) `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the CompoundLiteralExpr, not an object in its own right. By introducing a new entity initialization kind in Sema specifically for compound literals, we avoid the treatment of the inner InitListExpr as a temporary. `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181212 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Add SystemZ supportUlrich Weigand
This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Allow targets to define minimum alignment for global variablesUlrich Weigand
This patch adds a new common code feature that allows platform code to request minimum alignment of global symbols. The background for this is that on SystemZ, the most efficient way to load addresses of global symbol is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction provides PC-relative addressing, but only to *even* addresses. For this reason, existing compilers will guarantee that global symbols are always aligned to at least 2. [ Since symbols would otherwise already use a default alignment based on their type, this will usually only affect global objects of character type or character arrays. ] GCC also allows creating symbols without that extra alignment by using explicit "aligned" attributes (which then need to be used on both definition and each use of the symbol). To enable support for this with Clang, this patch adds a TargetInfo::MinGlobalAlign variable that provides a global minimum for the alignment of every global object (unless overridden via explicit alignment attribute), and adds code to respect this setting. Within this patch, no platform actually sets the value to anything but the default 1, resulting in no change in behaviour on any existing target. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181210 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Added Mozilla style, cleaned get*Style methods.Alexander Kornienko
Summary: Patch based on a patch by Ehsan Akhgari. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D750 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Require the containing type to be complete when we seeJohn McCall
__alignof__ of a field. This problem can only happen in C++11. Also do some petty optimizations. rdar://13784901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181185 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05C++1y: support for increment and decrement in constant expression evaluation.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181173 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Make all 'is in extern "C"' tests use the lexical context.Rafael Espindola
I was not able to find a case (other than the fix in r181163) where this makes a difference, but it is a more obviously correct API to have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05ArrayRef'ize Sema::CheckObjCMethodCallDmitri Gribenko
Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05ArrayRef'ization of some methods in SemaOverload. Patch by Robert Wilhelm!Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181158 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef ↵Dmitri Gribenko
constructor from None Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Reverting r181004 since it has broken test/Sema/wchar.c.Aaron Ballman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181122 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181113 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04AArch64: teach Clang about __clear_cache intrinsicTim Northover
libgcc provides a __clear_cache intrinsic on AArch64, much like it does on 32-bit ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Implement most of N3638 (return type deduction for normal functions).Richard Smith
Missing (somewhat ironically) is support for the new deduction rules in lambda functions, plus PCH support for return type patching. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Say 'decltype(auto)' not 'auto' as appropriate in mismatched-deduction ↵Richard Smith
diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Implement template support for CapturedStmtWei Pan
- Sema tests added and CodeGen tests are pending Differential Revision: http://llvm-reviews.chandlerc.com/D728 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Added a function to check whether a Decl is inSean Callanan
the list of Decls for a given DeclContext. This is useful for LLDB's implementation of FindExternalLexicalDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04Separate out and special-case the diagnostic for 'auto' in aRichard Smith
conversion-type-id, in preparation for this becoming valid in c++1y mode. No functionality change; small diagnostic improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04[analyzer;alternate edges] start experimenting with control flow "barriers" ↵Ted Kremenek
to prevent an edge being optimized away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04[analyzer; alternate edges] prune edges whose end/begin locations have the ↵Ted Kremenek
same statement parents. This change required some minor changes to LocationContextMap to have it map from PathPieces to LocationContexts instead of PathDiagnosticCallPieces to LocationContexts. These changes are in the other diagnostic generation logic as well, but are functionally equivalent. Interestingly, this optimize requires delaying "cleanUpLocation()" until later; possibly after all edges have been optimized. This is because we need PathDiagnosticLocations to refer to the semantic entity (e.g. a statement) as long as possible. Raw source locations tell us nothing about the semantic relationship between two locations in a path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04[doc parsing]: Make warning about unknown commandFariborz Jahanian
tags off by default for now. Move diagnostic code to DiagnosticCommentKinds.td. // rdar://12381408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03ArrayRef'ize MultiLevelTemplateArgumentList::ArgList. Patch by Faisal Vali!Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Revert r177218.Argyrios Kyrtzidis
Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03[Doc parsing] Provide diagnostics for unknown documentation Fariborz Jahanian
commands. // rdar://12381408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181071 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Remove DiagnosticConsumer::clone(), a bad idea that is now unused.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181070 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03When building a module, forward diagnostics to the outer diagnostic consumer.Douglas Gregor
Previously, we would clone the current diagnostic consumer to produce a new diagnostic consumer to use when building a module. The problem here is that we end up losing diagnostics for important diagnostic consumers, such as serialized diagnostics (where we'd end up with two diagnostic consumers writing the same output file). With forwarding, the diagnostics from all of the different modules being built get forwarded to the one serialized-diagnostic consumer and are emitted in a sane way. Fixes <rdar://problem/13663996>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03[Preprocessor] For the MacroExpands preprocessor callback, also pass the ↵Argyrios Kyrtzidis
MacroArgs object that provides information about the argument tokens for a function macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Rename ObjCImplementationDecl::getSuperLoc() -> getSuperClassLoc() for ↵Argyrios Kyrtzidis
consistency with ObjCInterfaceDecl::getSuperClassLoc() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Serialization for captured statementsBen Langmuir
Add serialization for captured statements and captured decls. Also add a const_capture_iterator to CapturedStmt. Test contributed by Wei Pan Differential Revision: http://llvm-reviews.chandlerc.com/D727 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181048 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03PR15906: The body of a lambda is not an evaluated subexpression; don't visit ↵Richard Smith
it when visiting such subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Move CapturedStmt parameters to CapturedDeclBen Langmuir
Move the creation of CapturedStmt parameters out of CodeGen and into Sema, making it easier to customize the outlined function. The ImplicitParamDecls are stored in the CapturedDecl using an ASTContext-allocated array. Differential Revision: http://llvm-reviews.chandlerc.com/D722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03[analyzer] Start hacking up alternate control-flow edge generation. WIP. ↵Ted Kremenek
Not guaranteed to do anything useful yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181040 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Keep track of an @implementation's super class name location, if one was ↵Argyrios Kyrtzidis
provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181039 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03ArrayRef'ize InitializationSequence constructor and ↵Dmitri Gribenko
InitializationSequence::Diagnose() Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181022 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Add const qualifier to Sema::getTypeName's parameter `II`Dmitri Gribenko
Patch by Ismail Pazarbasi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Support __wchar_t in -fms-extensions and -fms-compatibility modes.Hans Wennborg
MSVC provides __wchar_t, either as an alias for the built-in wchar_t type, or as a separate type depending on language (C vs C++) and flags (-fno-wchar). In -fms-extensions, Clang will simply accept __wchar_t as an alias for whatever type is used for wide character literals. In -fms-compatibility, we try to mimic MSVC's behavior by always making __wchar_t a builtin type. This fixes PR15815. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181004 91177308-0d34-0410-b5e6-96231b3b80d8