mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
util/u_trace: include the generated header first
This is a good practice to make sure the generated header is self-contained (no missing includes, declarations, etc.). Remove unnecessary SOURCE header scope from the default. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18238>
This commit is contained in:
parent
0d57cf8cad
commit
dea0d684b7
1 changed files with 5 additions and 5 deletions
|
|
@ -120,13 +120,13 @@ class TracepointArg(object):
|
|||
HEADERS = []
|
||||
|
||||
class HeaderScope(IntEnum):
|
||||
HEADER = (1 << 0)
|
||||
SOURCE = (1 << 1)
|
||||
HEADER = (1 << 0)
|
||||
SOURCE = (1 << 1)
|
||||
|
||||
class Header(object):
|
||||
"""Class that represents a header file dependency of generated tracepoints
|
||||
"""
|
||||
def __init__(self, hdr, scope=HeaderScope.HEADER|HeaderScope.SOURCE):
|
||||
def __init__(self, hdr, scope=HeaderScope.HEADER):
|
||||
"""Parameters:
|
||||
|
||||
- hdr: the required header path
|
||||
|
|
@ -301,12 +301,12 @@ src_template = """\
|
|||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "${hdr}"
|
||||
|
||||
% for header in HEADERS:
|
||||
#include "${header.hdr}"
|
||||
% endfor
|
||||
|
||||
#include "${hdr}"
|
||||
|
||||
#define __NEEDS_TRACE_PRIV
|
||||
#include "util/debug.h"
|
||||
#include "util/perf/u_trace_priv.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue