Skip to content

Commit 65bf0f1

Browse files
committed
CHORE: Updated compiler options
1 parent 2db4e28 commit 65bf0f1

File tree

5 files changed

+1
-54
lines changed

5 files changed

+1
-54
lines changed

libasr

Submodule libasr updated 497 files

src/bin/lpython.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,8 +1880,6 @@ int main(int argc, char *argv[])
18801880
// app.add_option("-J", arg_J, "Where to save mod files");
18811881
app.add_flag("--jit", to_jit, "Execute the program using just-in-time (JIT) compiler");
18821882
app.add_flag("-g", compiler_options.emit_debug_info, "Compile with debugging information");
1883-
app.add_flag("--debug-with-line-column", compiler_options.emit_debug_line_column,
1884-
"Convert the linear location info into line + column in the debugging information");
18851883
// app.add_option("-D", compiler_options.c_preprocessor_defines, "Define <macro>=<value> (or 1 if <value> omitted)")->allow_extra_args(false);
18861884
app.add_flag("--version", arg_version, "Display compiler version information");
18871885

@@ -2085,7 +2083,6 @@ int main(int argc, char *argv[])
20852083
lpython_pass_manager.parse_pass_arg(arg_pass, skip_pass);
20862084
lpython_pass_manager.use_default_passes();
20872085
compiler_options.po.disable_main = true;
2088-
compiler_options.emit_debug_line_column = false;
20892086
compiler_options.separate_compilation = false;
20902087
return interactive_python_repl(lpython_pass_manager, compiler_options, arg_v);
20912088
#else
@@ -2225,7 +2222,6 @@ int main(int argc, char *argv[])
22252222
return 1;
22262223
}
22272224
compiler_options.emit_debug_info = false;
2228-
compiler_options.emit_debug_line_column = false;
22292225
compiler_options.separate_compilation = false;
22302226
return compile_python_using_llvm(arg_file, "", runtime_library_dir,
22312227
lpython_pass_manager, compiler_options, time_report, false, true);

src/lpython/python_evaluator.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -445,19 +445,6 @@ Result<std::unique_ptr<LLVMModule>> PythonCompiler::get_llvm3(
445445
)
446446
{
447447
#ifdef HAVE_LFORTRAN_LLVM
448-
if (compiler_options.emit_debug_info) {
449-
if (!compiler_options.emit_debug_line_column) {
450-
diagnostics.add(LCompilers::diag::Diagnostic(
451-
"The `emit_debug_line_column` is not enabled; please use the "
452-
"`--debug-with-line-column` option to get the correct "
453-
"location information",
454-
LCompilers::diag::Level::Error,
455-
LCompilers::diag::Stage::Semantic, {})
456-
);
457-
Error err;
458-
return err;
459-
}
460-
}
461448
// ASR -> LLVM
462449
std::unique_ptr<LCompilers::LLVMModule> m;
463450
Result<std::unique_ptr<LCompilers::LLVMModule>> res

src/lpython/python_kernel.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ namespace LCompilers::LPython {
7979
custom_interpreter() : e{CompilerOptions()} {
8080
e.compiler_options.interactive = true;
8181
e.compiler_options.po.disable_main = true;
82-
e.compiler_options.emit_debug_line_column = false;
8382
e.compiler_options.separate_compilation = false;
8483
}
8584
virtual ~custom_interpreter() = default;

src/lpython/tests/test_llvm.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ define float @f()
612612
TEST_CASE("PythonCompiler 1") {
613613
CompilerOptions cu;
614614
cu.po.disable_main = true;
615-
cu.emit_debug_line_column = false;
616615
cu.separate_compilation = false;
617616
cu.interactive = true;
618617
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -627,7 +626,6 @@ TEST_CASE("PythonCompiler 1") {
627626
// TEST_CASE("PythonCompiler 2") {
628627
// CompilerOptions cu;
629628
// cu.po.disable_main = true;
630-
// cu.emit_debug_line_column = false;
631629
// cu.separate_compilation = false;
632630
// cu.interactive = true;
633631
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -646,7 +644,6 @@ TEST_CASE("PythonCompiler 1") {
646644
TEST_CASE("PythonCompiler i32 expressions") {
647645
CompilerOptions cu;
648646
cu.po.disable_main = true;
649-
cu.emit_debug_line_column = false;
650647
cu.separate_compilation = false;
651648
cu.interactive = true;
652649
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -692,7 +689,6 @@ TEST_CASE("PythonCompiler i32 expressions") {
692689
// TEST_CASE("PythonCompiler i32 declaration") {
693690
// CompilerOptions cu;
694691
// cu.po.disable_main = true;
695-
// cu.emit_debug_line_column = false;
696692
// cu.separate_compilation = false;
697693
// cu.interactive = true;
698694
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -727,7 +723,6 @@ TEST_CASE("PythonCompiler i32 expressions") {
727723
TEST_CASE("PythonCompiler i64 expressions") {
728724
CompilerOptions cu;
729725
cu.po.disable_main = true;
730-
cu.emit_debug_line_column = false;
731726
cu.separate_compilation = false;
732727
cu.interactive = true;
733728
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -773,7 +768,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
773768
// TEST_CASE("PythonCompiler i64 declaration") {
774769
// CompilerOptions cu;
775770
// cu.po.disable_main = true;
776-
// cu.emit_debug_line_column = false;
777771
// cu.separate_compilation = false;
778772
// cu.interactive = true;
779773
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -808,7 +802,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
808802
// TEST_CASE("PythonCompiler u32 expressions") {
809803
// CompilerOptions cu;
810804
// cu.po.disable_main = true;
811-
// cu.emit_debug_line_column = false;
812805
// cu.separate_compilation = false;
813806
// cu.interactive = true;
814807
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -854,7 +847,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
854847
// TEST_CASE("PythonCompiler u32 declaration") {
855848
// CompilerOptions cu;
856849
// cu.po.disable_main = true;
857-
// cu.emit_debug_line_column = false;
858850
// cu.separate_compilation = false;
859851
// cu.interactive = true;
860852
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -890,7 +882,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
890882
// TEST_CASE("PythonCompiler u64 expressions") {
891883
// CompilerOptions cu;
892884
// cu.po.disable_main = true;
893-
// cu.emit_debug_line_column = false;
894885
// cu.separate_compilation = false;
895886
// cu.interactive = true;
896887
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -936,7 +927,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
936927
// TEST_CASE("PythonCompiler u64 declaration") {
937928
// CompilerOptions cu;
938929
// cu.po.disable_main = true;
939-
// cu.emit_debug_line_column = false;
940930
// cu.separate_compilation = false;
941931
// cu.interactive = true;
942932
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -971,7 +961,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
971961
// TEST_CASE("PythonCompiler i8 expressions") {
972962
// CompilerOptions cu;
973963
// cu.po.disable_main = true;
974-
// cu.emit_debug_line_column = false;
975964
// cu.separate_compilation = false;
976965
// cu.interactive = true;
977966
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1017,7 +1006,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
10171006
// TEST_CASE("PythonCompiler i8 declaration") {
10181007
// CompilerOptions cu;
10191008
// cu.po.disable_main = true;
1020-
// cu.emit_debug_line_column = false;
10211009
// cu.separate_compilation = false;
10221010
// cu.interactive = true;
10231011
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1052,7 +1040,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
10521040
// TEST_CASE("PythonCompiler u8 expressions") {
10531041
// CompilerOptions cu;
10541042
// cu.po.disable_main = true;
1055-
// cu.emit_debug_line_column = false;
10561043
// cu.separate_compilation = false;
10571044
// cu.interactive = true;
10581045
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1098,7 +1085,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
10981085
// TEST_CASE("PythonCompiler u8 declaration") {
10991086
// CompilerOptions cu;
11001087
// cu.po.disable_main = true;
1101-
// cu.emit_debug_line_column = false;
11021088
// cu.separate_compilation = false;
11031089
// cu.interactive = true;
11041090
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1133,7 +1119,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
11331119
// TEST_CASE("PythonCompiler i16 expressions") {
11341120
// CompilerOptions cu;
11351121
// cu.po.disable_main = true;
1136-
// cu.emit_debug_line_column = false;
11371122
// cu.separate_compilation = false;
11381123
// cu.interactive = true;
11391124
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1179,7 +1164,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
11791164
// TEST_CASE("PythonCompiler i16 declaration") {
11801165
// CompilerOptions cu;
11811166
// cu.po.disable_main = true;
1182-
// cu.emit_debug_line_column = false;
11831167
// cu.separate_compilation = false;
11841168
// cu.interactive = true;
11851169
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1214,7 +1198,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
12141198
// TEST_CASE("PythonCompiler u16 expressions") {
12151199
// CompilerOptions cu;
12161200
// cu.po.disable_main = true;
1217-
// cu.emit_debug_line_column = false;
12181201
// cu.separate_compilation = false;
12191202
// cu.interactive = true;
12201203
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1260,7 +1243,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
12601243
// TEST_CASE("PythonCompiler u16 declaration") {
12611244
// CompilerOptions cu;
12621245
// cu.po.disable_main = true;
1263-
// cu.emit_debug_line_column = false;
12641246
// cu.separate_compilation = false;
12651247
// cu.interactive = true;
12661248
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1295,7 +1277,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
12951277
// TEST_CASE("PythonCompiler boolean expressions") {
12961278
// CompilerOptions cu;
12971279
// cu.po.disable_main = true;
1298-
// cu.emit_debug_line_column = false;
12991280
// cu.separate_compilation = false;
13001281
// cu.interactive = true;
13011282
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1326,7 +1307,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
13261307
// TEST_CASE("PythonCompiler boolean declaration") {
13271308
// CompilerOptions cu;
13281309
// cu.po.disable_main = true;
1329-
// cu.emit_debug_line_column = false;
13301310
// cu.separate_compilation = false;
13311311
// cu.interactive = true;
13321312
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1366,7 +1346,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
13661346
// TEST_CASE("PythonCompiler string 1") {
13671347
// CompilerOptions cu;
13681348
// cu.po.disable_main = true;
1369-
// cu.emit_debug_line_column = false;
13701349
// cu.separate_compilation = false;
13711350
// cu.interactive = true;
13721351
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1387,7 +1366,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
13871366
// TEST_CASE("PythonCompiler string 2") {
13881367
// CompilerOptions cu;
13891368
// cu.po.disable_main = true;
1390-
// cu.emit_debug_line_column = false;
13911369
// cu.separate_compilation = false;
13921370
// cu.interactive = true;
13931371
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1421,7 +1399,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
14211399
// TEST_CASE("PythonCompiler string 3") {
14221400
// CompilerOptions cu;
14231401
// cu.po.disable_main = true;
1424-
// cu.emit_debug_line_column = false;
14251402
// cu.separate_compilation = false;
14261403
// cu.interactive = true;
14271404
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1453,7 +1430,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
14531430
// TEST_CASE("PythonCompiler Array 1") {
14541431
// CompilerOptions cu;
14551432
// cu.po.disable_main = true;
1456-
// cu.emit_debug_line_column = false;
14571433
// cu.separate_compilation = false;
14581434
// cu.interactive = true;
14591435
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1470,7 +1446,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
14701446
// TEST_CASE("PythonCompiler lists") {
14711447
// CompilerOptions cu;
14721448
// cu.po.disable_main = true;
1473-
// cu.emit_debug_line_column = false;
14741449
// cu.separate_compilation = false;
14751450
// cu.interactive = true;
14761451
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1509,7 +1484,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
15091484
// TEST_CASE("PythonCompiler tuples") {
15101485
// CompilerOptions cu;
15111486
// cu.po.disable_main = true;
1512-
// cu.emit_debug_line_column = false;
15131487
// cu.separate_compilation = false;
15141488
// cu.interactive = true;
15151489
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1556,7 +1530,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
15561530
// TEST_CASE("PythonCompiler classes") {
15571531
// CompilerOptions cu;
15581532
// cu.po.disable_main = true;
1559-
// cu.emit_debug_line_column = false;
15601533
// cu.separate_compilation = false;
15611534
// cu.interactive = true;
15621535
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1663,7 +1636,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
16631636
// TEST_CASE("PythonCompiler underscore 1") {
16641637
// CompilerOptions cu;
16651638
// cu.po.disable_main = true;
1666-
// cu.emit_debug_line_column = false;
16671639
// cu.separate_compilation = false;
16681640
// cu.interactive = true;
16691641
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1694,7 +1666,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
16941666
// TEST_CASE("PythonCompiler underscore 2") {
16951667
// CompilerOptions cu;
16961668
// cu.po.disable_main = true;
1697-
// cu.emit_debug_line_column = false;
16981669
// cu.separate_compilation = false;
16991670
// cu.interactive = true;
17001671
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1743,7 +1714,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
17431714
// TEST_CASE("PythonCompiler underscore 3") {
17441715
// CompilerOptions cu;
17451716
// cu.po.disable_main = true;
1746-
// cu.emit_debug_line_column = false;
17471717
// cu.separate_compilation = false;
17481718
// cu.interactive = true;
17491719
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1776,7 +1746,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
17761746
// TEST_CASE("PythonCompiler underscore 4") {
17771747
// CompilerOptions cu;
17781748
// cu.po.disable_main = true;
1779-
// cu.emit_debug_line_column = false;
17801749
// cu.separate_compilation = false;
17811750
// cu.interactive = true;
17821751
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1809,7 +1778,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
18091778
// TEST_CASE("PythonCompiler asr verify 1") {
18101779
// CompilerOptions cu;
18111780
// cu.po.disable_main = true;
1812-
// cu.emit_debug_line_column = false;
18131781
// cu.separate_compilation = false;
18141782
// cu.interactive = true;
18151783
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1828,7 +1796,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
18281796
// TEST_CASE("PythonCompiler asr verify 2") {
18291797
// CompilerOptions cu;
18301798
// cu.po.disable_main = true;
1831-
// cu.emit_debug_line_column = false;
18321799
// cu.separate_compilation = false;
18331800
// cu.interactive = true;
18341801
// cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1855,7 +1822,6 @@ TEST_CASE("PythonCompiler i64 expressions") {
18551822
TEST_CASE("PythonCompiler asr verify 3") {
18561823
CompilerOptions cu;
18571824
cu.po.disable_main = true;
1858-
cu.emit_debug_line_column = false;
18591825
cu.separate_compilation = false;
18601826
cu.interactive = true;
18611827
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
@@ -1887,7 +1853,6 @@ def subi(x: i32, y: i32) -> i32:
18871853
TEST_CASE("PythonCompiler asr verify 4") {
18881854
CompilerOptions cu;
18891855
cu.po.disable_main = true;
1890-
cu.emit_debug_line_column = false;
18911856
cu.separate_compilation = false;
18921857
cu.interactive = true;
18931858
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();

0 commit comments

Comments
 (0)