summaryrefslogtreecommitdiffstats
path: root/test/run.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-12-03 20:40:51 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-03 21:25:26 (GMT)
commit96b5c2d10b2f6712a55be56ad58190ca19707634 (patch)
tree7701988592eab4bd18325451de563f8170f8618f /test/run.cmake
parentd2ef49b321a3a8f33662b46183a778478e834411 (diff)
downloadCastXML-96b5c2d10b2f6712a55be56ad58190ca19707634.zip
CastXML-96b5c2d10b2f6712a55be56ad58190ca19707634.tar.gz
CastXML-96b5c2d10b2f6712a55be56ad58190ca19707634.tar.bz2
Output: Generate Base element offset="" attribute
The gccxml output format had this attribute, defined by GCC as "The offset where this basetype appears in its containing type". This is well-defined only for non-virtual base classes. GitHub-Issue: 34
Diffstat (limited to 'test/run.cmake')
-rw-r--r--test/run.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/run.cmake b/test/run.cmake
index e254b33..e7b2c29 100644
--- a/test/run.cmake
+++ b/test/run.cmake
@@ -96,6 +96,9 @@ if(msg)
string(REGEX REPLACE "artificial=\"1\"( throw=\"\")?" "artificial=\"1\"( throw=\"\")?" update_xml "${update_xml}")
string(REGEX REPLACE "size=\"[0-9]+\" align=\"[0-9]+\"" "size=\"[0-9]+\" align=\"[0-9]+\"" update_xml "${update_xml}")
string(REGEX REPLACE "<File id=\"(f[0-9]+)\" name=\"[^\"]*/test/input/([^\"]*)\"/>" "<File id=\"\\1\" name=\".*/test/input/\\2\"/>" update_xml "${update_xml}")
+ if(update_xml MATCHES "<Base.*<Base") # multiple inheritance has ABI-specific offsets
+ string(REGEX REPLACE "<Base type=\"([^\"]*)\" access=\"([^\"]*)\" virtual=\"0\" offset=\"[0-9]+\"/>" "<Base type=\"\\1\" access=\"\\2\" virtual=\"0\" offset=\"[0-9]+\"/>" update_xml "${update_xml}")
+ endif()
string(REGEX REPLACE "</GCC_XML>$" "</GCC_XML>$" update_xml "${update_xml}")
file(WRITE "${expect_xml_file}" "${update_xml}\n")
endif()