lib/IRGen/GenMeta.cpp
llvm::Function *irgen::getOrCreateTypeMetadataAccessFunction(IRGenModule &IGM,
                                                             CanType type) {
  type = getRuntimeReifiedType(IGM, type);

  assert(!type->hasArchetype() &&
         "cannot create global function to return dependent type metadata");

  switch (getTypeMetadataAccessStrategy(type)) {
  case MetadataAccessStrategy::PublicUniqueAccessor:
  case MetadataAccessStrategy::HiddenUniqueAccessor:
  case MetadataAccessStrategy::PrivateAccessor:
    return getTypeMetadataAccessFunction(IGM, type, NotForDefinition);
  case MetadataAccessStrategy::NonUniqueAccessor:
    return getTypeMetadataAccessFunction(IGM, type, ForDefinition);
  }
  llvm_unreachable("bad type metadata access strategy");
}
/// Return the address of a function that will return type metadata 
/// for the given non-dependent type.
Return the address of a function that will return type metadata
for the given non-dependent type.
Return the address of a function that will return type metadata for the given non - dependent type .
llvm::Function *irgen::getOrCreateTypeMetadataAccessFunction(IRGenModule &IGM,
                                                             CanType type) {
  type = getRuntimeReifiedType(IGM, type);
  assert(!type->hasArchetype() &&
         "cannot create global function to return dependent type metadata");
  switch (getTypeMetadataAccessStrategy(type)) {
  case MetadataAccessStrategy::PublicUniqueAccessor:
  case MetadataAccessStrategy::HiddenUniqueAccessor:
  case MetadataAccessStrategy::PrivateAccessor:
    return getTypeMetadataAccessFunction(IGM, type, NotForDefinition);
  case MetadataAccessStrategy::NonUniqueAccessor:
    return getTypeMetadataAccessFunction(IGM, type, ForDefinition);
  }
  llvm_unreachable("bad type metadata access strategy");
}
llvm :: Function * irgen :: getOrCreateTypeMetadataAccessFunction ( IRGenModule & IGM , CanType type ) { type = getRuntimeReifiedType ( IGM , type ) ; assert ( ! type -> hasArchetype ( ) && " " ) ; switch ( getTypeMetadataAccessStrategy ( type ) ) { case MetadataAccessStrategy :: PublicUniqueAccessor : case MetadataAccessStrategy :: HiddenUniqueAccessor : case MetadataAccessStrategy :: PrivateAccessor : return getTypeMetadataAccessFunction ( IGM , type , NotForDefinition ) ; case MetadataAccessStrategy :: NonUniqueAccessor : return getTypeMetadataAccessFunction ( IGM , type , ForDefinition ) ; } llvm_unreachable ( " " ) ; }
Return the address of a function that will return type metadata
for the given non-dependent type.
Return the address of a function that will return type metadata for the given non - dependent type .