aboutsummaryrefslogtreecommitdiff
path: root/abigail_reader.cc
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2023-07-26 14:20:37 +0100
committerGiuliano Procida <gprocida@google.com>2023-08-02 12:11:20 +0100
commitf0ebd81cf177d3087c5426bef43492f15b206168 (patch)
tree394c1d48e747c607addffca984683049eddbcfd9 /abigail_reader.cc
parent9384a7877cadda089f1cccb9f0fc6cd3a055137e (diff)
downloadstg-f0ebd81cf177d3087c5426bef43492f15b206168.tar.gz
model change to support C++ nullptr
C++ specifies the type of `nullptr` as an unspecified type (`decltype(nullptr)`) and defines `typedef decltype(nullptr) nullptr_t`. This hilariousness translates into DWARF's `DW_TAG_unspecified_type` with `DW_AT_name` = `decltype(nullptr)`. Rather than add a third special type to the model, we replace `Void` and `Variadic` with `Special` of which there are now 3 kinds. This requires a format change to version 2. PiperOrigin-RevId: 551185943 Change-Id: I20a33f922913d4219a6f9a873cf5b4d36de9f550
Diffstat (limited to 'abigail_reader.cc')
-rw-r--r--abigail_reader.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/abigail_reader.cc b/abigail_reader.cc
index 7082376..aa27b54 100644
--- a/abigail_reader.cc
+++ b/abigail_reader.cc
@@ -751,7 +751,7 @@ Id Abigail::GetEdge(xmlNodePtr element) {
Id Abigail::GetVariadic() {
if (!variadic_) {
- variadic_ = {graph_.Add<Variadic>()};
+ variadic_ = {graph_.Add<Special>(Special::Kind::VARIADIC)};
}
return *variadic_;
}
@@ -1033,7 +1033,7 @@ void Abigail::ProcessTypeDecl(Id id, xmlNodePtr type_decl) {
const auto bytes = bits / 8;
if (name == "void") {
- graph_.Set<Void>(id);
+ graph_.Set<Special>(id, Special::Kind::VOID);
} else {
// libabigail doesn't model encoding at all and we don't want to parse names
// (which will not always work) in an attempt to reconstruct it.