DeLesley Hutchins
714296cb31
Support for thread safety attributes on functions
...
llvm-svn: 147331
2011-12-29 00:56:48 +00:00
Richard Smith
5fab0c9e1a
Small refactoring and simplification of constant evaluation and some of its
...
clients. No functionality change.
llvm-svn: 147318
2011-12-28 19:48:30 +00:00
Rafael Espindola
1510c8589e
Handle a /etc/debian_version with a version number instead of a codename.
...
Patch by Sylvestre Ledru. Fixes PR11673.
llvm-svn: 147313
2011-12-28 18:17:14 +00:00
Benjamin Kramer
cf5014771d
Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 with sse disabled.
...
x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD
to "2".
llvm-svn: 147311
2011-12-28 15:47:06 +00:00
Hans Wennborg
e5f554ac48
Support the 'a' scanf length modifier as an extension in C++.
...
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
2011-12-28 13:10:50 +00:00
Zhongxing Xu
86a68d078c
Enable the user to control whether CXXConstructExpr will be added as a
...
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
2011-12-28 04:38:46 +00:00
Douglas Gregor
deafd0b2a4
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
...
covers both declarations (@class ) and definitions (@interface) of an
Objective-C class.
llvm-svn: 147299
2011-12-27 22:43:10 +00:00
Rafael Espindola
0b79046c5c
Fix the visibility of methods of explicit template instantiation definition
...
when using -fvisibility-inlines-hidden. This matches gcc's behavior and
documentation.
Fixes PR11642.
llvm-svn: 147295
2011-12-27 21:15:28 +00:00
Richard Smith
6e52514c5d
constexpr: support for evaluation and codegen of typeid constants.
...
llvm-svn: 147290
2011-12-27 12:18:28 +00:00
Benjamin Kramer
c2c47f90a0
Initialize member that ends up in PCH files.
...
llvm-svn: 147288
2011-12-27 11:15:04 +00:00
Eli Friedman
2b081c2c9e
Partially revert r147195; lib/Basic/Version.cpp conditionally depends on config.h.
...
llvm-svn: 147282
2011-12-26 22:43:17 +00:00
Rafael Espindola
cde2c8f7d2
Delay checking of typedefs of dependent types. Fixes PR11630.
...
llvm-svn: 147281
2011-12-26 22:42:47 +00:00
Benjamin Kramer
eed4f2a6c5
Fix potential use after free.
...
llvm-svn: 147277
2011-12-26 14:18:37 +00:00
NAKAMURA Takumi
9a3f299f0e
clang/lib/Headers/CMakeLists.txt: Unbreak cmake build to add bmi2intrin.h since r147275.
...
llvm-svn: 147276
2011-12-26 03:20:06 +00:00
Craig Topper
c334dd68a7
Add BMI2 intrinsics.
...
llvm-svn: 147275
2011-12-26 02:31:10 +00:00
Richard Smith
f0215fe898
Fix constexpr handling to allow 'extern constexpr' variable declarations. We no
...
longer have access to the source locations we need to produce the
'replace constexpr with const' fixits, so they're gone for now.
llvm-svn: 147273
2011-12-25 21:17:58 +00:00
Richard Smith
771c4a1775
constexpr: perform zero-initialization prior to / instead of performing a
...
constructor call when appropriate. Thanks to Eli for spotting this.
llvm-svn: 147271
2011-12-25 20:00:17 +00:00
NAKAMURA Takumi
dceeeb8918
lib/Headers/CMakeLists.txt: Fix cmake build since r147263, for two missing headers.
...
llvm-svn: 147266
2011-12-25 12:47:46 +00:00
Craig Topper
a06d4a1c40
Add the rest of the BMI intrinsics.
...
llvm-svn: 147265
2011-12-25 07:27:12 +00:00
Craig Topper
f2855ade2b
Add intrinsics for lzcnt and tzcnt instructions.
...
llvm-svn: 147263
2011-12-25 06:25:37 +00:00
Craig Topper
22967d4a61
Add BMI, BMI2, and LZCNT feature flags to enable adding intrinsics.
...
llvm-svn: 147262
2011-12-25 05:06:45 +00:00
Rafael Espindola
65e025cad5
Remove unused variables.
...
llvm-svn: 147260
2011-12-25 01:18:52 +00:00
Richard Smith
966c1fb0c8
Always implicitly declare move assignment operations for dynamic classes, in
...
case they override virtual functions from a base class. Also fix -print-stats
counting of move assignment/construction.
llvm-svn: 147258
2011-12-24 21:56:24 +00:00
Craig Topper
175543ac78
Add last of the AVX2 intrinsics except for gather.
...
llvm-svn: 147253
2011-12-24 17:20:15 +00:00
Craig Topper
9f00948a82
Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in other intrinsic headers.
...
llvm-svn: 147241
2011-12-24 07:55:14 +00:00
Craig Topper
9479895928
Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.
...
llvm-svn: 147239
2011-12-24 05:19:29 +00:00
Craig Topper
a6fdbd1807
Intrinsics for AVX2 unpack instructions.
...
llvm-svn: 147237
2011-12-24 03:58:43 +00:00
Craig Topper
f4bb952533
More AVX2 intrinsics for shift, psign, some shuffles, and psadbw.
...
llvm-svn: 147236
2011-12-24 03:28:57 +00:00
Nico Weber
d3bdadf616
Fix several issues related to specializations and explicit instantiations.
...
Explicit instantiations following specializations are no-ops and hence have
no PointOfInstantiation. That was done correctly in most cases, but for a
specialization -> instantiation decl -> instantiation definition chain, the
definition didn't realize that it was a no-op. Fix that.
Also, when printing diagnostics for these no-ops, get the diag location from
the decl name location.
Add many test cases, one of them not yet passing (but it failed the same way
before this change). Fixes http://llvm.org/pr11558 and more.
llvm-svn: 147225
2011-12-23 20:58:04 +00:00
Anton Yartsev
9b6b2e5535
fix for PR11634
...
llvm-svn: 147224
2011-12-23 20:23:19 +00:00
Benjamin Kramer
3c6982b911
Give C11's __STDC_VERSION__ the final value.
...
llvm-svn: 147222
2011-12-23 17:00:41 +00:00
Benjamin Kramer
e56f393249
Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.
...
Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.
llvm-svn: 147221
2011-12-23 17:00:35 +00:00
Craig Topper
235a365d58
Add AVX2 multiply intrinsics.
...
llvm-svn: 147219
2011-12-23 08:31:16 +00:00
Dylan Noblesmith
e99b27f35e
Let CompilerInvocation initialization indicate failure
...
This fixes the FIXMEs in ParseAnalyzeArgs. (Also a
precursor to moving the analyzer into an AST plugin.)
For consistency, do the same with AssemblerInvocation.
llvm-svn: 147218
2011-12-23 03:05:38 +00:00
Argyrios Kyrtzidis
2644063ec9
Pass context and access to Parser::ParseExplicitInstantiation() for
...
good parser error recovery and for not crashing.
We still have a accepts-invalid-code bug.
llvm-svn: 147216
2011-12-23 02:16:45 +00:00
Fariborz Jahanian
87b4ae6cab
objective-c: Use class definition AST in several situations when
...
building related objc ASTs which require a class definition AST.
These were uncovered when testing objc rewriter.
llvm-svn: 147210
2011-12-23 00:31:02 +00:00
Douglas Gregor
8519c355a9
Remove spurious, but now legal, typename
...
llvm-svn: 147208
2011-12-23 00:27:08 +00:00
Douglas Gregor
fe76cfd89c
When building a module with an umbrella header, warn about any headers
...
found within that umbrella directory that were not actually included
by the umbrella header. They should either be referenced in the module
map or included by the umbrella header.
llvm-svn: 147207
2011-12-23 00:23:59 +00:00
Ted Kremenek
72be32af88
Colorize and condense CFG pretty-printing.
...
llvm-svn: 147203
2011-12-22 23:33:52 +00:00
Nico Weber
3cef10814a
Add -Wdangling-else.
...
This works like described in http://drdobbs.com/blogs/cpp/231602010
Fixes http://llvm.org/PR11609
llvm-svn: 147202
2011-12-22 23:26:17 +00:00
Dylan Noblesmith
1ced737ebf
remove unneeded config.h includes
...
llvm-svn: 147195
2011-12-22 22:49:47 +00:00
Douglas Gregor
852e6b7316
Make a note for an optimization that I'd like to implement, when the ASTs for local externs are sound
...
llvm-svn: 147185
2011-12-22 22:05:07 +00:00
Douglas Gregor
464b0ca61a
Serialize the AST reader's mapping from canonical declarations to the
...
set of (previously-canonical) declaration IDs to the module file, so
that future AST reader instances that load the module know which
declarations are merged. This is important in the fairly tricky case
where a declaration of an entity, e.g.,
@class X;
occurs before the import of a module that also declares that
entity. We merge the declarations, and record the fact that the
declaration of X loaded from the module was merged into the (now
canonical) declaration of X that we parsed.
llvm-svn: 147181
2011-12-22 21:40:42 +00:00
Nick Lewycky
097f47ce02
Fix build under -Wswitch by adding support for FK_ListConstructorOverloadFailed
...
to initialization sequence dumping.
llvm-svn: 147171
2011-12-22 20:21:32 +00:00
Douglas Gregor
0475cd88c9
If we end up merging an Objective-C class with an existing Objective-C
...
class that comes from a different module file, make sure that we load
all of the pending declarations for the original declaration.
llvm-svn: 147168
2011-12-22 19:44:59 +00:00
Kevin Enderby
292dc080e0
Last part of support for generating dwarf for assembly source files. This gets
...
the clang driver to enable this when assembling a .s file. rdar://9275556
llvm-svn: 147167
2011-12-22 19:31:58 +00:00
Sebastian Redl
6901c0de67
Overloading for initializer list construction.
...
llvm-svn: 147156
2011-12-22 18:58:38 +00:00
Sebastian Redl
867f228a55
Fix a parser bug that prevented it from correctly parsing explicit construct expressoins of the form T{args}.
...
llvm-svn: 147155
2011-12-22 18:58:29 +00:00
Sebastian Redl
ed2e53222f
List-initialization via constructor part 1. Still needs: pretty-printing, overloading, initializer_list.
...
llvm-svn: 147145
2011-12-22 14:44:04 +00:00
Craig Topper
1f2460ad43
Add AVX2 intrinsics for max, min, sign extend, and zero extend.
...
llvm-svn: 147141
2011-12-22 09:18:58 +00:00