Alexis Hunt
9fcdabe20f
Comment Attr.td so people have a better understanding of what goes on.
...
Also removed the unused Aliases member.
llvm-svn: 106202
2010-06-17 01:51:32 +00:00
Ted Kremenek
98008a47a0
Fix format string checking of '%c' by treating it as an integer conversion. Fixes PR 7391.
...
llvm-svn: 106196
2010-06-17 01:12:20 +00:00
Ted Kremenek
24c8e4f245
Per conversation with Doug, remove two assertions in ParseLexedMethodDefs() that
...
didn't indicate violated invariants but that we weren't recovering well.
llvm-svn: 106195
2010-06-17 00:59:17 +00:00
Alexis Hunt
849bccafe0
Fix yet another CMake typo. I'm not quite sure how this succeeded locally now.
...
llvm-svn: 106193
2010-06-17 00:51:27 +00:00
Alexis Hunt
367f638f04
Fix a typo in the previous commit I thought I'd fixed, but apparently didn't.
...
llvm-svn: 106189
2010-06-17 00:42:32 +00:00
Alexis Hunt
c675ec09f0
Update CMake build for new attribute changes.
...
llvm-svn: 106188
2010-06-17 00:37:02 +00:00
Ted Kremenek
17504bea33
Rework StackAddrLeakChecker to find stores of stack memory addresses to global variables
...
by inspecting the Store bindings instead of iterating over all the global variables
in a translation unit. By looking at the store directly, we avoid cases where we cannot
directly load from the global variable, such as an array (which can result in an assertion failure)
and it also catches cases where we store stack addresses to non-scalar globals.
Also, but not iterating over all the globals in the translation unit, we maintain cache
locality, and the complexity of the checker becomes restricted to the complexity of the
analyzed function, and doesn't scale with the size of the translation unit.
This fixes PR 7383.
llvm-svn: 106184
2010-06-17 00:24:44 +00:00
Ted Kremenek
648ef7a2d7
Implement RegionStoreManager::iterBindings(). This implementation only returns the base region in
...
the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most
clients will likely only care about simple bindings, or bindings to a particular variable. We can
refine later if necessary.
llvm-svn: 106183
2010-06-17 00:24:42 +00:00
Ted Kremenek
70c090822d
Correctly return early from BasicStoreManager::iterBindings() when the BindingsHandler returns false.
...
llvm-svn: 106182
2010-06-17 00:24:37 +00:00
Douglas Gregor
428119e39a
When parsing cached C++ method declarations/definitions, save the
...
"previous token" location at the end of the class definition. This
eliminates a badly-placed error + Fix-It when the ';' following a
class definition is missing. Fixes <rdar://problem/8066414>.
llvm-svn: 106175
2010-06-16 23:45:56 +00:00
Alexis Hunt
344393e9cf
Implement first TD-based usage of attributes.
...
Currently, there are two effective changes:
- Attr::Kind has been changed to attr::Kind, in a separate namespace
rather than the Attr class. This is because the enumerator needs to
be visible to parse.
- The class definitions for the C++0x attributes other than aligned are
generated by TableGen.
The specific classes generated by TableGen are controlled by an array in
TableGen (see the accompanying commit to the LLVM repository). I will be
expanding the amount of code generated as I develop the new attributes system
while initially keeping it confined to these attributes.
llvm-svn: 106172
2010-06-16 23:43:53 +00:00
Douglas Gregor
13d0568ecc
Make the "extra ';' inside a struct or union" diagnostic more
...
precise. Fixes PR7336.
llvm-svn: 106170
2010-06-16 23:08:59 +00:00
Douglas Gregor
bb1196534c
When we see a 'template' disambiguator that marks the next identifier
...
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.
llvm-svn: 106167
2010-06-16 23:00:59 +00:00
Douglas Gregor
f7d7771812
Fix the recently-added warning about 'typename' and 'template'
...
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.
llvm-svn: 106161
2010-06-16 22:31:08 +00:00
Ted Kremenek
64c235e4c6
Extend format string type-checking to include '%p'. Fixes remaining cases PR 4468.
...
llvm-svn: 106151
2010-06-16 21:23:04 +00:00
Douglas Gregor
7dbfb46163
Canonicalize template template parameters when canonicalizing a
...
template name that refers to such a parameter. It's amazing that this
problem didn't surface earlier. Fixes PR7387.
llvm-svn: 106147
2010-06-16 21:09:37 +00:00
Daniel Dunbar
aa2d0ceaa9
tests: Update Frontend config to actually run ir-support tests.
...
llvm-svn: 106144
2010-06-16 20:04:36 +00:00
Fariborz Jahanian
18e0275033
C return types must be complete as well.
...
Moved check before we build the ObjCMessageExpr node.
(PR7386 related).
llvm-svn: 106139
2010-06-16 19:56:08 +00:00
Rafael Espindola
23a8a06554
Change the test for which ABI/CC to use on ARM to be base on the environment
...
(the last argument of the triple).
llvm-svn: 106131
2010-06-16 19:01:17 +00:00
Fariborz Jahanian
1d44608cc1
Make sure result type of objc++ message expression is
...
complete before attempting to bind it to a temporary.
Fixes PR7386.
llvm-svn: 106130
2010-06-16 18:56:04 +00:00
Rafael Espindola
ad64acde72
A a new test for my previous patch.
...
llvm-svn: 106120
2010-06-16 18:02:31 +00:00
Rafael Espindola
b35e7b8659
Fix tests that I missed from my previous commit.
...
llvm-svn: 106118
2010-06-16 17:49:52 +00:00
Zhanyong Wan
644346b182
Test commit by adding a blank comment line.
...
llvm-svn: 106114
2010-06-16 17:21:03 +00:00
Daniel Dunbar
7c995e8fac
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
...
llvm-svn: 106113
2010-06-16 16:59:23 +00:00
Daniel Dunbar
26036fd722
Driver: Ignore -ffast-math and -f[no-]finite-math-only.
...
llvm-svn: 106112
2010-06-16 16:59:17 +00:00
Douglas Gregor
94584683fa
Don't poke at an undefined class type of a field. Fixes PR7355.
...
llvm-svn: 106111
2010-06-16 16:54:04 +00:00
Douglas Gregor
010815a20b
Downgrade the error when using a typedef in the nested-name-specifier
...
of an explicit instantiation to an ExtWarn, since nobody else seems to
diagnose this problem.
llvm-svn: 106109
2010-06-16 16:26:47 +00:00
Douglas Gregor
f56055aee3
Add Cygwin C++ header search path.
...
llvm-svn: 106108
2010-06-16 16:24:51 +00:00
Fariborz Jahanian
4a30307840
Fixed conflict between objc_memmove_collectable builtin
...
decl. and one ddefined in darwin header file.
llvm-svn: 106107
2010-06-16 16:22:04 +00:00
Rafael Espindola
a92c442437
Don't set the calling convention for ARM if it is already the default.
...
llvm-svn: 106106
2010-06-16 16:13:39 +00:00
Douglas Gregor
1c69bf00ae
If a non-dependent base class initializer fails to match any direct or
...
virtual base class, but the class still has dependent base classes,
then don't diagnose the failed match as an error: the right base class
might magically appear. Fixes PR7259.
llvm-svn: 106103
2010-06-16 16:03:14 +00:00
Douglas Gregor
9938e3b11b
Add some missing parentheses, from Anton Yartsev
...
llvm-svn: 106101
2010-06-16 15:28:57 +00:00
Douglas Gregor
2ebcae1931
Revert r106099; it broke self-host.
...
llvm-svn: 106100
2010-06-16 15:23:05 +00:00
Abramo Bagnara
bec18dbb88
Added TemplateTypeParmType::getDecl().
...
llvm-svn: 106099
2010-06-16 14:59:30 +00:00
John McCall
be829868e1
Rework the unqualified-lookup-in-templates section of the compatibility
...
document. jyasskin, let me know if this meets your needs.
llvm-svn: 106098
2010-06-16 10:48:16 +00:00
John McCall
38e5f433b2
Fix the build. Using declarations should not be considering when looking
...
for overridden virtual methods.
llvm-svn: 106096
2010-06-16 09:33:39 +00:00
John McCall
89d57ae436
Some more nods to HTML well-formedness.
...
llvm-svn: 106094
2010-06-16 08:48:08 +00:00
John McCall
e9cccd86da
Fix a point of semantics with using declaration hiding: method templates
...
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids. Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types. You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093
2010-06-16 08:42:20 +00:00
Zhongxing Xu
abd60dd1fc
We return Loc where we know.
...
llvm-svn: 106087
2010-06-16 06:16:46 +00:00
Zhongxing Xu
7880db8a89
Typo.
...
llvm-svn: 106086
2010-06-16 05:58:35 +00:00
Zhongxing Xu
b4126ee133
Although arguments can not be undefined when we get here, they can still be
...
unknown.
llvm-svn: 106085
2010-06-16 05:56:39 +00:00
Zhongxing Xu
9fe7e9129b
Cast earlier. We know we can get a DefinedSVal.
...
llvm-svn: 106084
2010-06-16 05:52:03 +00:00
Zhongxing Xu
8225bda0d5
Register CallAndMessageChecker before AttrNonNullChecker. Then we can assume
...
arguments are not undefined.
llvm-svn: 106083
2010-06-16 05:45:09 +00:00
Zhongxing Xu
0fa7cddbab
Add StreamChecker. This checker models and checks stream manipulation functions.
...
This is the start.
llvm-svn: 106082
2010-06-16 05:38:05 +00:00
Charles Davis
89338af1ff
Start mangling function types in the Microsoft C++ Mangler.
...
llvm-svn: 106081
2010-06-16 05:33:16 +00:00
Jeffrey Yasskin
babff2ce56
Fix template ordering compatibility docs. I missed another section that covered
...
the same thing.
llvm-svn: 106076
2010-06-16 01:12:12 +00:00
Douglas Gregor
6972a62c8f
Give Type::isIntegralType() an ASTContext parameter, so that it
...
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.
Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).
llvm-svn: 106074
2010-06-16 00:35:25 +00:00
Douglas Gregor
b90df60b3b
Introduce Type::isIntegralOrEnumerationType(), to cover those places
...
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.
llvm-svn: 106071
2010-06-16 00:17:44 +00:00
Fariborz Jahanian
00bdca561a
Workaround a possible VS C++ bug.
...
llvm-svn: 106070
2010-06-16 00:16:38 +00:00
Jeffrey Yasskin
0952ea77ee
Describe a gcc compatibility problem that occurs when a template calls a
...
function defined between its declaration and an instantiation, and that
function isn't findable through ADL.
llvm-svn: 106068
2010-06-15 23:50:08 +00:00
Fariborz Jahanian
56d3b8c578
Moved objective-c++ code gen. tests to their own directory and
...
added a new test case (related to radar 8070772).
llvm-svn: 106067
2010-06-15 23:49:10 +00:00
Chandler Carruth
8509824cdb
Move CodeGenOptions.h *back* into Frontend. This should have been done when the
...
dependency edge was reversed such that CodeGen depends on Frontend.
llvm-svn: 106065
2010-06-15 23:19:56 +00:00
Fariborz Jahanian
021510e96f
Patch adds support for copying of those
...
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).
llvm-svn: 106061
2010-06-15 22:44:06 +00:00
Douglas Gregor
f267edd8ac
Update equality and relationship comparisons of pointers to reflect
...
C++ semantics, eliminating an extension diagnostic that doesn't match
C++ semantics (ordered comparison with NULL) and tightening some
extwarns to errors in C++ to match GCC and maintain conformance in
SFINAE contexts. Fixes <rdar://problem/7941392>.
llvm-svn: 106050
2010-06-15 21:38:40 +00:00
Chris Lattner
bba37f4dea
fix the various buildbot failures by ensuring that tokens are really completely initialized.
...
llvm-svn: 106043
2010-06-15 21:06:38 +00:00
Douglas Gregor
c4827d31aa
Remove a completely useless and utterly incorrect assertion.
...
llvm-svn: 106040
2010-06-15 20:38:36 +00:00
Daniel Dunbar
3648ba756f
Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(
...
llvm-svn: 106039
2010-06-15 20:30:18 +00:00
Douglas Gregor
9858ed5b69
Teach code completion not to ignore data members when performing code
...
completion for expressions.
llvm-svn: 106037
2010-06-15 20:26:51 +00:00
Chris Lattner
58efac6120
add a testcase, from Michael Spencer
...
llvm-svn: 106026
2010-06-15 18:56:20 +00:00
Chris Lattner
4e18a2bc97
fix an uninitialized variable, patch by Michael Spencer!
...
llvm-svn: 106025
2010-06-15 18:55:23 +00:00
Chris Lattner
c548be9ab3
Remove a dead argument to ProcessUCNEscape.
...
Fix string concatenation to treat escapes in concatenated strings that
are wide because of other string chunks to process the escapes as wide
themselves. Before we would warn about and miscompile the attached testcase.
This fixes rdar://8040728 - miscompile + warning: hex escape sequence out of range
llvm-svn: 106012
2010-06-15 18:06:43 +00:00
Chris Lattner
a8687ae490
tidy up
...
llvm-svn: 106011
2010-06-15 18:05:34 +00:00
Daniel Dunbar
c1b1729b66
Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
...
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
llvm-svn: 106010
2010-06-15 17:48:49 +00:00
Douglas Gregor
20527e2c83
Allocate template parameter lists for out-of-line definitions via the
...
ASTContext rather than via the normal heap.
llvm-svn: 106008
2010-06-15 17:44:38 +00:00
Douglas Gregor
0832963acd
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
...
llvm-svn: 106003
2010-06-15 17:05:35 +00:00
Daniel Dunbar
e9c5e2cc71
Driver/FreeBSD: Add libexec to program search paths, to workaround some build
...
problem; patch by Ed Schouten.
llvm-svn: 105996
2010-06-15 15:03:31 +00:00
Daniel Dunbar
be65fe860b
Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
...
llvm-svn: 105995
2010-06-15 14:50:52 +00:00
Benjamin Kramer
ad36eb2911
Fix typo.
...
llvm-svn: 105993
2010-06-15 08:21:35 +00:00
Nick Lewycky
a2fb98bfda
When analyzing for member self-assignment, don't attempt to dereference null
...
Stmt* such as those which occur in ?: . Fixes PR7378.
Also, generally whip the code into shape fixing several coding style violations.
llvm-svn: 105992
2010-06-15 07:32:55 +00:00
Alexis Hunt
0684e33ba5
MinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
...
won't define it unless specifically requested via the use of __need_wint_t.
llvm-svn: 105985
2010-06-15 02:36:48 +00:00
Ted Kremenek
4c721bf892
Change AnalysisConsumer to analyze functions created by instantiantiating a macro. Fixes PR 7361.
...
llvm-svn: 105984
2010-06-15 00:55:40 +00:00
Chris Lattner
c7ed7ea390
fix the inline asm diagnostics to emit the error on the primary
...
source code location instead of on the note. Previously we generated:
<inline asm>:1:2: error: unrecognized instruction
barf
^
t.c:4:8: note: generated from here
asm ("barf");
^
Now we generate:
t.c:4:8: error: unrecognized instruction
asm ("barf");
^
<inline asm>:1:2: note: instantated into assembly here
barf
^
llvm-svn: 105978
2010-06-15 00:03:12 +00:00
Douglas Gregor
4f6e8deec4
Make sure to set the visible on a vtable; VTTs and typeinfo already
...
handle visibility properly. Fixes <rdar://problem/8091955>.
llvm-svn: 105977
2010-06-14 23:41:45 +00:00
Douglas Gregor
1726d1517e
Add name mangling for address spaces. We use the vendor-extension
...
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).
llvm-svn: 105975
2010-06-14 23:15:08 +00:00
Douglas Gregor
c9d2682df3
Warn when a 'typename' or a 'template' keyword refers to a
...
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.
llvm-svn: 105968
2010-06-14 22:07:54 +00:00
Daniel Dunbar
5a9d1835be
Driver: Fix PR4062 by dissecting one particular -Wp, form.
...
llvm-svn: 105966
2010-06-14 21:37:09 +00:00
Daniel Dunbar
fb3d747fc6
Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
...
collect2 option that is passed by some projects (notably WebKit).
llvm-svn: 105964
2010-06-14 21:23:12 +00:00
Daniel Dunbar
3f1a1ffd95
Driver: Eliminate uses of Arg::getIndex.
...
Also, fix a memory leak.
llvm-svn: 105963
2010-06-14 21:23:08 +00:00
Douglas Gregor
067ad670b1
Put warnings about designated initializations overridding prior
...
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com , fixes
PR6934!
llvm-svn: 105961
2010-06-14 21:15:09 +00:00
Daniel Dunbar
5714fc5e8b
Driver: Fix refacto in DerivedArgList::MakeSeparateArg.
...
llvm-svn: 105958
2010-06-14 20:20:44 +00:00
Daniel Dunbar
2d6e9ee033
Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.
...
llvm-svn: 105957
2010-06-14 20:20:41 +00:00
Douglas Gregor
7d14ffc6ef
Teach TemplateDecl::getSourceRange() to cover the entire declaration,
...
from Peter Collingbourne!
llvm-svn: 105951
2010-06-14 20:02:51 +00:00
Chris Lattner
48eb14dd79
Fix:
...
Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions]
VarDecl *LastTentative = false;
^
RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false'
[-Wbool-conversions]
return false;
^
llvm-svn: 105946
2010-06-14 18:31:46 +00:00
Benjamin Kramer
c0b8f3bc53
Enable basic testing of __builtin_fpclassify.
...
llvm-svn: 105937
2010-06-14 10:41:45 +00:00
Benjamin Kramer
7039fcbc5d
An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.
...
llvm-svn: 105936
2010-06-14 10:30:41 +00:00
Charles Davis
2d7b10cc97
Microsoft C++ Mangler:
...
- Mangle qualifiers.
- Start mangling variables' types into the name. A variable declared with a
builtin type should now mangle properly.
llvm-svn: 105931
2010-06-14 05:29:01 +00:00
Nate Begeman
91e1feab7a
Add some missing shifts
...
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td
llvm-svn: 105930
2010-06-14 05:21:25 +00:00
Daniel Dunbar
9886f71db7
www: Swap external coverage & spec references links.
...
llvm-svn: 105925
2010-06-13 21:07:10 +00:00
Anders Carlsson
cc59cc5d80
Do the same short-circuit optimization when laying out bases.
...
llvm-svn: 105920
2010-06-13 18:00:18 +00:00
Anders Carlsson
ae111dc821
Implement part of the EmptySubobjectMap optimization described in PR6998. We still need to do this for bases.
...
llvm-svn: 105919
2010-06-13 17:49:16 +00:00
John McCall
30576cdce3
TemplateSpecializationType's isCurrentInstantiation bit can be derived
...
from its canonical type.
llvm-svn: 105912
2010-06-13 09:25:03 +00:00
Chris Lattner
f3d3b36870
Allow an asm label specifier on C++ methods, like GCC does.
...
Patch by David Majnemer!
llvm-svn: 105909
2010-06-13 05:34:18 +00:00
Nate Begeman
d773fe67dd
Most of NEON sema checking & fix to polynomial type detection
...
llvm-svn: 105908
2010-06-13 04:47:52 +00:00
Chris Lattner
fa04338f38
don't make libclang depend on codegen. Patch by Peter Collingbourne!
...
llvm-svn: 105901
2010-06-12 22:54:45 +00:00
Charles Davis
63c0a744f7
Really make the Itanium C++ ABI the default.
...
llvm-svn: 105893
2010-06-12 16:58:00 +00:00
Chris Lattner
bc6bcabc61
fix PR7360: -P mode turns off line markers, but not blank space.
...
Apparently some programs which abuse the preprocessor depend
on this.
llvm-svn: 105889
2010-06-12 16:20:56 +00:00
Abramo Bagnara
da41d0cf5b
Added template parameters info for out-of-line definitions of class template methods.
...
llvm-svn: 105882
2010-06-12 08:15:14 +00:00
Charles Davis
7dacc95299
Microsoft C++ Mangler:
...
- Don't mangle static variables at global scope.
- Add support for mangling builtin types. This will be used later.
llvm-svn: 105881
2010-06-12 08:11:16 +00:00
Abramo Bagnara
8075c85230
Don't omit class explicit instantiation from AST.
...
llvm-svn: 105880
2010-06-12 07:44:57 +00:00
Nate Begeman
c6ac0ce89f
Shifts complete. Only vld & sema checking of constants remain.
...
llvm-svn: 105879
2010-06-12 06:06:07 +00:00
Nate Begeman
dd715805ab
vbsl, vrev* is implemented via arm_neon.h
...
llvm-svn: 105875
2010-06-12 03:11:41 +00:00
John McCall
45d30c3e36
When deciding whether an expression has the boolean nature, don't look through
...
explicit casts. Fixes PR7359.
llvm-svn: 105871
2010-06-12 01:56:02 +00:00
Argyrios Kyrtzidis
9116717189
Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.
...
llvm-svn: 105852
2010-06-11 23:09:25 +00:00
Nate Begeman
8ed060b95a
Most of remaining builtins, 2 generics, vld, and rounding shfits remain.
...
llvm-svn: 105848
2010-06-11 22:57:12 +00:00
Daniel Dunbar
af8decbde0
Driver: Switch Compilation to return the translated arguments by default.
...
llvm-svn: 105844
2010-06-11 22:43:38 +00:00
Chris Lattner
d0df9a40a3
add a -W flag.
...
llvm-svn: 105843
2010-06-11 22:10:09 +00:00
Daniel Dunbar
775d406043
Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.
...
llvm-svn: 105842
2010-06-11 22:00:26 +00:00
Daniel Dunbar
5c5d30b03a
Driver: Get rid of the proxy support in DerivedArgList.
...
llvm-svn: 105841
2010-06-11 22:00:22 +00:00
Daniel Dunbar
18974bdc68
Fix a couple comments.
...
llvm-svn: 105840
2010-06-11 22:00:19 +00:00
Daniel Dunbar
7c9e4306af
Driver: Change OptTable::ParseArg to take any ArgList.
...
llvm-svn: 105839
2010-06-11 22:00:17 +00:00
Daniel Dunbar
a442fd5da6
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
...
llvm-svn: 105838
2010-06-11 22:00:13 +00:00
Daniel Dunbar
d839e77b12
Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
...
llvm-svn: 105830
2010-06-11 20:10:12 +00:00
Chris Lattner
90987eebfd
preprocessor directives in macro arguments aren't standard,
...
hopefully this unbreaks msvc
llvm-svn: 105826
2010-06-11 19:50:37 +00:00
Craig Silverstein
0ea0b0a7ea
Add a few FIXMEs: recursing over shadow decls, and semantics vs
...
syntactic iterating over initializer exprs. No functional change.
llvm-svn: 105825
2010-06-11 18:08:47 +00:00
John McCall
875679eea0
Fix the constant evaluator for AltiVec-style vector literals so that the
...
vector is filled with the given constant; we were just initializing the
first element.
llvm-svn: 105824
2010-06-11 17:54:15 +00:00
John McCall
b86a6b830e
Allow pseudo-destructors to be called on qualified pointers. Patch by
...
Troy Straszheim!
llvm-svn: 105823
2010-06-11 17:36:40 +00:00
John McCall
773cc98c3a
Don't store ASTContext references in the TST nodes just to support profiling.
...
llvm-svn: 105820
2010-06-11 11:07:21 +00:00
John McCall
dad856dba3
Provide an Objective C mangling for wchar_t. Patch by Nico Weber!
...
llvm-svn: 105818
2010-06-11 10:11:05 +00:00
John McCall
6d1116ac49
Conversions from Objective C object pointers to bool are "pointer conversions
...
to bool" in the sense of C++ [over.ics.rank]p4 bullet 1. I have decreed it.
llvm-svn: 105817
2010-06-11 10:04:22 +00:00
Jeffrey Yasskin
5d474d0a96
Fix the 64-bit build. operator<<(DiagnosticBuilder, long) doesn't exist, so
...
ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and
unsigned int overloads.
llvm-svn: 105816
2010-06-11 06:58:43 +00:00
Jeffrey Yasskin
2b99c6fc4f
Add an option -fshow-overloads=best|all to limit the number of overload
...
candidates printed. We default to 'all'. At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.
llvm-svn: 105815
2010-06-11 05:57:47 +00:00
Charles Davis
b6a5a0d9e1
When mangling for the Microsoft C++ ABI, mangle variables in the global
...
namespace, too.
llvm-svn: 105809
2010-06-11 04:25:47 +00:00
Tom Care
00554634db
Small fixes regarding printf fix suggestions.
...
- Added some handling of flags that become invalid when changing the conversion specifier.
- Changed fixit behavior to remove unnecessary length modifiers.
- Separated some tests out and added some comments.
modified:
lib/Analysis/PrintfFormatString.cpp
test/Sema/format-strings-fixit.c
llvm-svn: 105807
2010-06-11 04:22:02 +00:00
Charles Davis
9af2d4a614
Start implementing the Microsoft-style name mangler. Mangle simple names
...
(but not their types; that's later).
NOTE: Right now, variables in the global namespace don't get mangled, even
though they're supposed to be. This is because the default mangler
implements the shouldMangleDeclName() method that tells clang not to mangle
them. This will be fixed in a later patch.
llvm-svn: 105805
2010-06-11 03:07:32 +00:00
Charles Davis
95a546ee4d
Add an option to specify the target C++ ABI to the frontend. Use it to
...
select either the default Itanium ABI or the new, experimental Microsoft ABI.
llvm-svn: 105804
2010-06-11 01:06:47 +00:00
Chandler Carruth
437416c06b
Improve readability with TRY_TO, remove a redundant comment, and fix one aspect
...
of the recursion on VarDecls. Patch by Craig Silverstein.
llvm-svn: 105803
2010-06-11 01:00:06 +00:00
John McCall
c392f37ae8
Split DependentNameType into two types. DependentNameType represents the
...
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.
Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.
llvm-svn: 105801
2010-06-11 00:33:02 +00:00
John McCall
d85248be7a
Provide a method to clear the current state of a TypeLocBuilder.
...
llvm-svn: 105800
2010-06-11 00:26:38 +00:00
Chandler Carruth
c27ee0fd29
Avoid repeating the list of operators twice in RecursiveASTVisitor through
...
a set of preprocessor macros. Patch by Zhanyong Wan.
llvm-svn: 105796
2010-06-10 23:29:40 +00:00
Chandler Carruth
6c816770db
Tweak a comment on the visitor to clarify one order of visit issue. Patch from
...
Zhanyong Wan.
llvm-svn: 105795
2010-06-10 23:27:51 +00:00
Nate Begeman
e0935ffa50
Multiplies, some shifts, set_lane
...
llvm-svn: 105793
2010-06-10 18:11:55 +00:00
Daniel Dunbar
40e640c8df
www: Add note on running clang tests from a CMake build, patch by Peter Collingbourne
...
llvm-svn: 105791
2010-06-10 17:01:45 +00:00
Daniel Dunbar
1d3c2fa9be
Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.
...
llvm-svn: 105789
2010-06-10 15:53:17 +00:00
Chandler Carruth
c65667c8ba
Another chunk of the new RecursiveASTVisitor implementation: switch the return
...
value semantics such that we recurse while the visitors return true, and halt
as soon as one returns false. Patch by csilvers.
llvm-svn: 105787
2010-06-10 10:31:57 +00:00
Rafael Espindola
ad8fed53ff
Create a LinuxTargetInfo on ARM. This make clang correctly expand
...
__USER_LABEL_PREFIX__.
llvm-svn: 105771
2010-06-10 00:46:51 +00:00
Nate Begeman
4a04b467d9
support _lane ops, and multiplies by scalar.
...
llvm-svn: 105770
2010-06-10 00:17:56 +00:00
Charles Davis
74ce85980b
Add a stub Microsoft Visual C++ ABI class (with stub mangler).
...
llvm-svn: 105767
2010-06-09 23:25:41 +00:00
Daniel Dunbar
ed8f06e860
tests: Update test for previous change.
...
llvm-svn: 105766
2010-06-09 23:24:59 +00:00
Daniel Dunbar
ca1282b971
Driver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".
...
llvm-svn: 105765
2010-06-09 23:20:37 +00:00
Daniel Dunbar
89cad2309b
Driver: Eliminate flags on aliases, they are unnecessary (and unused).
...
llvm-svn: 105764
2010-06-09 23:20:34 +00:00
Daniel Dunbar
bfe71f2416
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105763
2010-06-09 22:44:34 +00:00
Daniel Dunbar
35cbfeba8f
Driver: Eliminate Arg subclasses, which are now unnecessary.
...
llvm-svn: 105762
2010-06-09 22:31:08 +00:00
Daniel Dunbar
8b77f73314
Driver: Keep the rendering style in the option, instead of as part of the Arg.
...
llvm-svn: 105761
2010-06-09 22:31:04 +00:00
Daniel Dunbar
8f1ebabaf7
Driver: Change Arg to just hold the values directly, instead of implicitly
...
deriving them from the Arg type.
llvm-svn: 105760
2010-06-09 22:31:00 +00:00
Daniel Dunbar
0bcb62dc30
Frontend: Fix crashes on error paths.
...
llvm-svn: 105759
2010-06-09 22:30:54 +00:00
Sebastian Redl
c3eba8f547
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const.
...
llvm-svn: 105752
2010-06-09 21:19:43 +00:00
Sebastian Redl
243d9057d0
Fix two typos in comments.
...
llvm-svn: 105751
2010-06-09 21:17:41 +00:00
Daniel Dunbar
c656d3e111
Revert "Driver: Change Option parsing to always create arguments referring to
...
unaliased", this isn't quite right yet.
llvm-svn: 105747
2010-06-09 19:27:07 +00:00
Daniel Dunbar
aea0620b89
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105744
2010-06-09 19:19:01 +00:00
Daniel Dunbar
26a95c6717
Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
...
they can be independent of the exact option that created them.
llvm-svn: 105739
2010-06-09 18:49:38 +00:00
Daniel Dunbar
d96e279f02
Driver: Change Arg::render methods to use option name instead of string where
...
possible.
llvm-svn: 105738
2010-06-09 18:49:31 +00:00
Nate Begeman
d90aa43bdf
Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
...
Make note about how to handle the dozen or so multiply by scalar ops.
llvm-svn: 105734
2010-06-09 18:04:15 +00:00
Abramo Bagnara
656e300f03
Added inherited info to template and non-type arguments of templates.
...
llvm-svn: 105716
2010-06-09 09:26:05 +00:00
Chandler Carruth
af80f66997
Major redesign of the RecursiveASTVisitor. This implements the majority of the
...
new design discussed on cfe-dev, with further steps in that direction to come.
It is already much more complete than the previous visitor.
Patch by Zhanyong and Craig with 80 column wraps and one missing declaration
added by me.
llvm-svn: 105709
2010-06-09 08:17:30 +00:00
Chandler Carruth
b52b9100bf
Remove an entry for a now deleted file. Fixes the neglected CMake build. ;]
...
llvm-svn: 105708
2010-06-09 08:12:12 +00:00
John McCall
a5dd326ca5
Correctly handle > 257 substitutions in a single mangling, and don't introduce
...
a spurious substitution for an unscoped dependent template-id after introducing
a substitution for the scoped template-id.
llvm-svn: 105699
2010-06-09 07:26:17 +00:00
Zhongxing Xu
1225aacacf
Merge StackAddrLeakChecker and ReturnStackAddressChecker.
...
llvm-svn: 105687
2010-06-09 06:08:24 +00:00
Zhongxing Xu
4200be5e76
Directly compare the StackFrameContext. This greatly simplifies logic and
...
improves generality. Thanks Ted.
llvm-svn: 105686
2010-06-09 05:50:38 +00:00
Nate Begeman
4307a25545
More accurate BuiltinsARM.def
...
vget_lane support
llvm-svn: 105684
2010-06-09 05:30:26 +00:00
Douglas Gregor
b4e3533ce1
Fix a typo that breaks the GCC build. Turns out that Clang isn't
...
diagnosing this code as an error when it should, so I've filed
http://llvm.org/bugs/show_bug.cgi?id=7325 .
llvm-svn: 105683
2010-06-09 05:25:34 +00:00
Tom Care
b704270779
Added FixIt support to printf format string checking.
...
- Refactored LengthModifier to be a class.
- Added toString methods in all member classes of FormatSpecifier.
- FixIt suggestions keep user specified flags unless incorrect.
Limitations:
- The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation.
A test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp
llvm-svn: 105680
2010-06-09 04:11:11 +00:00
Douglas Gregor
1fc3d66da4
Tweak our handling of the notion of a standard conversion sequence
...
being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.
llvm-svn: 105678
2010-06-09 03:53:18 +00:00
Rafael Espindola
6bb986d530
Simplify the code a bit and avoid a gcc waring about uninitialized variables.
...
llvm-svn: 105676
2010-06-09 03:48:40 +00:00
Anders Carlsson
635186a8c4
Get rid of getMangledCXXCtorName and getMangledCXXDtorName.
...
llvm-svn: 105673
2010-06-09 02:36:32 +00:00
Anders Carlsson
09b5fe68ab
More mangling cleanup.
...
llvm-svn: 105672
2010-06-09 02:30:12 +00:00
Anders Carlsson
d4ce4e4bc0
Get rid of an unnecessary getMangledName overload.
...
llvm-svn: 105671
2010-06-09 02:20:01 +00:00
Rafael Espindola
9cdbd9dc08
Fix a gcc warning.
...
llvm-svn: 105670
2010-06-09 02:17:08 +00:00
Anders Carlsson
13f7c7dd77
Fix test.
...
llvm-svn: 105668
2010-06-09 01:42:52 +00:00
Nate Begeman
5548309fa7
Implement transpose/zip/unzip & table lookup.
...
Test out some basic constant-checking.
llvm-svn: 105667
2010-06-09 01:10:23 +00:00
Tom Care
32a2229070
Added helper function to Type class to determine if a type is a builtin type. This complements the existing function that determines if a type is a specific builtin type.
...
Modified:
include/clang/AST/Type.h
llvm-svn: 105664
2010-06-09 00:15:39 +00:00
Anders Carlsson
642da419a6
Try to fix buildbot tests.
...
llvm-svn: 105660
2010-06-08 23:10:20 +00:00
Ted Kremenek
076baeb03e
Fix memory leak in ASTContext where ASTRecordLayout objects involving C++ structures wouldn't have
...
their associated memory destroyed when using a BumpPtrAllocator. These objects internally use
a DenseMap.
llvm-svn: 105659
2010-06-08 23:00:58 +00:00
Ted Kremenek
dea66e3e4c
Fix memory leak in Preprocessor where MacroInfo objects in the MICache wouldn't have their
...
associated SmallVectors get deallocated.
llvm-svn: 105658
2010-06-08 23:00:53 +00:00
Jordy Rose
954238366b
Code cleanup: remove explicit flush() in favor of using the ostream's str()
...
llvm-svn: 105657
2010-06-08 22:59:01 +00:00
Anders Carlsson
044cab3325
Add test case.
...
llvm-svn: 105651
2010-06-08 22:48:02 +00:00
Anders Carlsson
851318a93a
On Darwin, initialization and destruction functions should go into the __StaticInit section.
...
llvm-svn: 105650
2010-06-08 22:47:50 +00:00
Anders Carlsson
b2839e4aa1
Add a global CreateGlobalInitOrDestructFunction and use it for creating global init or destruction functions.
...
llvm-svn: 105649
2010-06-08 22:40:05 +00:00
Anders Carlsson
9eb101c5d3
Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.
...
llvm-svn: 105648
2010-06-08 22:30:17 +00:00
Anders Carlsson
282bc10eaa
Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.
...
llvm-svn: 105647
2010-06-08 22:17:27 +00:00
Anders Carlsson
165ec0a04f
Simplify GenerateCXXAggrDestructorHelper.
...
llvm-svn: 105646
2010-06-08 22:14:59 +00:00
Daniel Dunbar
40fee6313d
Globally disable -fno-strict-aliasing, for reasons given in the comment.
...
llvm-svn: 105644
2010-06-08 21:55:02 +00:00
Douglas Gregor
6f2e095f06
When referring to a tag that was previously declared only as a friend,
...
build a new declaration for that tag type that will be visible for
future lookups of that tag.
llvm-svn: 105643
2010-06-08 21:27:36 +00:00
Douglas Gregor
ce21919bd6
A built-in overload candidate is consider a non-template function when
...
determining whether one overload candidate is better than
another. Fixes PR7319.
llvm-svn: 105642
2010-06-08 21:03:17 +00:00
Fariborz Jahanian
3b83618054
Block Code Gen. API. Call destructor on descriptior
...
entry previously constructed via copy constructor.
llvm-svn: 105641
2010-06-08 20:57:22 +00:00
Daniel Dunbar
d04e1a7ef1
Makefiles: Remove unnecessary early include of Makefile.config.
...
llvm-svn: 105640
2010-06-08 20:57:22 +00:00
Daniel Dunbar
5d02e0bd8a
Simplify libIndex Makefile, which doesn't need to worry about altivec support.
...
llvm-svn: 105639
2010-06-08 20:57:18 +00:00
Daniel Dunbar
ee6b692551
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
...
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar
e6c1daa8fd
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
...
- This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637
2010-06-08 20:34:18 +00:00
Anders Carlsson
e26754184e
Update Xcode project.
...
llvm-svn: 105633
2010-06-08 20:02:04 +00:00
Douglas Gregor
ec170db73d
Warn about comparisons between arrays and improve self-comparison
...
warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631
2010-06-08 19:50:34 +00:00
Douglas Gregor
61b5ff5ab4
Teach the PrintFunctionNames example to be a proper module, so that
...
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.
llvm-svn: 105630
2010-06-08 19:23:49 +00:00
Anders Carlsson
446872069f
Correctly handle fields with virtual bases containing empty subobjects.
...
llvm-svn: 105628
2010-06-08 19:09:24 +00:00
Ted Kremenek
e869a182c2
Add ccc-analyzer support for '-imacros'. Fixes PR 7204.
...
llvm-svn: 105624
2010-06-08 18:27:55 +00:00
Fariborz Jahanian
8e73928f52
Fixes a typo which prevented proper code gen. for
...
copy-in of c++ class objects into blocks.
llvm-svn: 105622
2010-06-08 17:52:11 +00:00
Douglas Gregor
4038cf4b57
Implement a warning when converting the literal 'false' to a
...
pointer. Original patch by Troy D. Straszheim; fixes PR7283.
llvm-svn: 105621
2010-06-08 17:35:15 +00:00
Anders Carlsson
45c1d2898e
When checking whether we can place a base subobject at an offset, we don't need to go past the highest offset that's known to contain an empty base subobject.
...
llvm-svn: 105611
2010-06-08 16:20:35 +00:00
Anders Carlsson
cc5de097a6
Minor cleanups to the empty subobject map.
...
llvm-svn: 105608
2010-06-08 15:56:03 +00:00
Daniel Dunbar
6311731341
Update LINK_COMPONENTS for examples.
...
llvm-svn: 105607
2010-06-08 15:38:01 +00:00
Anders Carlsson
248704c517
Correctly mangle static variables of anonymous struct/union type.
...
llvm-svn: 105606
2010-06-08 14:49:03 +00:00
Benjamin Kramer
0591124608
Token is POD-like.
...
llvm-svn: 105604
2010-06-08 11:23:26 +00:00
Zhongxing Xu
87e7fc5dc2
Add a checker check if a global variable holds a local variable's address after
...
the function call is left where the local variable is declared.
llvm-svn: 105602
2010-06-08 10:00:00 +00:00
Nate Begeman
ae6b1d8010
Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file
...
llvm-svn: 105599
2010-06-08 06:03:01 +00:00
Jeffrey Yasskin
460aa54d0a
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.
...
llvm-svn: 105597
2010-06-08 04:56:20 +00:00
Rafael Espindola
2569885963
Add a test to the previous commit.
...
llvm-svn: 105596
2010-06-08 03:59:28 +00:00
Rafael Espindola
895e51de4a
Fix what looks like a merge problem that broke __clear_cache.
...
llvm-svn: 105595
2010-06-08 03:52:53 +00:00
Rafael Espindola
85dc7e0909
Add test for previous commit.
...
llvm-svn: 105594
2010-06-08 03:29:31 +00:00
Nate Begeman
4904e32d46
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules.
...
llvm-svn: 105593
2010-06-08 02:47:44 +00:00
Rafael Espindola
bbd44ef673
Fix passing and returning of objects with non trivial copy constructors on
...
ARM.
Fixes PR7310.
llvm-svn: 105592
2010-06-08 02:42:08 +00:00
Nate Begeman
16372afeab
Implement ARM NEON up through vcvt, alphabetically.
...
llvm-svn: 105590
2010-06-08 00:17:19 +00:00
Nate Begeman
a011002195
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.
...
llvm-svn: 105589
2010-06-08 00:16:34 +00:00
Daniel Dunbar
24e52992c0
Driver: Support invoking Clang on .ll or .bc inputs.
...
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar
6f8362c6bf
Frontend: Add CodeGenAction support for handling LLVM IR.
...
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.
For example, 'llvm-as' is:
$ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
$ clang -cc1 -emit-llvm FOO.bc -o -
and 'opt' is, e.g.:
$ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
$ clang -cc1 -S -o - FOO.ll
The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).
llvm-svn: 105583
2010-06-07 23:27:59 +00:00
Daniel Dunbar
9507f9cc05
Frontend: Add FrontendAction support for handling LLVM IR inputs.
...
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
llvm-svn: 105582
2010-06-07 23:26:47 +00:00
Daniel Dunbar
fcb2e6ddea
FrontendAction: Track active file kind.
...
llvm-svn: 105581
2010-06-07 23:25:49 +00:00
Daniel Dunbar
fa6214c952
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
llvm-svn: 105580
2010-06-07 23:24:43 +00:00
Daniel Dunbar
aed46fcbe9
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
llvm-svn: 105579
2010-06-07 23:23:50 +00:00
Daniel Dunbar
8654638b23
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
llvm-svn: 105578
2010-06-07 23:23:06 +00:00
Daniel Dunbar
9b491e79fc
Frontend: Lift InputKind enumeration to top level.
...
llvm-svn: 105577
2010-06-07 23:22:09 +00:00
Daniel Dunbar
3e11152de3
Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
...
create modules which have target data strings.
llvm-svn: 105576
2010-06-07 23:21:04 +00:00
Daniel Dunbar
f976d1b205
Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.
...
llvm-svn: 105575
2010-06-07 23:20:08 +00:00
Daniel Dunbar
6d5824f5bf
Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.
...
llvm-svn: 105574
2010-06-07 23:19:17 +00:00
Fariborz Jahanian
be21aa34a0
When using property-dot assignment syntax to call a setter method,
...
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560
2010-06-07 22:02:01 +00:00
Fariborz Jahanian
a2d7c34e93
Fixed a block regression caused by trying to use
...
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
2010-06-07 19:39:39 +00:00
Jordy Rose
3597b21f20
Catch free()s on non-regions and regions known to be not from malloc(), by checking the symbol type and memory space.
...
llvm-svn: 105547
2010-06-07 19:32:37 +00:00
Rafael Espindola
a54062ef0c
Implement __clear_cache on ARM.
...
llvm-svn: 105537
2010-06-07 17:26:50 +00:00
Fariborz Jahanian
28ed927ddf
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
...
created temporary. Use own initialized entity for copied in block
variables.
llvm-svn: 105533
2010-06-07 16:14:00 +00:00
Nate Begeman
5968eb270a
weekend checkpoint of arm neon builtins codegen.
...
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.
llvm-svn: 105532
2010-06-07 16:01:56 +00:00
Jeffrey Yasskin
caa710dfd2
PR7245: Make binding a reference to a temporary without a usable copy
...
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
2010-06-07 15:58:05 +00:00
John McCall
cb0f89a434
Simplify the methods for creating a pointer, reference, member-pointer,
...
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.
llvm-svn: 105526
2010-06-05 06:41:15 +00:00
Abramo Bagnara
d73405829b
Added AccessSpecDecl node.
...
llvm-svn: 105525
2010-06-05 05:09:32 +00:00
Jeffrey Yasskin
2f96e9f5c9
Add an extension to avoid an error when a global template has the same name as
...
a member template, and you try to call the member template with an explicit
template argument. See PR7247
For example, this downgrades the error to a warning in:
template<typename T> struct set{};
struct Value {
template<typename T>
void set(T value) {
}
};
void foo() {
Value v;
v.set<double>(3.2); // Warning here.
}
llvm-svn: 105518
2010-06-05 01:39:57 +00:00
Devang Patel
6ccba0fb6e
Preserve type info for local variables in optimized builds.
...
llvm-gcc enabled this couple of weeks ago.
llvm-svn: 105516
2010-06-05 01:14:40 +00:00
John McCall
8cb7bdfd33
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
...
This is never null, but the associated type might be.
llvm-svn: 105503
2010-06-04 23:28:52 +00:00
Rafael Espindola
e971b9a260
Correctly align large arrays in x86-64. This fixes PR5599.
...
llvm-svn: 105500
2010-06-04 23:15:27 +00:00
Anders Carlsson
76f513f862
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.
...
llvm-svn: 105494
2010-06-04 22:47:55 +00:00
John McCall
a3cecb628f
Add indexing support for the block and @property type location information
...
I just implemented.
llvm-svn: 105491
2010-06-04 22:33:30 +00:00
Nate Begeman
6736cc89d0
Initial support for ARM NEON builtins, codegen up next
...
llvm-svn: 105489
2010-06-04 21:36:27 +00:00
Fariborz Jahanian
ea882cd92e
Build AST for copy-construction of copied-in
...
class object in blocks and carry it to IRGen.
llvm-svn: 105487
2010-06-04 21:35:44 +00:00
John McCall
339bb66246
Remember type source information for Objective C property declarations.
...
llvm-svn: 105484
2010-06-04 20:50:08 +00:00
Fariborz Jahanian
9643399ef0
Added a field to BlockDeclRefExpr for future use.
...
No functionality change yet.
llvm-svn: 105479
2010-06-04 19:06:53 +00:00
John McCall
8e346702b6
Preserve more information from a block's original function declarator, if one
...
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle
typedef'ed function types until such time as we decide not.
llvm-svn: 105478
2010-06-04 19:02:56 +00:00
Daniel Dunbar
7f3d95054b
Driver: Change -dwarf-debug-flags option to pass the original command line
...
arguments after translation, instead of the -cc1 level arguments.
llvm-svn: 105476
2010-06-04 18:47:06 +00:00
Daniel Dunbar
6beaf5110f
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
...
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.
llvm-svn: 105475
2010-06-04 18:28:41 +00:00
Daniel Dunbar
8829962030
Driver: Add an explicit dsymutil action.
...
llvm-svn: 105474
2010-06-04 18:28:36 +00:00
Fariborz Jahanian
64176c2c97
For C++ copied in objects, use copy constructors in
...
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.
llvm-svn: 105469
2010-06-04 16:10:00 +00:00
Rafael Espindola
92eb2cbbef
Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
...
moves us further.
llvm-svn: 105468
2010-06-04 14:28:10 +00:00
John McCall
a3ccba0417
Restructure how we interpret block-literal declarators. Correctly handle
...
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
2010-06-04 11:21:44 +00:00
Abramo Bagnara
52d6350dd2
Don't insert in lexical context implicit definitions of static member instances.
...
llvm-svn: 105465
2010-06-04 09:35:39 +00:00
Douglas Gregor
2e87ca218f
When checking for equality of template parameter lists, a template
...
type parameter pack is distinct from a template type parameter.
llvm-svn: 105464
2010-06-04 08:34:32 +00:00
John McCall
b1cd7dac3d
Delay checking for mutable const fields until we're checking the field.
...
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.
llvm-svn: 105463
2010-06-04 08:34:12 +00:00