summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-07 06:37:47 +0000
committerChris Lattner <sabre@nondot.org>2008-04-07 06:37:47 +0000
commit64bf6ba308a76142c6d0202e856aedc2a1284be2 (patch)
treec16bb45f306923d120002ccf4bedb8127a202844 /clang/lib
parentc9062d01d7978d57a310283153f35ca3c8eaffbb (diff)
downloadbcm5719-llvm-64bf6ba308a76142c6d0202e856aedc2a1284be2.tar.gz
bcm5719-llvm-64bf6ba308a76142c6d0202e856aedc2a1284be2.zip
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
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Type.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index f80f3641da0..637061c499b 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -704,14 +704,16 @@ void FunctionTypeProto::Profile(llvm::FoldingSetNodeID &ID) {
}
void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID,
+ const ObjCInterfaceDecl *Decl,
ObjCProtocolDecl **protocols,
unsigned NumProtocols) {
+ ID.AddPointer(Decl);
for (unsigned i = 0; i != NumProtocols; i++)
ID.AddPointer(protocols[i]);
}
void ObjCQualifiedInterfaceType::Profile(llvm::FoldingSetNodeID &ID) {
- Profile(ID, &Protocols[0], getNumProtocols());
+ Profile(ID, getDecl(), &Protocols[0], getNumProtocols());
}
void ObjCQualifiedIdType::Profile(llvm::FoldingSetNodeID &ID,
OpenPOWER on IntegriCloud