Ejemplo n.º 1
0
bool SetCreator::CreateSet(ASTContext &C) {
  SmallVector<EquivalenceSet::Object, 16> Objects;
  const EquivalenceScope::InfluenceObject *Obj = nullptr;
  for(size_t I = 0; I < Connections.size(); ++I) {
    if(Visited[I]) continue;
    Obj = Connections[I].A.Obj;
  }
  if(!Obj) return false;

  Result.clear();
  FindConnections(Obj);
  llvm::SmallPtrSet<VarDecl*, 16> ProcessedObjects;
  for(auto I : Result) {
    if(ProcessedObjects.insert(I.Obj->Var).second)
      Objects.push_back(EquivalenceSet::Object(I.Obj->Var, I.E));
  }

  auto Set = EquivalenceSet::Create(C, Objects);
  for(auto I : Objects)
    I.Var->setStorageSet(Set);
  return true;
}
Ejemplo n.º 2
0
void NativeRawSymbol::getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const {
  bytes.clear();
}