From: Hamed Date: Wed, 28 Jun 2017 02:13:33 +0000 (-0700) Subject: Fixing inline functions X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8c38815d6cec7b5189e8b1c6472c4897ead3a76;p=satune.git Fixing inline functions --- diff --git a/src/AST/boolean.h b/src/AST/boolean.h index 297c383..a59aff1 100644 --- a/src/AST/boolean.h +++ b/src/AST/boolean.h @@ -51,7 +51,7 @@ Boolean * allocBooleanPredicate(Predicate * predicate, Element ** inputs, uint n Boolean * allocBooleanLogicArray(CSolver *solver, LogicOp op, Boolean ** array, uint asize); void deleteBoolean(Boolean * This); -inline FunctionEncoding* getPredicateFunctionEncoding(BooleanPredicate* func){ +static inline FunctionEncoding* getPredicateFunctionEncoding(BooleanPredicate* func){ return &func->encoding; } diff --git a/src/AST/element.h b/src/AST/element.h index 3f9693a..646276f 100644 --- a/src/AST/element.h +++ b/src/AST/element.h @@ -35,7 +35,7 @@ Element * allocElementSet(Set *s); Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus); void deleteElement(Element *This); -inline ElementEncoding* getElementEncoding(Element* This){ +static inline ElementEncoding* getElementEncoding(Element* This){ switch(GETELEMENTTYPE(This)){ case ELEMSET: return &((ElementSet*)This)->encoding; @@ -48,7 +48,7 @@ inline ElementEncoding* getElementEncoding(Element* This){ } -inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){ +static inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){ return &func->functionencoding; } diff --git a/src/Backend/satencoder.h b/src/Backend/satencoder.h index dcc6546..79e2c52 100644 --- a/src/Backend/satencoder.h +++ b/src/Backend/satencoder.h @@ -11,10 +11,10 @@ struct SATEncoder { VectorConstraint allConstraints; }; -inline VectorConstraint* getSATEncoderVars(SATEncoder* ne){ +static inline VectorConstraint* getSATEncoderVars(SATEncoder* ne){ return &ne->vars; } -inline VectorConstraint* getSATEncoderAllConstraints(SATEncoder* ne){ +static inline VectorConstraint* getSATEncoderAllConstraints(SATEncoder* ne){ return &ne->allConstraints; } SATEncoder * allocSATEncoder();