From 711f693f55e64670a6c92601a1cfca4f5e5fc56f Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 8 Mar 2015 21:27:24 +0100 Subject: [PATCH] Renaming monicelli::plist to monicelli::plist_of --- BitcodeEmitter.cpp | 4 ++++ ModuleRegistry.cpp | 4 ++-- Pointers.hpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BitcodeEmitter.cpp b/BitcodeEmitter.cpp index 26c208f..05de25a 100644 --- a/BitcodeEmitter.cpp +++ b/BitcodeEmitter.cpp @@ -587,6 +587,10 @@ bool BitcodeEmitter::emit(Program const& program) { GUARDED(proto.emit(this)); } + for (Function const& function: program.getFunctions()) { + GUARDED(function.getPrototype().emit(this)); + } + for (Function const& function: program.getFunctions()) { GUARDED(function.emit(this)); } diff --git a/ModuleRegistry.cpp b/ModuleRegistry.cpp index c370e89..13444c1 100644 --- a/ModuleRegistry.cpp +++ b/ModuleRegistry.cpp @@ -53,7 +53,7 @@ void ModuleRegistry::registerFunction(FunctionPrototype *proto) { #define PUT(type, funcname) \ new FunctionPrototype { \ new Id {#funcname}, Type::VOID, \ - plist({ \ + plist_of({ \ new FunArg {new Id {"value"}, type, false} \ }), \ } @@ -77,7 +77,7 @@ void monicelli::registerStdLib(ModuleRegistry &r) { r.registerFunction(GET(Type::INT, __Monicelli_getInt)); r.registerFunction(new FunctionPrototype { new Id("__Monicelli_assert"), Type::VOID, - plist({ + plist_of({ new FunArg {new Id("condition"), Type::CHAR, false} }) }); diff --git a/Pointers.hpp b/Pointers.hpp index c4d8159..5667dee 100644 --- a/Pointers.hpp +++ b/Pointers.hpp @@ -33,7 +33,7 @@ template using PointerList = boost::ptr_vector; template using PointerSet = boost::ptr_unordered_set; template -PointerList* plist(std::initializer_list elements) { +PointerList* plist_of(std::initializer_list elements) { PointerList *result = new PointerList(elements.size()); for (T *el: elements) { result->push_back(el);