Andreas Sandberg has submitted this change and it was merged. ( https://gem5-review.googlesource.com/3120 )

Change subject: style: Treat PyBind headers as Python headers
......................................................................

style: Treat PyBind headers as Python headers

Some PyBind11 headers need to include Python.h. This means that we need
to include PyBind11 headers before any standard library headers. Enforce
this by applying the Python.hh rules for anything in pybind11/.

Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
Reviewed-by: Curtis Dunham <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/3120
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Tony Gutierrez <[email protected]>
---
M util/style/sort_includes.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Tony Gutierrez: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/util/style/sort_includes.py b/util/style/sort_includes.py
index d1a25ee..cb88fec 100644
--- a/util/style/sort_includes.py
+++ b/util/style/sort_includes.py
@@ -158,6 +158,8 @@
     includes_re = (
         ('main', '""', _include_matcher_main()),
         ('python', '<>', _include_matcher_fname("^Python\.h$")),
+        ('pybind', '""', _include_matcher_fname("^pybind11/.*\.h$",
+                                                delim='""')),
         ('c', '<>', _include_matcher_fname("^.*\.h$")),
         ('stl', '<>', _include_matcher_fname("^\w+$")),
         ('cc', '<>', _include_matcher_fname("^.*\.(hh|hxx|hpp|H)$")),
@@ -170,6 +172,7 @@

     block_order = (
         ('python', ),
+        ('pybind', ),
         ('main', ),
         ('c', ),
         ('stl', ),

--
To view, visit https://gem5-review.googlesource.com/3120
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a
Gerrit-Change-Number: 3120
Gerrit-PatchSet: 2
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Steve Reinhardt <[email protected]>
Gerrit-Reviewer: Tony Gutierrez <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to