aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-31 10:45:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-31 10:45:21 +0200
commit61d80f051293a7449a09081f60f48b8377bfbbad (patch)
tree1c300d1ff4c4c5ec6aa63e119eabf06714da29dd
parent9838b71545b1f03097a8fb6f535c8671d0aca5ed (diff)
Adjust to changes in GCC 11
-rw-r--r--odb/gcc.hxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/odb/gcc.hxx b/odb/gcc.hxx
index af0e2a0..e5fecef 100644
--- a/odb/gcc.hxx
+++ b/odb/gcc.hxx
@@ -163,6 +163,7 @@ gcc_tree_code_name (gcc_tree_code_type tc) {return tree_code_name[tc];}
// In GCC 9:
//
// INCLUDED_FROM Became linemap_included_from_linemap().
+//
// LAST_SOURCE_LINE Was removed apparently as no longer used. Studying
// the line-map.h diff from 8.3 suggests that the old
// implementation should still work.
@@ -192,4 +193,23 @@ LAST_SOURCE_LINE (const line_map_ordinary* map)
#endif
+// In GCC 11:
+//
+// lookup_qualified_name() has a new interface.
+//
+// DECL_IS_BUILTIN became DECL_IS_UNDECLARED_BUILTIN.
+//
+#if BUILDING_GCC_MAJOR >= 11
+
+inline tree
+lookup_qualified_name (tree scope, tree name, bool type, bool complain)
+{
+ return lookup_qualified_name (
+ scope, name, (type ? LOOK_want::TYPE : LOOK_want::NORMAL), complain);
+}
+
+#define DECL_IS_BUILTIN(decl) DECL_IS_UNDECLARED_BUILTIN(decl)
+
+#endif
+
#endif // ODB_GCC_HXX