summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Under -fmodules, accept #public <macroname> and #private <macroname>Douglas Gregor2012-01-033-16/+24
| | | | | | | to make a macro public (the default for headers) or private, respectively. llvm-svn: 147455
* Introduce a non-uglified syntax for module imports in Objective-C:Douglas Gregor2012-01-036-21/+32
| | | | | | @import identifier [. identifier]* ; llvm-svn: 147452
* Don't attempt to merge a deserialized declaration with existingDouglas Gregor2012-01-031-0/+4
| | | | | | | declarations in the AST unless modules are enabled. This case doesn't come up with precompiled headers, and it isn't cheap. llvm-svn: 147451
* Factor the merging of declarations in the AST reader out to a separateDouglas Gregor2012-01-031-78/+48
| | | | | | | | member function template, since the behavior is identical for ObjCInterfaceDecl and ObjCProtocolDecl. It's expected that all redeclarable entities will have the same behavior. llvm-svn: 147450
* Add -fno-modules to the driver, to turn off modules (although they're off by ↵Douglas Gregor2012-01-031-2/+3
| | | | | | default anyway). llvm-svn: 147449
* Add a "Modules" language option, which subsumes the previousDouglas Gregor2012-01-034-8/+5
| | | | | | "AutoModuleImport" preprocessor option and is tied to -fmodules. llvm-svn: 147448
* Rename the command-line option for mapping #include/#import over toDouglas Gregor2012-01-032-2/+2
| | | | | | | | module imports from -fauto-module-import to -fmodules. The new name will eventually be used to enable modules, and the #include/#import mapping is a crucial part of the feature. llvm-svn: 147447
* Process attributes in explicit template instatiation definitions. Fixes PR11690.Rafael Espindola2012-01-031-0/+3
| | | | llvm-svn: 147441
* Teach the frontend to provide the builtin preprocessor defines forChandler Carruth2012-01-031-0/+3
| | | | | | -ffast-math. llvm-svn: 147440
* Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.Richard Smith2012-01-021-1/+1
| | | | | | | Add a test that such characters don't make it through to StringLiteral objects in error recovery. llvm-svn: 147438
* Diagnose cases where the definition of a particular type is required,Douglas Gregor2012-01-023-12/+52
| | | | | | | is known (to Clang), but is not visible because the module has not yet been imported. llvm-svn: 147436
* Fix PR11685 by implementing -ffast-math and its various friends in theChandler Carruth2012-01-023-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | | Clang driver. This involves a bunch of silly option parsing code to try to carefully emulate GCC's options. Currently, this takes a conservative approach, and unless all of the unsafe optimizations are enabled, none of them are. The fine grained control doesn't seem particularly useful. If it ever becomes useful, we can add that to LLVM first, and then expose it here. This also fixes a few tiny bugs in the flag management around -fhonor-infinities and -fhonor-nans; the flags now form proper sets both for enabling and disabling, with the last flag winning. I've also implemented a moderately terrifying GCC feature where a language change is also provided by the '-ffast-math' flag by defining the __FAST_MATH__ preprocessor macro. This feature is tracked and serialized in the frontend but it isn't used yet. A subsequent patch will add the preprocessor macro and tests for it. I've manually tested that codegen appears to respect this, but I've not dug in enough to see if there is an easy way to test codegen options w/o relying on the particulars of LLVM's optimizations. llvm-svn: 147434
* Added a missing case for -Wdisabled-macro-expansion.Abramo Bagnara2012-01-021-1/+3
| | | | llvm-svn: 147433
* Small cosmetic cleanups in code I will change anyway.Rafael Espindola2012-01-021-4/+4
| | | | llvm-svn: 147424
* Eliminate ObjCProtocolDecl's end-of-definition location. It is notDouglas Gregor2012-01-023-4/+0
| | | | | | used anywhere. llvm-svn: 147422
* Fix canonicalization of protocol-qualified typesDouglas Gregor2012-01-022-2/+14
| | | | llvm-svn: 147421
* Move ObjCProtocolDecl::EndLoc into its DefinitionData, and giveDouglas Gregor2012-01-023-3/+4
| | | | | | ObjCProtocolDecl proper source-range information. llvm-svn: 147420
* Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. ↵Douglas Gregor2012-01-015-22/+9
| | | | | | They are no longer needed llvm-svn: 147419
* Added -Wdisabled-macro-expansion warning.Abramo Bagnara2012-01-011-2/+5
| | | | llvm-svn: 147418
* Implement declaration merging for Objective-C protocols acrossDouglas Gregor2012-01-011-3/+45
| | | | | | | multiple, disjoint modules. There is far too much duplicating with the ObjCInterfaceDecl case here, which I'll eliminate shortly. llvm-svn: 147417
* Eliminate redundant, empty functionDouglas Gregor2012-01-011-2/+0
| | | | llvm-svn: 147416
* Eliminate ObjCForwardProtocolDecl, which is redundant now thatDouglas Gregor2012-01-0119-204/+90
| | | | | | ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
* Don't bother rewriting an Objective-C class or protocol declaration to the ↵Douglas Gregor2012-01-011-2/+0
| | | | | | module file when we've merely added a definition llvm-svn: 147414
* Eliminate ASTMutationListener::UpdatedAttributeList, which is noDouglas Gregor2012-01-012-13/+1
| | | | | | longer needed now that we aren't back-patching ObjCProtocolDecls. llvm-svn: 147413
* Wire up redeclaration chains for Objective-C protocols, so that bothDouglas Gregor2012-01-016-65/+89
| | | | | | | forward declarations and definitions of an Objective-C protocol are represented within a single chain of ObjCProtocolDecls. llvm-svn: 147412
* Introduce the core infrastructure needed to model redeclaration chainsDouglas Gregor2012-01-0110-13/+87
| | | | | | | | | | | | | | | for Objective-C protocols, including: - Using the first declaration as the canonical declaration - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and that we know which declaration is the definition - Serialization support for redeclaration chains and for adding definitions to already-serialized declarations. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCProtocolDecls. llvm-svn: 147410
* Move the data that corresponds to the definition of a protocol into aDouglas Gregor2012-01-018-50/+95
| | | | | | | | | separately-allocated DefinitionData structure. Introduce various functions that will help with the separation of declarations from definitions (isThisDeclarationADefinition(), hasDefinition(), getDefinition()). llvm-svn: 147408
* Use hasSameType.Rafael Espindola2012-01-011-2/+1
| | | | llvm-svn: 147407
* Use declaresSameEntity() when comparing ObjCProtocolDecls, andDouglas Gregor2012-01-012-8/+8
| | | | | | | getCanonicalDecl() when putting ObjCProtocolDecls into a set. This is groundwork for making ObjCProtocolDecl redeclarable. llvm-svn: 147406
* Consider visibility attributes in namespaces as being explicit. I.e., theyRafael Espindola2012-01-011-1/+1
| | | | | | take precedence over command line options. Fixes PR10113. llvm-svn: 147405
* Replace a isa+cast with a dyn_cast.Rafael Espindola2012-01-011-3/+3
| | | | llvm-svn: 147401
* Implement support for module requirements, which indicate the languageDouglas Gregor2011-12-319-21/+288
| | | | | | | | | features needed for a particular module to be available. This allows mixed-language modules, where certain headers only work under some language variants (e.g., in C++, std.tuple might only be available in C++11 mode). llvm-svn: 147387
* Fix crash when trying to pretty-print unicode or wide string literals.Richard Smith2011-12-301-8/+19
| | | | llvm-svn: 147385
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-303-58/+179
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* clang/lib/Headers/CMakeLists.txt: Unbreak cmake build.NAKAMURA Takumi2011-12-301-0/+1
| | | | llvm-svn: 147373
* Add FMA4 intrinsics.Craig Topper2011-12-302-0/+235
| | | | llvm-svn: 147372
* Remove an accidental change from r147370. Would only break if the new fma4 ↵Craig Topper2011-12-301-4/+0
| | | | | | flag was used. llvm-svn: 147371
* Add FMA4 feature flag. Intrinsics coming soon. Also make sse4a feature flag ↵Craig Topper2011-12-302-8/+30
| | | | | | imply sse3. Matches gcc behavior. llvm-svn: 147370
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-302-172/+52
| | | | llvm-svn: 147362
* Change the diagnostics which said 'accepted as an extension' to instead sayRichard Smith2011-12-296-14/+12
| | | | | | | 'is an extension'. The former is inappropriate and confusing when building with -Werror/-pedantic-errors. llvm-svn: 147357
* Unbreak cmake build after r147340.Richard Smith2011-12-291-0/+1
| | | | llvm-svn: 147355
* Add popcnt feature flag to match gcc. This flag is implied when sse42 is ↵Craig Topper2011-12-294-19/+72
| | | | | | enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc. llvm-svn: 147340
* Fix cmake build with -DBUILD_SHARED_LIBS=ON.Rafael Espindola2011-12-293-4/+4
| | | | llvm-svn: 147338
* Support for thread safety attributes on functionsDeLesley Hutchins2011-12-291-2/+5
| | | | llvm-svn: 147331
* Small refactoring and simplification of constant evaluation and some of itsRichard Smith2011-12-2810-112/+101
| | | | | | clients. No functionality change. llvm-svn: 147318
* Handle a /etc/debian_version with a version number instead of a codename.Rafael Espindola2011-12-281-2/+2
| | | | | | Patch by Sylvestre Ledru. Fixes PR11673. llvm-svn: 147313
* Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer2011-12-282-1/+5
| | | | | | | | | with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". llvm-svn: 147311
* Support the 'a' scanf length modifier as an extension in C++.Hans Wennborg2011-12-281-1/+1
| | | | | | | It should not be supported in C++11, since that uses the C99 standard library, in which 'a' is a format specifier. llvm-svn: 147310
* Enable the user to control whether CXXConstructExpr will be added as a Zhongxing Xu2011-12-281-1/+1
| | | | | | | | | | block-level expr. Currently CXXConstructExpr is always added as a block-level expr. This caused two problems for the analyzer (and potentially for the CFG-based codegen). 1. We have no way to know whether a ctor call is base or complete. 2. We have no way to know the destination object being contructed. llvm-svn: 147306
* Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor2011-12-2716-160/+47
| | | | | | | covers both declarations (@class) and definitions (@interface) of an Objective-C class. llvm-svn: 147299
OpenPOWER on IntegriCloud