Add anonymous members as a new symbol table type, so the infrastructure can handle blocks with no names.
Also, add more safety to the types involved regarding copy constructors, operator=, etc. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21106 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
ed3197921e
commit
ba04210097
11 changed files with 170 additions and 73 deletions
|
|
@ -141,11 +141,16 @@ void TVariable::dump(TInfoSink& infoSink) const
|
|||
infoSink.debug << "\n";
|
||||
}
|
||||
|
||||
void TFunction::dump(TInfoSink &infoSink) const
|
||||
void TFunction::dump(TInfoSink& infoSink) const
|
||||
{
|
||||
infoSink.debug << getName().c_str() << ": " << returnType.getCompleteTypeString() << " " << getMangledName().c_str() << "\n";
|
||||
}
|
||||
|
||||
void TAnonMember::dump(TInfoSink& TInfoSink) const
|
||||
{
|
||||
TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str() << "\n";
|
||||
}
|
||||
|
||||
void TSymbolTableLevel::dump(TInfoSink &infoSink) const
|
||||
{
|
||||
tLevel::const_iterator it;
|
||||
|
|
@ -250,9 +255,18 @@ TFunction* TFunction::clone(TStructureMap& remapper)
|
|||
return function;
|
||||
}
|
||||
|
||||
TAnonMember* TAnonMember::clone(TStructureMap& remapper)
|
||||
{
|
||||
// need to implement this once built-in symbols include interface blocks
|
||||
assert(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
TSymbolTableLevel* TSymbolTableLevel::clone(TStructureMap& remapper)
|
||||
{
|
||||
TSymbolTableLevel *symTableLevel = new TSymbolTableLevel();
|
||||
symTableLevel->anonId = anonId;
|
||||
tLevel::iterator iter;
|
||||
for (iter = level.begin(); iter != level.end(); ++iter) {
|
||||
symTableLevel->insert(*iter->second->clone(remapper));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue