// Strip the symbol table of its names.
static void StripTypeSymtab(TypeSymbolTable &ST, bool PreserveDbgInfo) {
  for (TypeSymbolTable::iterator TI = ST.begin(), E = ST.end(); TI != E; ) {
    if (PreserveDbgInfo && StringRef(TI->first).startswith("llvm.dbg"))
      ++TI;
    else
      ST.remove(TI++);
  }
}
Exemple #2
0
void TypeGen::gen(std::vector<const Type*> numberedTypes,const TypeSymbolTable &ST,raw_ostream &OS){
	const Type *type;
	//Emit all numbered types.
	for (int NI=0,NE=numberedTypes.size();NI!=NE;++NI){
		type=numberedTypes[NI];
		this->printAtLeastOneLevel(type,OS);
		OS<<'\n';
	}

	//Print the named types.
	for (TypeSymbolTable::const_iterator TI=ST.begin(),TE=ST.end();TI!=TE;++TI){
		this->printAtLeastOneLevel(TI->second,OS);
		OS<<'\n';
	}
}
Exemple #3
0
/// EnumerateTypeSymbolTable - Insert all of the types in the specified symbol
/// table.
void ValueEnumerator::EnumerateTypeSymbolTable(const TypeSymbolTable &TST) {
  for (TypeSymbolTable::const_iterator TI = TST.begin(), TE = TST.end();
       TI != TE; ++TI)
    EnumerateType(TI->second);
}