Skip to content

Commit

Permalink
[cilkscale] Fix compilation of serial cilkscale tool, when cilkscale …
Browse files Browse the repository at this point in the history
…is built with a non-Cilk compiler
  • Loading branch information
neboat committed Jul 2, 2020
1 parent a7a31ff commit fd36e7b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compiler-rt/lib/cilkscale/shadow_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
#define INCLUDED_SHADOW_STACK_H

#include "cilkscale_timer.h"

#ifndef SERIAL_TOOL
#define SERIAL_TOOL 1
#endif

#if !SERIAL_TOOL
#include <cilk/reducer.h>
#endif

#ifndef DEFAULT_STACK_SIZE
#define DEFAULT_STACK_SIZE 64
Expand Down Expand Up @@ -94,12 +101,14 @@ struct shadow_stack_t {
bot(std::move(move.bot))
{}

#if !SERIAL_TOOL
// Move-in constructor
shadow_stack_t(cilk::move_in_wrapper<shadow_stack_t> w) {
capacity = w.value().capacity;
frames = w.value().frames;
bot = w.value().bot;
}
#endif

~shadow_stack_t() {
if (frames)
Expand Down

0 comments on commit fd36e7b

Please sign in to comment.