From ec21714af9563cfbd1cc3c470b3e64bb25fee65a Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Fri, 6 Mar 2015 14:31:00 +0100 Subject: [PATCH] Minor refactorings to BitcodeEmitter. 1. split initalizer for module unique_ptr on multiple lines for readibility. 2. replace //TODO modules with commented loop. --- BitcodeEmitter.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BitcodeEmitter.cpp b/BitcodeEmitter.cpp index a88ffdc..4c9d008 100644 --- a/BitcodeEmitter.cpp +++ b/BitcodeEmitter.cpp @@ -94,7 +94,9 @@ bool reportError(std::initializer_list const& what) { } BitcodeEmitter::BitcodeEmitter() { - module = std::unique_ptr(new llvm::Module("monicelli", getGlobalContext())); + module = std::unique_ptr( + new llvm::Module("monicelli", getGlobalContext()) + ); d = new Private; } @@ -365,7 +367,11 @@ bool BitcodeEmitter::emit(Program const& program) { GUARDED(program.getMain()->emit(this)); } - // TODO modules +// for (Module const& module: program.getModules()) { +// GUARDED(module.emit(this)); +// } + + return true; } bool BitcodeEmitter::emit(Id const& node) {