Commit Graph

85322 Commits

Author SHA1 Message Date
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
Owen Anderson 836af6bb36 Fix comment, per Chris' suggestion.
llvm-svn: 106192
2010-06-17 00:51:12 +00:00
Eric Christopher 93f16372f9 Update comment.
llvm-svn: 106191
2010-06-17 00:49:46 +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
Howard Hinnant 70505305c1 Just getting our toes wet on <regex>
llvm-svn: 106187
2010-06-17 00:34:59 +00:00
Sean Callanan a68c1a2188 Unstick the -r option for the disassemble command.
llvm-svn: 106186
2010-06-17 00:32:05 +00:00
Bruno Cardoso Lopes 4d1d798736 For a tablegen expression such as !if(a,b,c), let 'a'
be evaluated for 'bit' operators

llvm-svn: 106185
2010-06-17 00:31:36 +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
Alexis Hunt 0f184c0328 Fix the typo in my previous one-line commit.
llvm-svn: 106179
2010-06-17 00:10:16 +00:00
Alexis Hunt 873f7aff62 Make sure CMake can build the files added by my previous commit.
llvm-svn: 106178
2010-06-16 23:52: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 842eb0905e Add preliminary clang attribute generation support.
The attribute class generation support is still somewhat limited.
See the accompanying clang commit for more details.

llvm-svn: 106174
2010-06-16 23:45:50 +00:00
Jim Grosbach e3864cc15e format and 80-column cleanup
llvm-svn: 106173
2010-06-16 23:45:49 +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
Bruno Cardoso Lopes 77a4a56251 let the '!eq' expression support 'int' and 'bit' types
llvm-svn: 106171
2010-06-16 23:24:12 +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
Jim Grosbach e94f1ded24 remove trailing whitespace
llvm-svn: 106164
2010-06-16 22:41:09 +00:00
Douglas Gregor 1e69f3c7be Revert r106117, which was the result of me misreading the C++98/03
specification.

llvm-svn: 106162
2010-06-16 22:32:18 +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
Sean Callanan d50c96a002 Fixed a problem where invalid triples were being passed
into the constructor for the LLVMDisassembler, resulting
in asserts.

llvm-svn: 106160
2010-06-16 22:19:05 +00:00
Jakob Stoklund Olesen 2334144e6e Don't attempt preserving conservative kill flags. We were doing it wrong.
This is before LiveVariables anyway, where these kill flags are recalculated.

llvm-svn: 106157
2010-06-16 22:11:08 +00:00
Bob Wilson 01ac8f9fc0 Remove the hidden "neon-reg-sequence" option. The reg sequences are working
now, so there's no need to disable them.

llvm-svn: 106155
2010-06-16 21:34:01 +00:00
Eric Christopher 74892d4f1f In progress on 32-bit addends.
llvm-svn: 106154
2010-06-16 21:32:38 +00:00
Jakob Stoklund Olesen 207cd4bbd7 Allow a register to be redefined multiple times in a basic block.
LiveVariableAnalysis was a bit picky about a register only being redefined once,
but that really isn't necessary.

Here is an example of chained INSERT_SUBREGs that we can handle now:

68      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1028<kill>, 14
                register: %reg1040 +[70,134:0)
76      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1029<kill>, 13
                register: %reg1040 replace range with [70,78:1) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,134:0)  0@78-(134) 1@70-(78)
84      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1030<kill>, 12
                register: %reg1040 replace range with [78,86:2) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,134:0)  0@86-(134) 1@70-(78) 2@78-(86)
92      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1031<kill>, 11
                register: %reg1040 replace range with [86,94:3) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,94:3)[94,134:0)  0@94-(134) 1@70-(78) 2@78-(86) 3@86-(94)

rdar://problem/8096390

llvm-svn: 106152
2010-06-16 21:29:40 +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
Jim Grosbach fd3b4e7390 A few more places where SCEVExpander bits need to skip over debug intrinsics
when iterating through instructions. Yet more work for rdar://7797940

llvm-svn: 106149
2010-06-16 21:13:38 +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
Jim Grosbach 2c8b829238 modify so the test doesn't drop an output file in the test source directory.
The test should also likely have some FileCheck bits to validate the
output(?).

llvm-svn: 106146
2010-06-16 21:07:06 +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
Daniel Dunbar ede8e6d2f0 MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.
- This allows sharing more code with the MCObjectStreamer.

llvm-svn: 106143
2010-06-16 20:04:32 +00:00
Daniel Dunbar aa627c39e4 MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
llvm-svn: 106142
2010-06-16 20:04:29 +00:00
Daniel Dunbar b2347fe504 MC: Lift SwitchSection() and Finish() into MCObjectStreamer.
llvm-svn: 106141
2010-06-16 20:04:25 +00:00
Daniel Dunbar 8a3c9d9bc4 MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
object file format writers.

llvm-svn: 106140
2010-06-16 20:04:22 +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
Devang Patel 79b0da30fb Be specific. Use FileCheck.
llvm-svn: 106135
2010-06-16 19:39:45 +00:00
Rafael Espindola a20e2dfe86 Make sure that simplify libcalls does not replace a call with one calling
convention with a new call with a different calling convention.

llvm-svn: 106134
2010-06-16 19:34:01 +00:00
Johnny Chen 22ce5b62b0 Fixed a typo in comment.
llvm-svn: 106133
2010-06-16 19:30:20 +00:00
Caroline Tice d6ac38485b Parameterize the shell scripts for creating and copying the python and
other script files around, so they can be run from outside Xcode.  Also,
check the current OS, and only try to use the framework structure stuff on
Darwin systems.

llvm-svn: 106132
2010-06-16 19:26:52 +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
Jim Grosbach 6c0da25129 add FIXME
llvm-svn: 106126
2010-06-16 18:45:08 +00:00
Devang Patel e3721dd27c This requires more investigation. Unblock buildbots for now.
llvm-svn: 106122
2010-06-16 18:19:49 +00:00
Devang Patel 37e4f98cb6 Update test to explicitly capture llc output.
llvm-svn: 106121
2010-06-16 18:04:12 +00:00
Rafael Espindola ad64acde72 A a new test for my previous patch.
llvm-svn: 106120
2010-06-16 18:02:31 +00:00
Bill Wendling d71bd63600 Improve comment to include that the use of a preg is also verboten in this situation.
llvm-svn: 106119
2010-06-16 18:01: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