From 3840ebdbcad3de6cb158ab763ba9087ab46b46e7 Mon Sep 17 00:00:00 2001
From: Zuzana Baranova <xbaranov@fi.muni.cz>
Date: Sat, 22 Jun 2019 20:06:29 +0000
Subject: [PATCH] RT: Add a setter for the _cxx attribute in NativeDiosCC.

---
 divine/rt/dios-cc.hpp | 1 +
 tools/divcc.cpp       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/divine/rt/dios-cc.hpp b/divine/rt/dios-cc.hpp
index a88efc6bd..7d11957ad 100644
--- a/divine/rt/dios-cc.hpp
+++ b/divine/rt/dios-cc.hpp
@@ -39,6 +39,7 @@ struct NativeDiosCC : cc::Native
     auto link_dios_native( bool cxx );
     std::unique_ptr< llvm::Module > link_bitcode() override;
     void link() override;
+    void set_cxx( bool cxx ) { _cxx = cxx; }
 
     bool _cxx;
 };
diff --git a/tools/divcc.cpp b/tools/divcc.cpp
index a5ad97a88..403469350 100644
--- a/tools/divcc.cpp
+++ b/tools/divcc.cpp
@@ -31,7 +31,7 @@ int main( int argc, char **argv )
 {
     try {
         rt::NativeDiosCC nativeCC( { argv + 1, argv + argc } );
-        nativeCC._cxx = brick::string::endsWith( argv[0], "divc++" );
+        nativeCC.set_cxx( brick::string::endsWith( argv[0], "divc++" ) );
         auto& po = nativeCC._po;
 
         if ( po.hasHelp || po.hasVersion )
-- 
GitLab