Chris Lattner
49af6a4beb
move some code around, no other change.
...
llvm-svn: 49324
2008-04-07 06:51:04 +00:00
Chris Lattner
ec646834e7
simplify compatibility testing for tag types.
...
llvm-svn: 49323
2008-04-07 06:49:41 +00:00
Chris Lattner
3c7961597f
merge compatibility testing of qualified/unqualified interfaces together
...
and fix a bug.
llvm-svn: 49322
2008-04-07 06:38:24 +00:00
Chris Lattner
64bf6ba308
Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same
...
type, because it did not include a/b in the hash.
llvm-svn: 49321
2008-04-07 06:37:47 +00:00
Chris Lattner
c9062d01d7
MyOtherClass<MyProtocol>* is compatible with MyClass*
...
if MyClass is a superclass of MyOtherClass, there is no need for
an exact interface match.
llvm-svn: 49320
2008-04-07 06:06:56 +00:00
Chris Lattner
7bbd3d75ef
Remove a dead check for compatible builtin types
...
llvm-svn: 49319
2008-04-07 05:55:38 +00:00
Chris Lattner
90bef90ad4
futher simplify compatibility testing of objc interface types.
...
llvm-svn: 49318
2008-04-07 05:53:18 +00:00
Bill Wendling
856d8f5b58
Remove tabs. Patch by Mike Stump!
...
llvm-svn: 49317
2008-04-07 05:47:52 +00:00
Chris Lattner
9555466f7e
ocuvector and vector should be compatible. Fix ASQual compatibility.
...
llvm-svn: 49316
2008-04-07 05:43:21 +00:00
Chris Lattner
aee96c3a90
Fix comment typo, do reference eval at the correct type.
...
llvm-svn: 49315
2008-04-07 05:37:56 +00:00
Chris Lattner
f8a6b4d4fc
simplify vector type compatibility testing.
...
llvm-svn: 49314
2008-04-07 05:36:14 +00:00
Chris Lattner
2a3569b5d9
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
...
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.
In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.
llvm-svn: 49313
2008-04-07 05:30:13 +00:00
Chris Lattner
ae947fe3f9
Replace an O(n^2) algorithm in areCompatObjCQualInterfaces with
...
an O(n) algorithm by taking advantage of the fact that the
protocol qualifier list is already guaranteed sorted.
llvm-svn: 49312
2008-04-07 05:05:41 +00:00
Chris Lattner
fde0761735
improve comments.
...
llvm-svn: 49311
2008-04-07 04:58:07 +00:00
Chris Lattner
e0ea37ace7
move sorting of qualifying protocols from the parser into
...
sema. This allows clients of the parser to have the unmolested
list if desired, and guarantees that noone can create an
ObjCQualifiedInterfaceType with an unsorted list.
llvm-svn: 49310
2008-04-07 04:56:42 +00:00
Chris Lattner
513494b32b
add an example.
...
llvm-svn: 49309
2008-04-07 04:47:29 +00:00
Chris Lattner
bd7981a978
eliminate getReferencedProtocols from
...
ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator
interface instead.
llvm-svn: 49308
2008-04-07 04:44:08 +00:00
Chris Lattner
f96084ee73
make QualifiedInterfaceTypesAreCompatible a static function
...
and start simplifying it.
llvm-svn: 49307
2008-04-07 04:17:40 +00:00
Chris Lattner
ae1b6078e3
This predicate is just a generic "issuperclass" predicate, move it to the
...
ObjCInterfaceType as a method.
llvm-svn: 49306
2008-04-07 04:13:03 +00:00
Chris Lattner
ddfdaf9a69
Simplify some objc compatibility testing, make interfaceTypesAreCompatible
...
a static function named isCompatibleInterfaceAssign.
llvm-svn: 49305
2008-04-07 04:07:56 +00:00
Chris Lattner
f8c3e82897
simplify the logic in ASTContext::objcTypesAreCompatible
...
llvm-svn: 49302
2008-04-07 01:30:37 +00:00
Chris Lattner
ba5862e74c
clean up some logic in objc type handling. Specifically, make it so that
...
there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType>
return true for ObjCQualifiedInterfaceType's.
llvm-svn: 49300
2008-04-07 00:27:04 +00:00
Dale Johannesen
87e484f08b
Mark calls to llvm.stacksave, llvm.stackrestore as
...
nounwind. When such calls are inlined into something
else that is invoked, they were getting changed to invokes,
which is badness.
llvm-svn: 49299
2008-04-07 00:08:48 +00:00
Chris Lattner
b9dfb03ddb
trivial changes to getFloatingTypeOfSizeWithinDomain, nothing significant.
...
llvm-svn: 49298
2008-04-06 23:58:54 +00:00
Chris Lattner
d4bacd68bf
simplify max type computation by making it return an integer (like
...
getFloatingTypeOrder) instead of a type. Fix a fixme.
llvm-svn: 49297
2008-04-06 23:55:33 +00:00
Chris Lattner
b90739d556
minor simplifications/cleanups to type comparisons.
...
llvm-svn: 49296
2008-04-06 23:38:49 +00:00
Chris Lattner
fc4379f916
remove the Decl::getCanonicalType() method.
...
llvm-svn: 49295
2008-04-06 23:10:54 +00:00
Chris Lattner
f1e4ec2898
remove a use of getCanonicalType.
...
llvm-svn: 49294
2008-04-06 23:09:52 +00:00
Gabor Greif
92f493dc72
regenerate
...
llvm-svn: 49293
2008-04-06 23:07:54 +00:00
Chris Lattner
76a00cf3ff
Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189.
...
While I'm at it, clean up a bit of maxIntegerType.
llvm-svn: 49292
2008-04-06 22:59:24 +00:00
Chris Lattner
ed0d0795ff
introduce a new ASTContext::getCanonicalType method. This is the first
...
step towards fixing PR2189.
llvm-svn: 49291
2008-04-06 22:41:35 +00:00
Chris Lattner
56a7bf5a7e
remove the old non-parallel test system. 'make' in clang/test now runs
...
the tests in parallel.
llvm-svn: 49290
2008-04-06 22:32:01 +00:00
Chris Lattner
7d9b6a9d50
Use EnumType to simplify some code.
...
llvm-svn: 49289
2008-04-06 22:29:16 +00:00
Chris Lattner
8b23c25b21
make use of EnumType to simplify some code, eliminate warnings
...
when assertions are disabled.
llvm-svn: 49288
2008-04-06 22:05:18 +00:00
Chris Lattner
e07e912f5e
Make EnumType/RecordType classof predicates simpler and more efficient in
...
some cases.
llvm-svn: 49287
2008-04-06 22:04:54 +00:00
Chris Lattner
3fb61c1fbb
add a helper EnumType object for asking about tagtypes for enums.
...
llvm-svn: 49286
2008-04-06 21:58:47 +00:00
Chris Lattner
982e8502c9
fix warnings with assertions disabled.
...
llvm-svn: 49285
2008-04-06 21:50:58 +00:00
Chris Lattner
4db1f62d84
Silence warning when no assertions.
...
llvm-svn: 49284
2008-04-06 21:46:45 +00:00
Chris Lattner
a39cfc5c5b
silence a warning when assertions are disabled.
...
llvm-svn: 49283
2008-04-06 21:44:08 +00:00
Gabor Greif
dd8b7a0a47
fix a warning
...
llvm-svn: 49282
2008-04-06 21:42:13 +00:00
Chris Lattner
5bd2f736e6
fix this testcase to pass and remove a duplicate instance of itself.
...
llvm-svn: 49281
2008-04-06 21:39:17 +00:00
Torok Edwin
613d7afe64
Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.
...
If it cannot be expanded, it will keep the old behaviour and try to shrink the constant.
Part of enhancement for PR2191.
llvm-svn: 49280
2008-04-06 21:23:02 +00:00
Gabor Greif
d36afd7d65
tracking API changes arising from r49277
...
llvm-svn: 49279
2008-04-06 20:42:52 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner
5ed17b67d2
Fix generation of multi-stage instruction itineraries. Patch by
...
giuma.cordes@gmail.com
llvm-svn: 49276
2008-04-06 17:38:14 +00:00
Torok Edwin
538160b7ff
-fPIC is required on x86-64 when building shared objects.
...
llvm-svn: 49274
2008-04-06 12:42:29 +00:00
Chris Lattner
784903e4c1
move a semantic check out of the parser into sema.
...
llvm-svn: 49273
2008-04-06 07:49:57 +00:00
Chris Lattner
371ed4e7a9
now that identifier list parsing is split out, simplify handling of
...
normal typed argument lists.
llvm-svn: 49272
2008-04-06 06:57:35 +00:00
Chris Lattner
285a3e47be
reject 'int test(x, x) int x; {}'
...
llvm-svn: 49271
2008-04-06 06:50:56 +00:00
Chris Lattner
67b450cb48
reject 'typedef int y; int test(x, y)'.
...
llvm-svn: 49270
2008-04-06 06:47:48 +00:00