Skip to content

Commit 128270c

Browse files
committed
Use compiler options
1 parent 3876018 commit 128270c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/bin/lpython.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ int emit_cpp(const std::string &infile,
250250
LCompilers::ASR::TranslationUnit_t* asr = r1.result;
251251

252252
diagnostics.diagnostics.clear();
253-
auto res = LCompilers::asr_to_cpp(al, *asr, diagnostics,
254-
compiler_options.platform, 0);
253+
auto res = LCompilers::asr_to_cpp(al, *asr, diagnostics, compiler_options, 0);
255254
std::cerr << diagnostics.render(lm, compiler_options);
256255
if (!res.ok) {
257256
LCOMPILERS_ASSERT(diagnostics.has_error())
@@ -295,8 +294,7 @@ int emit_c(const std::string &infile,
295294
LCompilers::ASR::TranslationUnit_t* asr = r1.result;
296295

297296
diagnostics.diagnostics.clear();
298-
auto res = LCompilers::asr_to_c(al, *asr, diagnostics,
299-
compiler_options.platform, 0);
297+
auto res = LCompilers::asr_to_c(al, *asr, diagnostics, compiler_options, 0);
300298
std::cerr << diagnostics.render(lm, compiler_options);
301299
if (!res.ok) {
302300
LCOMPILERS_ASSERT(diagnostics.has_error())

src/libasr/codegen/asr_to_c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace LCompilers {
88

99
Result<std::string> asr_to_c(Allocator &al, ASR::TranslationUnit_t &asr,
10-
diag::Diagnostics &diagnostics, Platform &platform,
10+
diag::Diagnostics &diagnostics, CompilerOptions &co,
1111
int64_t default_lower_bound);
1212

1313
} // namespace LCompilers

src/libasr/codegen/asr_to_cpp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
namespace LCompilers {
88

99
Result<std::string> asr_to_cpp(Allocator &al, ASR::TranslationUnit_t &asr,
10-
diag::Diagnostics &diagnostics, Platform &platform, int64_t default_lower_bound);
10+
diag::Diagnostics &diagnostics, CompilerOptions &co,
11+
int64_t default_lower_bound);
1112

1213
} // namespace LCompilers
1314

0 commit comments

Comments
 (0)