@@ -90,7 +90,7 @@ std::string get_kokkos_dir()
9090
9191int emit_tokens (const std::string &infile, bool line_numbers, const CompilerOptions &compiler_options)
9292{
93- std::string input = LCompilers::read_file (infile);
93+ std::string input = LCompilers::read_file_ok (infile);
9494 // Src -> Tokens
9595 Allocator al (64 *1024 *1024 );
9696 std::vector<int > toks;
@@ -103,7 +103,7 @@ int emit_tokens(const std::string &infile, bool line_numbers, const CompilerOpti
103103 LCompilers::LocationManager::FileLocations fl;
104104 fl.in_filename = infile;
105105 lm.files .push_back (fl);
106- std::string input = LCompilers::read_file (infile);
106+ std::string input = LCompilers::read_file_ok (infile);
107107 lm.init_simple (input);
108108 lm.file_ends .push_back (input.size ());
109109 }
@@ -140,7 +140,7 @@ int emit_ast(const std::string &infile,
140140 LCompilers::LocationManager::FileLocations fl;
141141 fl.in_filename = infile;
142142 lm.files .push_back (fl);
143- std::string input = LCompilers::read_file (infile);
143+ std::string input = LCompilers::read_file_ok (infile);
144144 lm.init_simple (input);
145145 lm.file_ends .push_back (input.size ());
146146 }
@@ -161,7 +161,7 @@ int emit_ast(const std::string &infile,
161161 LCompilers::LocationManager::FileLocations fl;
162162 fl.in_filename = infile;
163163 lm.files .push_back (fl);
164- std::string input = LCompilers::read_file (infile);
164+ std::string input = LCompilers::read_file_ok (infile);
165165 lm.init_simple (input);
166166 lm.file_ends .push_back (input.size ());
167167 }
@@ -172,7 +172,7 @@ int emit_ast(const std::string &infile,
172172 LCompilers::LocationManager::FileLocations fl;
173173 fl.in_filename = infile;
174174 lm.files .push_back (fl);
175- std::string input = LCompilers::read_file (infile);
175+ std::string input = LCompilers::read_file_ok (infile);
176176 lm.init_simple (input);
177177 lm.file_ends .push_back (input.size ());
178178 }
@@ -197,7 +197,7 @@ int emit_asr(const std::string &infile,
197197 LCompilers::LocationManager::FileLocations fl;
198198 fl.in_filename = infile;
199199 lm.files .push_back (fl);
200- std::string input = LCompilers::read_file (infile);
200+ std::string input = LCompilers::read_file_ok (infile);
201201 lm.init_simple (input);
202202 lm.file_ends .push_back (input.size ());
203203 }
@@ -250,7 +250,7 @@ int emit_cpp(const std::string &infile,
250250 LCompilers::LocationManager::FileLocations fl;
251251 fl.in_filename = infile;
252252 lm.files .push_back (fl);
253- std::string input = LCompilers::read_file (infile);
253+ std::string input = LCompilers::read_file_ok (infile);
254254 lm.init_simple (input);
255255 lm.file_ends .push_back (input.size ());
256256 }
@@ -295,7 +295,7 @@ int emit_c(const std::string &infile,
295295 LCompilers::LocationManager::FileLocations fl;
296296 fl.in_filename = infile;
297297 lm.files .push_back (fl);
298- std::string input = LCompilers::read_file (infile);
298+ std::string input = LCompilers::read_file_ok (infile);
299299 lm.init_simple (input);
300300 lm.file_ends .push_back (input.size ());
301301 }
@@ -347,7 +347,7 @@ int emit_c_to_file(const std::string &infile, const std::string &outfile,
347347 LCompilers::LocationManager::FileLocations fl;
348348 fl.in_filename = infile;
349349 lm.files .push_back (fl);
350- std::string input = LCompilers::read_file (infile);
350+ std::string input = LCompilers::read_file_ok (infile);
351351 lm.init_simple (input);
352352 lm.file_ends .push_back (input.size ());
353353 }
@@ -401,7 +401,7 @@ int emit_python(const std::string &infile,
401401 LCompilers::LocationManager::FileLocations fl;
402402 fl.in_filename = infile;
403403 lm.files .push_back (fl);
404- std::string input = LCompilers::read_file (infile);
404+ std::string input = LCompilers::read_file_ok (infile);
405405 lm.init_simple (input);
406406 lm.file_ends .push_back (input.size ());
407407 }
@@ -451,7 +451,7 @@ int emit_wat(const std::string &infile,
451451 LCompilers::LocationManager::FileLocations fl;
452452 fl.in_filename = infile;
453453 lm.files .push_back (fl);
454- std::string input = LCompilers::read_file (infile);
454+ std::string input = LCompilers::read_file_ok (infile);
455455 lm.init_simple (input);
456456 lm.file_ends .push_back (input.size ());
457457 }
@@ -495,7 +495,7 @@ int emit_wat(const std::string &infile,
495495int dump_all_passes (const std::string &infile,
496496 const std::string &runtime_library_dir,
497497 CompilerOptions &compiler_options) {
498- std::string input = LCompilers::read_file (infile);
498+ std::string input = LCompilers::read_file_ok (infile);
499499
500500 Allocator al (4 *1024 );
501501 LCompilers::LocationManager lm;
@@ -543,7 +543,7 @@ int get_symbols (const std::string &infile,
543543 LCompilers::LocationManager::FileLocations fl;
544544 fl.in_filename = infile;
545545 lm.files .push_back (fl);
546- std::string input = LCompilers::read_file (infile);
546+ std::string input = LCompilers::read_file_ok (infile);
547547 lm.init_simple (input);
548548 lm.file_ends .push_back (input.size ());
549549 }
@@ -644,7 +644,7 @@ int get_errors (const std::string &infile,
644644 LCompilers::LocationManager::FileLocations fl;
645645 fl.in_filename = infile;
646646 lm.files .push_back (fl);
647- std::string input = LCompilers::read_file (infile);
647+ std::string input = LCompilers::read_file_ok (infile);
648648 lm.init_simple (input);
649649 lm.file_ends .push_back (input.size ());
650650 }
@@ -764,7 +764,7 @@ int emit_llvm(const std::string &infile,
764764 LCompilers::LocationManager::FileLocations fl;
765765 fl.in_filename = infile;
766766 lm.files .push_back (fl);
767- std::string input = LCompilers::read_file (infile);
767+ std::string input = LCompilers::read_file_ok (infile);
768768 lm.init_simple (input);
769769 lm.file_ends .push_back (input.size ());
770770 }
@@ -1057,7 +1057,7 @@ int compile_python_using_llvm(
10571057 lm.files .push_back (fl);
10581058
10591059 auto file_reading_start = std::chrono::high_resolution_clock::now ();
1060- std::string input = LCompilers::read_file (infile);
1060+ std::string input = LCompilers::read_file_ok (infile);
10611061 auto file_reading_end = std::chrono::high_resolution_clock::now ();
10621062 times.push_back (std::make_pair (" File reading" , std::chrono::duration
10631063 <double , std::milli>(file_reading_end - file_reading_start).count ()));
@@ -1202,7 +1202,7 @@ int compile_to_binary_wasm(
12021202 lm.files .push_back (fl);
12031203
12041204 auto file_reading_start = std::chrono::high_resolution_clock::now ();
1205- std::string input = LCompilers::read_file (infile);
1205+ std::string input = LCompilers::read_file_ok (infile);
12061206 auto file_reading_end = std::chrono::high_resolution_clock::now ();
12071207 times.push_back (std::make_pair (" File reading" , std::chrono::duration
12081208 <double , std::milli>(file_reading_end - file_reading_start).count ()));
@@ -1275,7 +1275,7 @@ int compile_to_binary_x86(
12751275 lm.files .push_back (fl);
12761276
12771277 auto file_reading_start = std::chrono::high_resolution_clock::now ();
1278- std::string input = LCompilers::read_file (infile);
1278+ std::string input = LCompilers::read_file_ok (infile);
12791279 auto file_reading_end = std::chrono::high_resolution_clock::now ();
12801280 times.push_back (std::make_pair (" File reading" , std::chrono::duration
12811281 <double , std::milli>(file_reading_end - file_reading_start).count ()));
@@ -1349,7 +1349,7 @@ int compile_to_binary_wasm_to_x86(
13491349 lm.files .push_back (fl);
13501350
13511351 auto file_reading_start = std::chrono::high_resolution_clock::now ();
1352- std::string input = LCompilers::read_file (infile);
1352+ std::string input = LCompilers::read_file_ok (infile);
13531353 auto file_reading_end = std::chrono::high_resolution_clock::now ();
13541354 times.push_back (std::make_pair (" File reading" , std::chrono::duration
13551355 <double , std::milli>(file_reading_end - file_reading_start).count ()));
@@ -1626,7 +1626,7 @@ int link_executable(const std::vector<std::string> &infiles,
16261626
16271627// int emit_c_preprocessor(const std::string &infile, CompilerOptions &compiler_options)
16281628// {
1629- // std::string input = read_file (infile);
1629+ // std::string input = read_file_ok (infile);
16301630//
16311631// LFortran::CPreprocessor cpp(compiler_options);
16321632// LFortran::LocationManager lm;
@@ -2076,7 +2076,7 @@ int main(int argc, char *argv[])
20762076 lpython_pass_manager.use_default_passes ();
20772077 compiler_options.po .disable_main = true ;
20782078 compiler_options.emit_debug_line_column = false ;
2079- compiler_options.generate_object_code = false ;
2079+ compiler_options.separate_compilation = false ;
20802080 return interactive_python_repl (lpython_pass_manager, compiler_options, arg_v);
20812081#else
20822082 std::cerr << " Interactive prompt requires the LLVM backend to be enabled. Recompile with `WITH_LLVM=yes`." << std::endl;
@@ -2216,7 +2216,7 @@ int main(int argc, char *argv[])
22162216 }
22172217 compiler_options.emit_debug_info = false ;
22182218 compiler_options.emit_debug_line_column = false ;
2219- compiler_options.generate_object_code = false ;
2219+ compiler_options.separate_compilation = false ;
22202220 return compile_python_using_llvm (arg_file, " " , runtime_library_dir,
22212221 lpython_pass_manager, compiler_options, time_report, false , true );
22222222#else
0 commit comments