sim: ScopedCheckpointSection to public for mappingParamIn
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 24 Nov 2020 01:13:02 +0000 (17:13 -0800)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 24 Nov 2020 22:57:02 +0000 (22:57 +0000)
In clang, the following error was given:

```
In file included from build/X86/sim/eventq.hh:51:
build/X86/sim/serialize.hh:533:19: error: 'ScopedCheckpointSection' is a protected member of 'Serializable'
    Serializable::ScopedCheckpointSection sec(os, sectionName);
                  ^
build/X86/sim/serialize.hh:175:11: note: declared protected here
    class ScopedCheckpointSection {
          ^
```

The use, at line 533, was introduced in this commit:
https://gem5-review.googlesource.com/c/public/gem5/+/36135

This can be fixed by making ScopedCheckpointSection public.

Change-Id: Ib6ffba18d5e8c37980d4febb548f2405cb45ce8c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37915
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/serialize.hh

index 987bee2506648cb2a8359d6c85fb80805df62731..9e25d098799587fbd87c892a9baf19a266521332 100644 (file)
@@ -171,7 +171,7 @@ class CheckpointIn
  */
 class Serializable
 {
-  protected:
+  public:
     class ScopedCheckpointSection {
       public:
         /**
@@ -224,7 +224,6 @@ class Serializable
         void nameOut(CheckpointIn &cp) {};
     };
 
-  public:
     /**
      * @ingroup api_serialize
      */