Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. llvm-svn: 105268
This commit is contained in:
@@ -3494,9 +3494,9 @@ void Sema::CodeCompleteObjCClassMessage(Scope *S, TypeTy *Receiver,
|
||||
// If we have an external source, load the entire class method
|
||||
// pool from the PCH file.
|
||||
if (ExternalSource) {
|
||||
for (uint32_t I = 0, N = ExternalSource->GetNumKnownSelectors(); I != N;
|
||||
++I) {
|
||||
Selector Sel = ExternalSource->GetSelector(I);
|
||||
for (uint32_t I = 0, N = ExternalSource->GetNumExternalSelectors();
|
||||
I != N; ++I) {
|
||||
Selector Sel = ExternalSource->GetExternalSelector(I);
|
||||
if (Sel.isNull() || FactoryMethodPool.count(Sel) ||
|
||||
InstanceMethodPool.count(Sel))
|
||||
continue;
|
||||
@@ -3595,9 +3595,9 @@ void Sema::CodeCompleteObjCInstanceMessage(Scope *S, ExprTy *Receiver,
|
||||
// If we have an external source, load the entire class method
|
||||
// pool from the PCH file.
|
||||
if (ExternalSource) {
|
||||
for (uint32_t I = 0, N = ExternalSource->GetNumKnownSelectors(); I != N;
|
||||
++I) {
|
||||
Selector Sel = ExternalSource->GetSelector(I);
|
||||
for (uint32_t I = 0, N = ExternalSource->GetNumExternalSelectors();
|
||||
I != N; ++I) {
|
||||
Selector Sel = ExternalSource->GetExternalSelector(I);
|
||||
if (Sel.isNull() || InstanceMethodPool.count(Sel) ||
|
||||
FactoryMethodPool.count(Sel))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user