diff --git a/compiler/codegen/CodeGenRA.cpp b/compiler/codegen/CodeGenRA.cpp index 75c855102f0..9285f0687c4 100644 --- a/compiler/codegen/CodeGenRA.cpp +++ b/compiler/codegen/CodeGenRA.cpp @@ -2829,7 +2829,7 @@ OMR::CodeGenerator::simulateNodeEvaluation(TR::Node *node, TR_RegisterPressureSt // don't properly account for cases where one child's result must live // across the evaluation of another child. // - char *tag = NULL; + const char *tag = NULL; if ( nodeGotFoldedIntoMemref(node, state, self()) && self()->simulatedNodeState(node)._willBeRematerialized == 0 // remat nodes have already had their children incremented, so we must decrement them ){ diff --git a/compiler/codegen/OMRCodeGenerator.hpp b/compiler/codegen/OMRCodeGenerator.hpp index 888e002995e..29b971a64b9 100644 --- a/compiler/codegen/OMRCodeGenerator.hpp +++ b/compiler/codegen/OMRCodeGenerator.hpp @@ -1192,21 +1192,21 @@ class OMR_EXTENSIBLE CodeGenerator uint8_t *target, uint8_t *target2, TR_ExternalRelocationTargetKind kind, - char *generatingFileName, + const char *generatingFileName, uintptr_t generatingLineNumber, TR::Node *node) {} void addProjectSpecializedPairRelocation(uint8_t *location1, uint8_t *location2, uint8_t *target, TR_ExternalRelocationTargetKind kind, - char *generatingFileName, + const char *generatingFileName, uintptr_t generatingLineNumber, TR::Node *node) {} void addProjectSpecializedRelocation(TR::Instruction *instr, uint8_t *target, uint8_t *target2, TR_ExternalRelocationTargetKind kind, - char *generatingFileName, + const char *generatingFileName, uintptr_t generatingLineNumber, TR::Node *node) {} diff --git a/compiler/codegen/Relocation.cpp b/compiler/codegen/Relocation.cpp index cdfbaa6bc40..9e61465cdbd 100644 --- a/compiler/codegen/Relocation.cpp +++ b/compiler/codegen/Relocation.cpp @@ -497,7 +497,7 @@ uintptr_t TR::ExternalRelocation::_globalValueList[TR_NumGlobalValueItems] = 0 // TR_HeapSizeForBarrierRange0 }; -char *TR::ExternalRelocation::_globalValueNames[TR_NumGlobalValueItems] = +const char *TR::ExternalRelocation::_globalValueNames[TR_NumGlobalValueItems] = { "not used (0)", "TR_CountForRecompile (1)", diff --git a/compiler/codegen/Relocation.hpp b/compiler/codegen/Relocation.hpp index d8032cd371f..5dd6c6b98ec 100644 --- a/compiler/codegen/Relocation.hpp +++ b/compiler/codegen/Relocation.hpp @@ -424,17 +424,17 @@ class ExternalRelocation : public TR::Relocation virtual bool isExternalRelocation() { return true; } static const char *getName(TR_ExternalRelocationTargetKind k) {return _externalRelocationTargetKindNames[k];} - static uintptr_t getGlobalValue(uint32_t g) + static uintptr_t getGlobalValue(uint32_t g) { TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item"); return _globalValueList[g]; } - static void setGlobalValue(uint32_t g, uintptr_t v) + static void setGlobalValue(uint32_t g, uintptr_t v) { TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item"); _globalValueList[g] = v; } - static char * nameOfGlobal(uint32_t g) + static const char *nameOfGlobal(uint32_t g) { TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item"); return _globalValueNames[g]; @@ -443,12 +443,12 @@ class ExternalRelocation : public TR::Relocation private: uint8_t *_targetAddress; uint8_t *_targetAddress2; - TR::IteratedExternalRelocation *_relocationRecord; + TR::IteratedExternalRelocation *_relocationRecord; TR_ExternalRelocationTargetKind _kind; static const char *_externalRelocationTargetKindNames[TR_NumExternalRelocationKinds]; static uintptr_t _globalValueList[TR_NumGlobalValueItems]; static uint8_t _globalValueSizeList[TR_NumGlobalValueItems]; - static char *_globalValueNames[TR_NumGlobalValueItems]; + static const char *_globalValueNames[TR_NumGlobalValueItems]; }; class ExternalOrderedPair32BitRelocation: public TR::ExternalRelocation diff --git a/compiler/codegen/StorageInfo.cpp b/compiler/codegen/StorageInfo.cpp index f395ee72706..63a1168bd6a 100644 --- a/compiler/codegen/StorageInfo.cpp +++ b/compiler/codegen/StorageInfo.cpp @@ -35,7 +35,7 @@ #include "il/SymbolReference.hpp" #include "infra/Assert.hpp" -char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] = +const char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] = { "", "", @@ -44,7 +44,7 @@ char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] = "", }; -char *TR_StorageInfo::TR_StorageOverlapKindNames[TR_NumOverlapTypes] = +const char *TR_StorageInfo::TR_StorageOverlapKindNames[TR_NumOverlapTypes] = { "NoOverlap", "MayOverlap", diff --git a/compiler/codegen/StorageInfo.hpp b/compiler/codegen/StorageInfo.hpp index f311e63adc3..5ed0b39c5d1 100644 --- a/compiler/codegen/StorageInfo.hpp +++ b/compiler/codegen/StorageInfo.hpp @@ -81,12 +81,12 @@ class TR_StorageInfo void print(); - char *getName() { return getName(_class); } + const char *getName() { return getName(_class); } - static char *getName(TR_StorageClass klass) + static const char *getName(TR_StorageClass klass) { return ((klass < TR_NumStorageClassTypes) ? TR_StorageClassNames[klass] : (char*)"invalid_class"); } - static char *getName(TR_StorageOverlapKind overlapType) + static const char *getName(TR_StorageOverlapKind overlapType) { return ((overlapType < TR_NumOverlapTypes) ? TR_StorageOverlapKindNames[overlapType] : (char*)"invalid_overlap_type"); } TR::Compilation *comp() { return _comp; } @@ -100,8 +100,8 @@ class TR_StorageInfo size_t _length; TR_StorageClass _class; TR::Compilation * _comp; - static char *TR_StorageClassNames[TR_NumStorageClassTypes]; - static char *TR_StorageOverlapKindNames[TR_NumOverlapTypes]; + static const char *TR_StorageClassNames[TR_NumStorageClassTypes]; + static const char *TR_StorageOverlapKindNames[TR_NumOverlapTypes]; };