1 /* radare - LGPL - Copyright 2013-2016 - pancake */
2 
3 #include <r_bin.h>
4 
r_bin_lang_swift(RBinFile * binfile)5 R_IPI bool r_bin_lang_swift(RBinFile *binfile) {
6 	RBinObject *o = binfile? binfile->o: NULL;
7 	RBinInfo *info = o? o->info: NULL;
8 	RBinSymbol *sym;
9 	RListIter *iter;
10 	if (info) {
11 		r_list_foreach (o->symbols, iter, sym) {
12 			if (sym->name && strstr (sym->name, "swift_once")) {
13 				info->lang = "swift";
14 				return true;
15 			}
16 		}
17 	}
18 	return false;
19 }
20