Skip to content
  • Philip Chimento's avatar
    jsapi-util-args: Mark functions as always-inline · bdbf7179
    Philip Chimento authored and Philip Chimento's avatar Philip Chimento committed
    On GCC, we get warnings about the inline functions causing too much code
    growth. However, we do want these functions always inlined, since they're
    in a header file.
    
    Previously we dealt with the warnings by increasing --param
    inline-unit-growth, but that causes other warnings on Clang since Clang
    doesn't have that parameter. I also noticed that it requires different
    values on other versions of GCC, so it's not a very good solution.
    
    Instead, we use the always_inline attribute on GCC, which causes the
    functions to be inlined regardless of the compiler's inlining heuristics.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780350
    bdbf7179