From 37673531282ce92e73b12746d1e0fe303966908b Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 6 Nov 2018 19:28:26 +0100 Subject: [PATCH] CaloEvent: Clang fix. The previous root workaround change causes a problem with clang, which doesn't seem to properly implement __attribute__((used)) for destructors. For clang, move the destructor completely out-of-line. (Trying to remove the destructor entirely resulted in a mysterious crash in TClass...). Former-commit-id: 806825294b5df121673c2a2dc78a5519e036e565 --- Calorimeter/CaloEvent/CaloEvent/CaloClusterMomentStore.h | 6 +++++- Calorimeter/CaloEvent/src/CaloClusterMomentStore.cxx | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Calorimeter/CaloEvent/CaloEvent/CaloClusterMomentStore.h b/Calorimeter/CaloEvent/CaloEvent/CaloClusterMomentStore.h index 1a665a806a1..90c9f62b172 100644 --- a/Calorimeter/CaloEvent/CaloEvent/CaloClusterMomentStore.h +++ b/Calorimeter/CaloEvent/CaloEvent/CaloClusterMomentStore.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef CALOEVENT_CALOCLUSTERMOMENTSTORE_H @@ -59,7 +59,11 @@ class CaloClusterMomentStore CaloClusterMomentIterator(moment_store_const_iter iStore) ATH_CLING_BODY (: m_actual(iStore) { } ) /*! \brief Destructor */ +#ifdef __clang__ + ~CaloClusterMomentIterator(); +#else ~CaloClusterMomentIterator() ATH_CLING_BODY( { } ) +#endif /*! \brief Iterator advance method */ CaloClusterMomentIterator next() diff --git a/Calorimeter/CaloEvent/src/CaloClusterMomentStore.cxx b/Calorimeter/CaloEvent/src/CaloClusterMomentStore.cxx index 9e7a4e7374e..be405ef58c7 100644 --- a/Calorimeter/CaloEvent/src/CaloClusterMomentStore.cxx +++ b/Calorimeter/CaloEvent/src/CaloClusterMomentStore.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ @@ -68,3 +68,8 @@ bool CaloClusterMomentStore::retrieveMomentTypes(moment_type_list& } return oldSize < rMomList.size(); } + + +#ifdef __clang__ +CaloClusterMomentStore::CaloClusterMomentIterator::~CaloClusterMomentIterator() {} +#endif -- GitLab