From 644567cf7ea810f86bd8e0328567b39c4757bc14 Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Fri, 14 May 2021 13:40:00 -0600 Subject: [PATCH] clean up w LocalNoInline macro --- src/libexpr/eval.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 671b07dcd..897444360 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -619,28 +619,24 @@ std::optional EvalState::getDoc(Value & v) // typedef std::optional> valmap; typedef std::map valmap; -static valmap * map0() __attribute__((noinline)); -valmap * map0() +LocalNoInline(valmap * map0()) { return new valmap(); } -static valmap * map1(const char *name, Value *v) __attribute__((noinline)); -valmap * map1(const char *name, Value *v) +LocalNoInline(valmap * map1(const char *name, Value *v)) { // return new valmap({{name, v}}); return new valmap({{name, v}}); } -static valmap * map2(const char *name1, Value *v1, const char *name2, Value *v2) __attribute__((noinline)); -valmap * map2(const char *name1, Value *v1, const char *name2, Value *v2) +LocalNoInline(valmap * map2(const char *name1, Value *v1, const char *name2, Value *v2)) { return new valmap({{name1, v1}, {name2, v2}}); } -static valmap * mapBindings(Bindings *b) __attribute__((noinline)); -valmap * mapBindings(Bindings *b) +LocalNoInline(valmap * mapBindings(Bindings *b)) { auto map = new valmap();