Commit Graph

115442 Commits

Author SHA1 Message Date
David Greene 9ba42085da Add Peek
Add a peek function to let the Lexer look at a character arbitrarily
far ahead in the stream without consuming anything.  We need this to
disambiguate numbers and operands of a paste operation.  For example:

def foo#8i

Without lookahead the lexer will treat '8' as a number rather than as
part of a string to be pasted to form an identifier.

llvm-svn: 142512
2011-10-19 13:03:35 +00:00
David Greene 9effff28c8 Resolve Record Names
When resolving Record values, be sure to update the Record name as it
may contain references to the value.

llvm-svn: 142511
2011-10-19 13:03:30 +00:00
David Greene f651a2a5c0 Allow Names Changes on Unregistered Records
Add Record names to be changed even on Records that aren't yet
registered.  We need to be able to do this for paste functionality
because we do not want to register def names before they are unique
and that can only happen once all paste operations are done.  This
change lets us update Record names formed by paste operations and
register the result later.

llvm-svn: 142510
2011-10-19 13:03:25 +00:00
David Greene 212f6a9e9a Call Record Initializer
Call the common Record initializer code from constructors.

llvm-svn: 142509
2011-10-19 13:03:21 +00:00
David Greene 38fe00828b Add Name Init Record Constructor
Add a Record constructor that takes the Record name as an Init.  This
is more work toward paste functionality.

llvm-svn: 142508
2011-10-19 13:03:15 +00:00
David Greene d3a45f0707 Fix 80-col Violation
Split up the initializer list for Record to avoid 80-col issues.

llvm-svn: 142507
2011-10-19 13:03:10 +00:00
David Greene 077d84e6f3 Fix Name Access
Ask for the Record name as a string explicitly to avoid a possible assert.

llvm-svn: 142506
2011-10-19 13:03:02 +00:00
David Greene 98be78aeea Fix Name Access
Ask for the Record name as a string explicitly to avoid a possible
assert.

llvm-svn: 142505
2011-10-19 13:02:57 +00:00
David Greene 658a4b71b6 Fix Name Access
Ask for the record name as a string explicitly to avoid a potential
assert.

llvm-svn: 142504
2011-10-19 13:02:52 +00:00
David Greene b94b18e4d2 Fix Name Check
Avoid a potential assert by asking for record names as strings explicitly.

llvm-svn: 142503
2011-10-19 13:02:48 +00:00
David Greene 894774db46 Fix Name Check
Record names may not be fully resolved at this point so ask for the
record name as a string explicitly.  This avoids a potential assert.

llvm-svn: 142502
2011-10-19 13:02:47 +00:00
David Greene b77fc0d906 Add Record Init
Add an init function to be shared among Record constructors.

llvm-svn: 142501
2011-10-19 13:02:45 +00:00
David Greene db10e69138 Make Template Arg Names Inits
Allow template arg names to be Inits.  This is further work to
implement paste as it allows template names to participate in paste
operations.

llvm-svn: 142500
2011-10-19 13:02:42 +00:00
David Greene 3ca42126f5 Let SetValue Take and Init Name
Convert SetValue to take the value name as an Init.  This allows us to
set values for variables whose names are not yet fully resolved.

llvm-svn: 142499
2011-10-19 13:02:39 +00:00
David Greene e714512cb6 Add Utility to Scope Names
Add a couple of utility functions to take a variable name and qualify
it with the namespace of the enclosing class and/or multiclass.  This
is inpreparation for making template arg names first-class Inits.

llvm-svn: 142498
2011-10-19 13:02:36 +00:00
David Greene 914adf0ecb Make VarInit Name an Init
Make the VarInit name an Init itself.  We need this to implement paste
functionality so we can reference variables whose names are not yet
completely resolved.

llvm-svn: 142497
2011-10-19 13:02:33 +00:00
David Greene 28438acd46 Add Value Accessors
Add accessors to get Record values by Init name.  This lets us look up
Record values whose names are not yet fully resolved.  More work
toward paste.

llvm-svn: 142496
2011-10-19 13:02:29 +00:00
David Greene 00caf09b68 Add Name Init Accessors
Add a utility to get the name init and get the string representation
of the name.  This will be used for paste functionality.

llvm-svn: 142495
2011-10-19 13:02:28 +00:00
David Greene f73296f5aa Add Init Accessors
Add a couple of utility functions to get at the name init and return
the name init as a string.  This will be used for paste functionality.

llvm-svn: 142494
2011-10-19 13:02:22 +00:00
Chandler Carruth deac50cba9 Generalize the reading of probability metadata to work for both branches
and switches, with arbitrary numbers of successors. Still optimized for
the common case of 2 successors for a conditional branch.

Add a test case for switch metadata showing up in the BlockFrequencyInfo pass.

llvm-svn: 142493
2011-10-19 10:32:19 +00:00
Chandler Carruth d27a7a947b Teach the BranchProbabilityInfo analysis pass to read any metadata
encoding of probabilities. In the absense of metadata, it continues to
fall back on static heuristics.

This allows __builtin_expect, after lowering through llvm.expect
a branch instruction's metadata, to actually enter the branch
probability model. This is one component of resolving PR2577.

llvm-svn: 142492
2011-10-19 10:30:30 +00:00
Chandler Carruth 343fad44ea Add pass printing support to BlockFrequencyInfo pass. The implementation
layer already had support for printing the results of this analysis, but
the wiring was missing.

Now that printing the analysis works, actually bring some of this
analysis, and the BranchProbabilityInfo analysis that it wraps, under
test! I'm planning on fixing some bugs and doing other work here, so
having a nice place to add regression tests and a way to observe the
results is really useful.

llvm-svn: 142491
2011-10-19 10:12:41 +00:00
Bill Wendling a96c00bf47 Duncan pointed out that sometimes CC and CXX are used to specify the compiler. Also that the configure script takes care of finding an appropriate compiler if one's not specified.
llvm-svn: 142489
2011-10-19 09:47:00 +00:00
Nadav Rotem 6652e22bad Add support for the vector-widening of vselect and vector-setcc
llvm-svn: 142488
2011-10-19 09:45:11 +00:00
Bill Wendling f96a5bc15b Use bash instead.
llvm-svn: 142486
2011-10-19 09:25:49 +00:00
Bill Wendling 2977a15ab1 Make sure we emit the 'movw' and 'movt' only if it's supported. Otherwise, use a constant pool.
llvm-svn: 142485
2011-10-19 09:24:02 +00:00
Bill Wendling 7c1634556d Remove some dead code.
llvm-svn: 142484
2011-10-19 09:04:11 +00:00
Bill Wendling cfe8232d23 Make changes so that this runs on FreeBSD.
llvm-svn: 142482
2011-10-19 08:42:07 +00:00
Hans Wennborg cc8ce7b1d7 Break out ssize_t test from Sema/format-strings-fixit.c
Move to a separate test that sets a specific target triple
so that the type of ssize_t is known.

llvm-svn: 142481
2011-10-19 07:55:50 +00:00
Craig Topper ef309c3384 Rename PEXTR to PEXT. Add intrinsics for BMI instructions.
llvm-svn: 142480
2011-10-19 07:48:35 +00:00
Douglas Gregor e248eea214 Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!
llvm-svn: 142478
2011-10-19 06:04:55 +00:00
Douglas Gregor 5fdc4de718 Add support for constant arrays, from Anders Waldenborg!.
llvm-svn: 142477
2011-10-19 05:51:43 +00:00
Douglas Gregor 89861066ed Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!
llvm-svn: 142476
2011-10-19 05:50:34 +00:00
Douglas Gregor d59d02cc38 Fix error message for unknown type kind, from Anders Waldenborg!
llvm-svn: 142475
2011-10-19 05:49:29 +00:00
Douglas Gregor 32df3664be This new field was introduced in clang-c in r141277
Python needs this in its structure definition so it allocates enough
memory. From Anders Waldenborg!

llvm-svn: 142474
2011-10-19 05:47:46 +00:00
David Blaikie 651c73ce78 Fix pr9789, assert-on-invalid while instantiating an (invalid) class template with a non-final parameter pack. Also improve the warning for non-final parameter packs in this scenario so it only fires once, rather than once for every template parameter after the non-final parameter pack.
llvm-svn: 142473
2011-10-19 05:19:50 +00:00
Douglas Gregor dab63c1434 Tweak this test to test more directly what we want, and hopefully work around the brokenness of code completion under -fdelayed-template-parsing
llvm-svn: 142472
2011-10-19 04:17:22 +00:00
Argyrios Kyrtzidis 4e8b13613b Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.

llvm-svn: 142471
2011-10-19 02:25:16 +00:00
Johnny Chen a737ba55af Extract the run hooks functionality into the base class lldbtest.Base.
llvm-svn: 142469
2011-10-19 01:06:21 +00:00
Richard Smith a066ccfcf1 Add a -Wc++98-compat warning for friend functions of class templates which would
be implicitly instantiated (resulting in a redefinition) in C++98.

llvm-svn: 142468
2011-10-19 00:54:10 +00:00
Eric Christopher 7ec8ec8581 Add block information for ObjC @catch blocks.
Fixes rdar://10282889

llvm-svn: 142467
2011-10-19 00:44:01 +00:00
Eric Christopher a9d3497b5e Add a new subclass of RunCleanupScopes that also handles creating new
lexical blocks for debug info.

llvm-svn: 142466
2011-10-19 00:43:52 +00:00
Peter Collingbourne a48f33f951 Move static array parameter checks to SemaExpr, per Doug's request
llvm-svn: 142465
2011-10-19 00:16:45 +00:00
Joe Abbey c39977d01b Adding dependencies to allow -DBUILD_SHARED_LIBS=true to complete.
llvm-svn: 142464
2011-10-19 00:13:13 +00:00
Richard Smith 38c0e0417c -Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access
control diagnostic.

llvm-svn: 142463
2011-10-19 00:07:01 +00:00
Lang Hames 20a04e74e3 Added testcase for <rdar://problem/10215997>
llvm-svn: 142462
2011-10-18 23:50:52 +00:00
Greg Clayton 85ae2e1349 Changed lldb_private::Type over to use the intrusive ref counted pointers
so we don't have to lookup types in a type list by ID.

Changed the DWARF parser to remove the "can externally complete myself" bits
from the type when we are in the process of completing the type itself to
avoid an onslaught of external visible decl requests from the 
clang::ExternalASTSource.

llvm-svn: 142461
2011-10-18 23:36:41 +00:00
Bill Wendling 94f60018e0 Emit the MOVT instruction only if the # LPads is > 64K.
llvm-svn: 142460
2011-10-18 23:19:55 +00:00
Fariborz Jahanian 7f73302b4f objc: allow class name qualified with protocols in
iboutletcollection attribute. But ignore protocol
list. // rdar://10296078

llvm-svn: 142459
2011-10-18 23:13:50 +00:00
Bill Wendling 64e6bfc16c For Thumb mode, we need to use a constant pool if the value is too large to be
used with the CMP instruction.

llvm-svn: 142458
2011-10-18 23:11:05 +00:00