Skip to content

Commit fb5b8f9

Browse files
committed
Move updateMax to header where it can actually be used
1 parent 188b958 commit fb5b8f9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

backends/asm/optimize_ir.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5550,10 +5550,6 @@ AnalyzeInlineEligibility(Function *f)
55505550
return FuncData(f)->inliningFlags & ~prev_flags;
55515551
}
55525552

5553-
static inline void updateMax(int *dst, int src) {
5554-
if (*dst < src) *dst = src;
5555-
}
5556-
55575553
static bool
55585554
ShouldExpandPureFunction(IR *ir) {
55595555
Function *f = (Function *)ir->aux;

util/util.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,9 @@ size_t to_utf8(char *s, wchar_t wcorig);
8383
// convert utf-8 sequence to wide character; n is max size of cptr
8484
size_t from_utf8(wchar_t *wcptr, const char *cptr, size_t n);
8585

86+
87+
static inline void updateMax(int *dst, int src) {
88+
if (*dst < src) *dst = src;
89+
}
90+
8691
#endif

0 commit comments

Comments
 (0)