Skip to content

Commit

Permalink
Fix C4099
Browse files Browse the repository at this point in the history
```
warning C4099: 'OMR::PersistentAllocatorKit' : type name first seen using 'class' now seen using 'struct'
```
  • Loading branch information
fjeremic committed Jun 7, 2021
1 parent 0f3b2e6 commit ab19e76
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion compiler/codegen/RegisterDependencyStruct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace TR
{

struct RegisterDependency : OMR::RegisterDependencyConnector {};
class RegisterDependency : public OMR::RegisterDependencyConnector {};

}

Expand Down
4 changes: 3 additions & 1 deletion compiler/codegen/Relocation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ typedef enum
namespace TR {

/** encapsulates debug information about a relocation record */
struct RelocationDebugInfo
class RelocationDebugInfo
{
public:

/** the file name of the code that generated the associated RR*/
const char* file;
/** the line number in the file file that created the associated RR*/
Expand Down
2 changes: 1 addition & 1 deletion compiler/cs2/sparsrbit.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class ASparseBitVector : private Allocator {

uint16_t *Indices() const { return fSegment; }

bool operator==(const struct Segment &s1) const {
bool operator==(const Segment &s1) const {
if (fHighBits != s1.fHighBits) return false;
if (fNumValues != s1.fNumValues) return false;

Expand Down
4 changes: 3 additions & 1 deletion compiler/env/PersistentAllocatorKit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ namespace TR { using OMR::PersistentAllocatorKit; }
namespace OMR
{

struct PersistentAllocatorKit
class PersistentAllocatorKit
{
public:

PersistentAllocatorKit(TR::RawAllocator rawAllocator) :
rawAllocator(rawAllocator)
{
Expand Down
6 changes: 4 additions & 2 deletions compiler/il/AliasSetInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ class TR_AliasSetInterface {
/*
* Interface to initialize TR_AliasSetInterface
*/
struct TR_UseDefAliasSetInterface : public TR_AliasSetInterface<UseDefAliasSet> {
class TR_UseDefAliasSetInterface : public TR_AliasSetInterface<UseDefAliasSet> {
public:
TR_UseDefAliasSetInterface(TR::SymbolReference *symRef,
bool isDirectCall = false,
bool includeGCSafePoint = false) :
Expand All @@ -305,7 +306,8 @@ struct TR_UseDefAliasSetInterface : public TR_AliasSetInterface<UseDefAliasSet>
(shares_symbol, symRef, isDirectCall, includeGCSafePoint) {}
};

struct TR_UseOnlyAliasSetInterface: public TR_AliasSetInterface<UseOnlyAliasSet> {
class TR_UseOnlyAliasSetInterface: public TR_AliasSetInterface<UseOnlyAliasSet> {
public:
TR_UseOnlyAliasSetInterface(TR::SymbolReference *symRef,
bool isDirectCall = false,
bool includeGCSafePoint = false) :
Expand Down
6 changes: 4 additions & 2 deletions compiler/optimizer/CallInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace TR { class Method; }
namespace TR { class ResolvedMethodSymbol; }
namespace TR { class SymbolReference; }
namespace TR { class TreeTop; }
struct TR_CallSite;
class TR_CallSite;
struct TR_VirtualGuardSelection;

class TR_CallStack : public TR_Link<TR_CallStack>
Expand Down Expand Up @@ -265,8 +265,10 @@ struct TR_CallTarget : public TR_Link<TR_CallTarget>
TR_CALLSITE_DEFAULT_ALLOC \
TR_CALLSITE_INHERIT_CONSTRUCTOR_COMMON (EXTENDED,BASE)

struct TR_CallSite : public TR_Link<TR_CallSite>
class TR_CallSite : public TR_Link<TR_CallSite>
{
public:

TR_ALLOC(TR_Memory::Inliner);
friend class TR_InlinerTracer;

Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/Inliner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace TR { class ResolvedMethodSymbol; }
namespace TR { class Symbol; }
namespace TR { class SymbolReference; }
namespace TR { class TreeTop; }
struct TR_CallSite;
class TR_CallSite;
struct TR_CallTarget;
struct TR_ParameterMapping;
struct TR_VirtualGuardSelection;
Expand Down
1 change: 0 additions & 1 deletion compiler/runtime/OMRCodeCacheManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace TR { class CodeCacheMemorySegment; }
namespace TR { class CodeGenerator; }
namespace TR { class Monitor; }
namespace OMR { class CodeCacheHashEntrySlab; }
namespace OMR { class FaintCacheBlock; }
namespace OMR { typedef void CodeCacheTrampolineCode; }
namespace OMR { class CodeCacheManager; }
namespace TR { class StaticRelocation; }
Expand Down
2 changes: 1 addition & 1 deletion fvtest/compilertest/runtime/TestJitConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace TestCompiler { class FrontEnd; }
// Singleton JitConfig. The only instance of this is TestCompiler::FrontEnd::_jitConfig
namespace TestCompiler
{
struct JitConfig : public TR::JitConfig
class JitConfig : public TR::JitConfig
{
private:
friend class TR::FEBase<FrontEnd>;
Expand Down
3 changes: 1 addition & 2 deletions jitbuilder/runtime/JBJitConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ namespace JitBuilder { class FrontEnd; }
// Singleton JitConfig. The only instance of this is JitBuilder::FrontEnd::_jitConfig
namespace JitBuilder
{
struct JitConfig : public TR::JitConfig
class JitConfig : public TR::JitConfig
{
private:
friend class TR::FEBase<FrontEnd>;
JitConfig() : TR::JitConfig() {}
};
Expand Down

0 comments on commit ab19e76

Please sign in to comment.