[med-svn] [Git][med-team/castxml][upstream] New upstream version 0.6.8

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sun Aug 11 17:20:46 BST 2024



Étienne Mollier pushed to branch upstream at Debian Med / castxml


Commits:
7eb18907 by Étienne Mollier at 2024-08-11T15:54:05+02:00
New upstream version 0.6.8
- - - - -


13 changed files:

- src/Output.cxx
- src/RunClang.cxx
- src/Version.cmake
- test/CMakeLists.txt
- test/cc-gnu.c
- + test/expect/castxml1.any.GNU-__float80.xml.txt
- + test/expect/castxml1.c.GNU-__float80.xml.txt
- test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt
- test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt
- + test/expect/gccxml.any.GNU-__float80.xml.txt
- + test/expect/gccxml.c.GNU-__float80.xml.txt
- + test/input/GNU-__float80.c
- + test/input/GNU-__float80.cxx


Changes:

=====================================
src/Output.cxx
=====================================
@@ -1760,7 +1760,9 @@ void ASTVisitor::PrintCastXMLTypedef(clang::TypedefDecl const* d,
 {
   this->OS << "  <FundamentalType";
   this->PrintIdAttribute(dn);
-  if (d->getName() == "__castxml__float128") {
+  if (d->getName() == "__castxml__float80") {
+    this->OS << " name=\"__float80\" size=\"128\" align=\"128\"";
+  } else if (d->getName() == "__castxml__float128") {
     this->OS << " name=\"__float128\" size=\"128\" align=\"128\"";
   } else if (d->getName() == "__castxml_Float32") {
     this->OS << " name=\"_Float32\" size=\"32\" align=\"32\"";


=====================================
src/RunClang.cxx
=====================================
@@ -289,7 +289,6 @@ protected:
                     "#undef __BFLT16_MIN_EXP__\n"
                     "#undef __BFLT16_MIN__\n"
                     "#undef __BFLT16_NORM_MAX__\n"
-                    "#undef __SIZEOF_FLOAT80__\n"
                     "#undef __STDCPP_BFLOAT16_T__\n"
                     "#undef __STDCPP_FLOAT128_T__\n"
                     "#undef __STDCPP_FLOAT16_T__\n"
@@ -306,6 +305,14 @@ protected:
                     "#define __builtin_va_arg_pack_len() 1\n";
       }
 
+      // Provide __float80 if simulating the actual GNU compiler.
+      if (this->NeedFloat80(this->Opts.Predefines)) {
+        // Clang does not support this builtin.  Approximate it.
+        builtins += "\n"
+                    "typedef long double __castxml__float80;\n"
+                    "#define __float80 __castxml__float80\n";
+      }
+
       // Provide __float128 if simulating the actual GNU compiler.
       if (!this->HaveFloat128(CI) &&
           this->NeedFloat128(this->Opts.Predefines)) {
@@ -532,7 +539,7 @@ protected:
     return this->IsActualGNU(pd);
   }
 
-  bool NeedFloat128(std::string const& pd) const
+  bool NeedFloat80(std::string const& pd) const
   {
     return (this->IsActualGNU(pd) &&
             (pd.find("#define __i386__ ") != pd.npos ||
@@ -540,6 +547,11 @@ protected:
              pd.find("#define __ia64__ ") != pd.npos));
   }
 
+  bool NeedFloat128(std::string const& pd) const
+  {
+    return this->NeedFloat80(pd);
+  }
+
   bool HaveFloat128(clang::CompilerInstance const& CI) const
   {
 #if LLVM_VERSION_MAJOR > 3 || LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 8


=====================================
src/Version.cmake
=====================================
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 6)
-set(CastXML_VERSION_PATCH 6)
+set(CastXML_VERSION_PATCH 8)
 #set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)
 
@@ -13,7 +13,7 @@ if(DEFINED CastXML_VERSION_RC)
 endif()
 
 # If this source was exported by 'git archive', use its commit info.
-set(git_info "37ca39a CastXML 0.6.6")
+set(git_info "1b6e933 CastXML 0.6.8")
 
 # Otherwise, try to identify the current development source version.
 if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "


=====================================
test/CMakeLists.txt
=====================================
@@ -710,6 +710,7 @@ castxml_test_output(GNU-_Float128)
 unset(castxml_test_output_extra_arguments)
 
 set(castxml_test_output_extra_arguments --castxml-cc-gnu-c "(" $<TARGET_FILE:cc-gnu> --cc-define=__x86_64__ ")")
+castxml_test_output_c(GNU-__float80)
 castxml_test_output_c(GNU-__float128)
 set(castxml_test_output_custom_start "")
 castxml_test_output_c(GNU-__float128-nostart)
@@ -717,6 +718,7 @@ unset(castxml_test_output_custom_start)
 unset(castxml_test_output_extra_arguments)
 
 set(castxml_test_output_extra_arguments --castxml-cc-gnu "(" $<TARGET_FILE:cc-gnu> --cc-define=__x86_64__ ")")
+castxml_test_output(GNU-__float80)
 castxml_test_output(GNU-__float128)
 set(castxml_test_output_custom_start "")
 castxml_test_output(GNU-__float128-nostart)


=====================================
test/cc-gnu.c
=====================================
@@ -66,7 +66,6 @@ int main(int argc, const char* argv[])
           "#define __BFLT16_MIN_EXP__\n"
           "#define __BFLT16_MIN__\n"
           "#define __BFLT16_NORM_MAX__\n"
-          "#define __SIZEOF_FLOAT80__\n"
           "#define __STDCPP_BFLOAT16_T__\n"
           "#define __STDCPP_FLOAT128_T__\n"
           "#define __STDCPP_FLOAT16_T__\n"


=====================================
test/expect/castxml1.any.GNU-__float80.xml.txt
=====================================
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+  <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+    <Argument type="_2" location="f1:1" file="f1" line="1"/>
+  </Function>
+  <FundamentalType id="_2" name="__float80" size="[0-9]+" align="[0-9]+"/>
+  <Namespace id="_3" name="::"/>
+  <File id="f1" name=".*/test/input/GNU-__float80.cxx"/>
+</CastXML>$


=====================================
test/expect/castxml1.c.GNU-__float80.xml.txt
=====================================
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<CastXML[^>]*>
+  <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1">
+    <Argument type="_2" location="f1:1" file="f1" line="1"/>
+  </Function>
+  <FundamentalType id="_2" name="__float80" size="[0-9]+" align="[0-9]+"/>
+  <Namespace id="_3" name="::"/>
+  <File id="f1" name=".*/test/input/GNU-__float80.c"/>
+</CastXML>$


=====================================
test/expect/cmd.cc-gnu-c-tgt-i386-opt-E.stdout.txt
=====================================
@@ -18,6 +18,7 @@
 #define __castxml_major__ [0-9]+
 #define __castxml_minor__ [0-9]+
 #define __castxml_patch__ [0-9]+(
-#define __float128 __castxml__float128)?
+#define __float128 __castxml__float128)?(
+#define __float80 __castxml__float80)?
 #define __i386__ 1(
 #define __malloc__\(\.\.\.\) __malloc__)?$


=====================================
test/expect/cmd.cc-gnu-tgt-i386-opt-E.stdout.txt
=====================================
@@ -19,6 +19,7 @@
 #define __castxml_minor__ [0-9]+
 #define __castxml_patch__ [0-9]+
 #define __cplusplus 199711L(
-#define __float128 __castxml__float128)?
+#define __float128 __castxml__float128)?(
+#define __float80 __castxml__float80)?
 #define __i386__ 1(
 #define __malloc__\(\.\.\.\) __malloc__)?$


=====================================
test/expect/gccxml.any.GNU-__float80.xml.txt
=====================================
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+  <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled="[^"]+">
+    <Argument type="_2" location="f1:1" file="f1" line="1"/>
+  </Function>
+  <FundamentalType id="_2" name="__float80" size="[0-9]+" align="[0-9]+"/>
+  <Namespace id="_3" name="::"/>
+  <File id="f1" name=".*/test/input/GNU-__float80.cxx"/>
+</GCC_XML>$


=====================================
test/expect/gccxml.c.GNU-__float80.xml.txt
=====================================
@@ -0,0 +1,9 @@
+^<\?xml version="1.0"\?>
+<GCC_XML[^>]*>
+  <Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1">
+    <Argument type="_2" location="f1:1" file="f1" line="1"/>
+  </Function>
+  <FundamentalType id="_2" name="__float80" size="[0-9]+" align="[0-9]+"/>
+  <Namespace id="_3" name="::"/>
+  <File id="f1" name=".*/test/input/GNU-__float80.c"/>
+</GCC_XML>$


=====================================
test/input/GNU-__float80.c
=====================================
@@ -0,0 +1 @@
+__float80 start(__float80);


=====================================
test/input/GNU-__float80.cxx
=====================================
@@ -0,0 +1 @@
+__float80 start(__float80);



View it on GitLab: https://salsa.debian.org/med-team/castxml/-/commit/7eb18907e84ad4e7d1e45cfacf468b68c71ae1a3

-- 
View it on GitLab: https://salsa.debian.org/med-team/castxml/-/commit/7eb18907e84ad4e7d1e45cfacf468b68c71ae1a3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240811/7554b478/attachment-0001.htm>


More information about the debian-med-commit mailing list