@@ -16,7 +16,7 @@ def run_command(command, cwd=None):
16
16
def clone_repository (repo_name , path , repo_url , sub_path = None ):
17
17
if os .path .exists (path ):
18
18
while True :
19
- choice = input ("There is already a `{}` folder, do you want to update it? [y/N]" .format (repo_name ))
19
+ choice = input ("There is already a `{}` folder, do you want to update it? [y/N]" .format (path ))
20
20
if choice == "" or choice .lower () == "n" :
21
21
print ("Skipping repository update." )
22
22
return
@@ -159,13 +159,14 @@ def fill_intrinsics(intrinsics, from_intrinsics, all_intrinsics):
159
159
all_intrinsics [entry [0 ]] = entry [1 ]
160
160
161
161
162
- def update_intrinsics (llvm_path , llvmint ):
162
+ def update_intrinsics (llvm_path , llvmint , llvmint2 ):
163
163
intrinsics_llvm = {}
164
164
intrinsics_llvmint = {}
165
165
all_intrinsics = {}
166
166
167
167
extract_instrinsics_from_llvm (llvm_path , intrinsics_llvm )
168
168
extract_instrinsics_from_llvmint (llvmint , intrinsics_llvmint )
169
+ extract_instrinsics_from_llvmint (llvmint2 , intrinsics_llvmint )
169
170
170
171
intrinsics = {}
171
172
# We give priority to translations from LLVM over the ones from llvmint.
@@ -208,6 +209,10 @@ def main():
208
209
os .path .dirname (os .path .abspath (__file__ )),
209
210
"llvmint" ,
210
211
)
212
+ llvmint2_path = os .path .join (
213
+ os .path .dirname (os .path .abspath (__file__ )),
214
+ "llvmint-2" ,
215
+ )
211
216
212
217
# First, we clone the LLVM repository if it's not already here.
213
218
clone_repository (
@@ -221,7 +226,12 @@ def main():
221
226
llvmint_path ,
222
227
"https://github.com/GuillaumeGomez/llvmint" ,
223
228
)
224
- update_intrinsics (llvm_path , llvmint_path )
229
+ clone_repository (
230
+ "llvmint2" ,
231
+ llvmint2_path ,
232
+ "https://github.com/antoyo/llvmint" ,
233
+ )
234
+ update_intrinsics (llvm_path , llvmint_path , llvmint2_path )
225
235
226
236
227
237
if __name__ == "__main__" :
0 commit comments