diff --git a/compiler/codegen/OMRCodeGenerator.cpp b/compiler/codegen/OMRCodeGenerator.cpp index c63db4b4dc6..ad1addfc7cc 100644 --- a/compiler/codegen/OMRCodeGenerator.cpp +++ b/compiler/codegen/OMRCodeGenerator.cpp @@ -1270,13 +1270,13 @@ bool OMR::CodeGenerator::traceBCDCodeGen() return self()->comp()->getOption(TR_TraceCG); } -void OMR::CodeGenerator::traceBCDEntry(char *str, TR::Node *node) +void OMR::CodeGenerator::traceBCDEntry(const char *str, TR::Node *node) { if (self()->traceBCDCodeGen()) traceMsg(self()->comp(),"EVAL: %s 0x%p - start\n",str,node); } -void OMR::CodeGenerator::traceBCDExit(char *str, TR::Node *node) +void OMR::CodeGenerator::traceBCDExit(const char *str, TR::Node *node) { if (self()->traceBCDCodeGen()) traceMsg(self()->comp(),"EVAL: %s 0x%p - end\n",str,node); diff --git a/compiler/codegen/OMRCodeGenerator.hpp b/compiler/codegen/OMRCodeGenerator.hpp index 755538f3de5..35129b51af8 100644 --- a/compiler/codegen/OMRCodeGenerator.hpp +++ b/compiler/codegen/OMRCodeGenerator.hpp @@ -1416,8 +1416,8 @@ class OMR_EXTENSIBLE CodeGenerator //Rather confusingly not used -only- in BCD related codegen. //... has leaked into non-BCD code. bool traceBCDCodeGen(); - void traceBCDEntry(char *str, TR::Node *node); - void traceBCDExit(char *str, TR::Node *node); + void traceBCDEntry(const char *str, TR::Node *node); + void traceBCDExit(const char *str, TR::Node *node); TR_BitVector *getLiveButMaybeUnreferencedLocals() {return _liveButMaybeUnreferencedLocals;} TR_BitVector *setLiveButMaybeUnreferencedLocals(TR_BitVector *v) {return (_liveButMaybeUnreferencedLocals = v);} diff --git a/compiler/compile/CompilationTypes.hpp b/compiler/compile/CompilationTypes.hpp index 43fe4a47262..d6a00722746 100644 --- a/compiler/compile/CompilationTypes.hpp +++ b/compiler/compile/CompilationTypes.hpp @@ -105,7 +105,7 @@ typedef CS2::LexicalBlockTimer LexicalTimer; // for TR_Debug usage typedef CS2::HashTable ToNumberMap; typedef CS2::HashTable ToStringMap; -typedef CS2::HashTable*, TR::Allocator> ToCommentMap; +typedef CS2::HashTable*, TR::Allocator> ToCommentMap; diff --git a/compiler/ras/Debug.cpp b/compiler/ras/Debug.cpp index 935642f74c7..7d536b4cafb 100644 --- a/compiler/ras/Debug.cpp +++ b/compiler/ras/Debug.cpp @@ -379,7 +379,7 @@ TR_Debug::newVariableSizeSymbol(TR::AutomaticSymbol *sym) } void -TR_Debug::addInstructionComment(TR::Instruction *instr, char * comment, ...) +TR_Debug::addInstructionComment(TR::Instruction *instr, const char * comment, ...) { TR_ASSERT(_comp, "Required compilation object is NULL.\n"); @@ -389,12 +389,12 @@ TR_Debug::addInstructionComment(TR::Instruction *instr, char * comment, ...) CS2::HashIndex hashIndex; if (_comp->getToCommentMap().Locate(instr, hashIndex)) { - List *comments = _comp->getToCommentMap().DataAt(hashIndex); + List *comments = _comp->getToCommentMap().DataAt(hashIndex); comments->add(comment); } else { - List *comments = new (_comp->trHeapMemory()) List(_comp->trMemory()); + List *comments = new (_comp->trHeapMemory()) List(_comp->trMemory()); comments->add(comment); _comp->getToCommentMap().Add(instr, comments); } diff --git a/compiler/ras/Debug.hpp b/compiler/ras/Debug.hpp index bf474d2f45a..3eea2a5fb29 100644 --- a/compiler/ras/Debug.hpp +++ b/compiler/ras/Debug.hpp @@ -422,7 +422,7 @@ class TR_Debug virtual void newRegister(TR::Register *); virtual void newVariableSizeSymbol(TR::AutomaticSymbol *sym); virtual void newInstruction(TR::Instruction *); - virtual void addInstructionComment(TR::Instruction *, char*, ...); + virtual void addInstructionComment(TR::Instruction *, const char*, ...); /** * @brief Check whether to trigger debugger breakpoint or launch debugger diff --git a/compiler/z/codegen/BinaryCommutativeAnalyser.cpp b/compiler/z/codegen/BinaryCommutativeAnalyser.cpp index 9114474fee1..7b1e819aca2 100644 --- a/compiler/z/codegen/BinaryCommutativeAnalyser.cpp +++ b/compiler/z/codegen/BinaryCommutativeAnalyser.cpp @@ -153,7 +153,7 @@ TR_S390BinaryCommutativeAnalyser::genericAnalyser(TR::Node * root, TR::InstOpCod TR::Register * nodeReg = NULL; TR::Instruction * finalInstr = NULL; TR::Compilation *comp = cg()->comp(); - char * CLOBBER_EVAL = "LR=Clobber_eval"; + const char * CLOBBER_EVAL = "LR=Clobber_eval"; TR_Debug * debugObj = cg()->getDebug(); if (cg()->whichChildToEvaluate(root) == 0) { @@ -701,7 +701,7 @@ TR_S390BinaryCommutativeAnalyser::integerAddAnalyser(TR::Node * root, TR::InstOp // which do not produce a carry. The flag would be used to prevent such optimizations when the carry is needed. /* bool setsOrReadsCC = NEED_CC(node) || (node->getOpCodeValue() == TR::luaddc) || (node->getOpCodeValue() == TR::iuaddc); */ - char * CLOBBER_EVAL = "LR=Clobber_eval"; + const char * CLOBBER_EVAL = "LR=Clobber_eval"; TR_Debug * debugObj = cg()->getDebug(); if (cg()->whichChildToEvaluate(root) == 0) { diff --git a/compiler/z/codegen/BinaryEvaluator.cpp b/compiler/z/codegen/BinaryEvaluator.cpp index 33aec66ebf4..66ecd2e7a41 100644 --- a/compiler/z/codegen/BinaryEvaluator.cpp +++ b/compiler/z/codegen/BinaryEvaluator.cpp @@ -1021,7 +1021,7 @@ iDivRemGenericEvaluator(TR::Node * node, TR::CodeGenerator * cg, bool isDivision TR::Node * secondChild = node->getSecondChild(); TR::Instruction * cursor = NULL; - char * REG_USER_DEF = "LR=Reg_user_def"; + const char * REG_USER_DEF = "LR=Reg_user_def"; TR_Debug * debugObj = cg->getDebug(); // A/A, return 1 (div) or 0 (rem). diff --git a/compiler/z/codegen/OMRMachine.cpp b/compiler/z/codegen/OMRMachine.cpp index 5f3d07253a2..758b6254ed9 100644 --- a/compiler/z/codegen/OMRMachine.cpp +++ b/compiler/z/codegen/OMRMachine.cpp @@ -186,8 +186,8 @@ OMR::Z::Machine::registerExchange(TR::CodeGenerator* cg, TR::Compilation *comp = cg->comp(); TR::Node * currentNode = precedingInstruction->getNode(); TR::Instruction * currentInstruction = NULL; - char * REG_EXCHANGE = "LR=Reg_exchg"; - char * REG_PAIR = "LR=Reg_pair"; + const char * REG_EXCHANGE = "LR=Reg_exchg"; + const char * REG_PAIR = "LR=Reg_pair"; TR_Debug * debugObj = cg->getDebug(); TR::Machine *machine = cg->machine();