[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [NFCI][RTTI][Passes] Make the ID fields const char (PR #179970)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 5 21:54:05 PST 2026
https://github.com/steffenlarsen updated https://github.com/llvm/llvm-project/pull/179970
>From b1b5f6033940d54704dd059b4ec4c5a40883057d Mon Sep 17 00:00:00 2001
From: Steffen Holst Larsen <HolstLarsen.Steffen at amd.com>
Date: Thu, 5 Feb 2026 08:50:20 -0600
Subject: [PATCH 1/2] [NFCI][RTTI][Passes] Make the ID fields const char
This commit changes all `ID` fields in the LLVM codebase to be `const
char` instead of `char`. These fields are never used for their values
and are instead their addresses are used for RTTI and pass
identification. By making them const, we avoid misuse of the fields as
global state.
Signed-off-by: Steffen Holst Larsen <HolstLarsen.Steffen at amd.com>
---
bolt/include/bolt/Core/BinaryContext.h | 2 +-
bolt/lib/Core/BinaryContext.cpp | 2 +-
clang-tools-extra/clangd/Protocol.cpp | 2 +-
clang-tools-extra/clangd/Protocol.h | 2 +-
.../clangd/support/Cancellation.cpp | 2 +-
.../clangd/support/Cancellation.h | 2 +-
clang-tools-extra/clangd/support/Logger.cpp | 4 +-
clang/include/clang/AST/ASTImportError.h | 2 +-
clang/include/clang/AST/ExternalASTSource.h | 2 +-
clang/include/clang/Basic/DiagnosticError.h | 2 +-
.../clang/CrossTU/CrossTranslationUnit.h | 2 +-
.../include/clang/ExtractAPI/APIIgnoresList.h | 2 +-
clang/include/clang/Sema/ExternalSemaSource.h | 2 +-
.../clang/Sema/MultiplexExternalSemaSource.h | 2 +-
.../clang/Serialization/ModuleFileExtension.h | 2 +-
.../include/clang/Tooling/Core/Replacement.h | 2 +-
clang/lib/AST/ASTImporter.cpp | 2 +-
clang/lib/AST/ExternalASTSource.cpp | 2 +-
clang/lib/Analysis/FlowSensitive/Arena.cpp | 4 +-
clang/lib/Basic/Diagnostic.cpp | 2 +-
clang/lib/CrossTU/CrossTranslationUnit.cpp | 2 +-
clang/lib/ExtractAPI/APIIgnoresList.cpp | 2 +-
.../lib/Frontend/TestModuleFileExtension.cpp | 2 +-
clang/lib/Frontend/TestModuleFileExtension.h | 2 +-
.../lib/Sema/MultiplexExternalSemaSource.cpp | 2 +-
clang/lib/Sema/Sema.cpp | 2 +-
clang/lib/Serialization/ASTReader.cpp | 4 +-
.../lib/Serialization/ModuleFileExtension.cpp | 2 +-
clang/lib/Tooling/Core/Replacement.cpp | 2 +-
clang/lib/Tooling/Transformer/Parsing.cpp | 4 +-
.../Frontend/CompilerInvocationTest.cpp | 4 +-
compiler-rt/lib/orc/rtti.cpp | 2 +-
compiler-rt/lib/orc/rtti.h | 16 +-
.../lldb/Expression/DiagnosticManager.h | 2 +-
.../Expression/ExpressionTypeSystemHelper.h | 2 +-
.../lldb/Expression/ExpressionVariable.h | 4 +-
lldb/include/lldb/Expression/FunctionCaller.h | 2 +-
.../lldb/Expression/LLVMUserExpression.h | 2 +-
lldb/include/lldb/Expression/ObjectFileJIT.h | 2 +-
lldb/include/lldb/Expression/REPL.h | 2 +-
lldb/include/lldb/Expression/UserExpression.h | 2 +-
.../include/lldb/Expression/UtilityFunction.h | 2 +-
lldb/include/lldb/Host/File.h | 6 +-
lldb/include/lldb/Host/Host.h | 2 +-
lldb/include/lldb/Host/HostInfoBase.h | 4 +-
lldb/include/lldb/Host/JSONTransport.h | 6 +-
.../lldb/Host/common/DiagnosticsRendering.h | 2 +-
lldb/include/lldb/Protocol/MCP/MCPError.h | 4 +-
lldb/include/lldb/Symbol/ObjectFile.h | 2 +-
lldb/include/lldb/Symbol/SymbolFile.h | 4 +-
lldb/include/lldb/Symbol/SymbolFileOnDemand.h | 2 +-
lldb/include/lldb/Target/BorrowedStackFrame.h | 2 +-
lldb/include/lldb/Target/LanguageRuntime.h | 2 +-
lldb/include/lldb/Target/StackFrame.h | 2 +-
lldb/include/lldb/Utility/DataBuffer.h | 6 +-
lldb/include/lldb/Utility/DataBufferHeap.h | 2 +-
lldb/include/lldb/Utility/DataBufferLLVM.h | 4 +-
lldb/include/lldb/Utility/Log.h | 10 +-
lldb/include/lldb/Utility/Status.h | 8 +-
.../include/lldb/Utility/UnimplementedError.h | 2 +-
lldb/source/Expression/DiagnosticManager.cpp | 2 +-
.../Expression/ExpressionTypeSystemHelper.cpp | 2 +-
lldb/source/Expression/ExpressionVariable.cpp | 4 +-
lldb/source/Expression/FunctionCaller.cpp | 2 +-
lldb/source/Expression/LLVMUserExpression.cpp | 2 +-
lldb/source/Expression/ObjectFileJIT.cpp | 2 +-
lldb/source/Expression/REPL.cpp | 2 +-
lldb/source/Expression/UserExpression.cpp | 2 +-
lldb/source/Expression/UtilityFunction.cpp | 2 +-
.../Host/common/DiagnosticsRendering.cpp | 2 +-
lldb/source/Host/common/File.cpp | 6 +-
lldb/source/Host/common/Host.cpp | 2 +-
lldb/source/Host/common/JSONTransport.cpp | 6 +-
lldb/source/Interpreter/Options.cpp | 4 +-
.../Clang/ClangExpressionHelper.cpp | 2 +-
.../Clang/ClangExpressionHelper.h | 2 +-
.../Clang/ClangExpressionVariable.cpp | 2 +-
.../Clang/ClangExpressionVariable.h | 2 +-
.../Clang/ClangExternalASTSourceCallbacks.cpp | 2 +-
.../Clang/ClangExternalASTSourceCallbacks.h | 2 +-
.../Clang/ClangFunctionCaller.cpp | 4 +-
.../Clang/ClangFunctionCaller.h | 4 +-
.../Clang/ClangPersistentVariables.cpp | 2 +-
.../Clang/ClangPersistentVariables.h | 2 +-
.../Clang/ClangUserExpression.cpp | 4 +-
.../Clang/ClangUserExpression.h | 4 +-
.../Clang/ClangUtilityFunction.cpp | 4 +-
.../Clang/ClangUtilityFunction.h | 4 +-
.../Clang/CxxModuleHandler.cpp | 4 +-
.../Clang/IRDynamicChecks.cpp | 2 +-
.../CPlusPlus/CPPLanguageRuntime.cpp | 2 +-
.../CPlusPlus/CPPLanguageRuntime.h | 2 +-
.../ItaniumABI/ItaniumABILanguageRuntime.cpp | 2 +-
.../ItaniumABI/ItaniumABILanguageRuntime.h | 2 +-
.../AppleObjCRuntime/AppleObjCRuntime.cpp | 2 +-
.../ObjC/AppleObjCRuntime/AppleObjCRuntime.h | 2 +-
.../AppleObjCRuntime/AppleObjCRuntimeV1.cpp | 2 +-
.../AppleObjCRuntime/AppleObjCRuntimeV1.h | 2 +-
.../AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 2 +-
.../AppleObjCRuntime/AppleObjCRuntimeV2.h | 2 +-
.../GNUstepObjCRuntime/GNUstepObjCRuntime.cpp | 2 +-
.../GNUstepObjCRuntime/GNUstepObjCRuntime.h | 2 +-
.../ObjC/ObjCLanguageRuntime.cpp | 2 +-
.../ObjC/ObjCLanguageRuntime.h | 2 +-
.../Breakpad/ObjectFileBreakpad.cpp | 2 +-
.../ObjectFile/Breakpad/ObjectFileBreakpad.h | 2 +-
.../ObjectFile/COFF/ObjectFileCOFF.cpp | 2 +-
.../Plugins/ObjectFile/COFF/ObjectFileCOFF.h | 2 +-
.../Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 2 +-
.../Plugins/ObjectFile/ELF/ObjectFileELF.h | 2 +-
.../ObjectFile/JSON/ObjectFileJSON.cpp | 2 +-
.../Plugins/ObjectFile/JSON/ObjectFileJSON.h | 2 +-
.../ObjectFile/Mach-O/ObjectFileMachO.cpp | 2 +-
.../ObjectFile/Mach-O/ObjectFileMachO.h | 2 +-
.../Plugins/ObjectFile/PDB/ObjectFilePDB.cpp | 2 +-
.../Plugins/ObjectFile/PDB/ObjectFilePDB.h | 2 +-
.../ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 2 +-
.../ObjectFile/PECOFF/ObjectFilePECOFF.h | 2 +-
.../ObjectFile/wasm/ObjectFileWasm.cpp | 2 +-
.../Plugins/ObjectFile/wasm/ObjectFileWasm.h | 2 +-
.../Process/scripted/ScriptedFrame.cpp | 2 +-
.../Plugins/Process/scripted/ScriptedFrame.h | 2 +-
lldb/source/Plugins/REPL/Clang/ClangREPL.cpp | 2 +-
lldb/source/Plugins/REPL/Clang/ClangREPL.h | 2 +-
.../Python/PythonDataObjects.cpp | 10 +-
.../Python/PythonDataObjects.h | 2 +-
.../Breakpad/SymbolFileBreakpad.cpp | 2 +-
.../SymbolFile/Breakpad/SymbolFileBreakpad.h | 2 +-
.../Plugins/SymbolFile/CTF/SymbolFileCTF.cpp | 2 +-
.../Plugins/SymbolFile/CTF/SymbolFileCTF.h | 2 +-
.../SymbolFile/DWARF/SymbolFileDWARF.cpp | 2 +-
.../SymbolFile/DWARF/SymbolFileDWARF.h | 2 +-
.../DWARF/SymbolFileDWARFDebugMap.cpp | 2 +-
.../DWARF/SymbolFileDWARFDebugMap.h | 2 +-
.../SymbolFile/DWARF/SymbolFileDWARFDwo.cpp | 2 +-
.../SymbolFile/DWARF/SymbolFileDWARFDwo.h | 2 +-
.../SymbolFile/JSON/SymbolFileJSON.cpp | 2 +-
.../Plugins/SymbolFile/JSON/SymbolFileJSON.h | 2 +-
.../NativePDB/SymbolFileNativePDB.cpp | 2 +-
.../NativePDB/SymbolFileNativePDB.h | 2 +-
.../Plugins/SymbolFile/PDB/SymbolFilePDB.cpp | 2 +-
.../Plugins/SymbolFile/PDB/SymbolFilePDB.h | 2 +-
.../SymbolFile/Symtab/SymbolFileSymtab.cpp | 2 +-
.../SymbolFile/Symtab/SymbolFileSymtab.h | 2 +-
.../Plugins/Trace/intel-pt/DecodedThread.cpp | 2 +-
.../Plugins/Trace/intel-pt/DecodedThread.h | 2 +-
.../TypeSystem/Clang/TypeSystemClang.cpp | 4 +-
.../TypeSystem/Clang/TypeSystemClang.h | 4 +-
lldb/source/Protocol/MCP/MCPError.cpp | 4 +-
lldb/source/Symbol/ObjectFile.cpp | 2 +-
lldb/source/Symbol/SymbolFile.cpp | 4 +-
lldb/source/Symbol/SymbolFileOnDemand.cpp | 2 +-
lldb/source/Target/BorrowedStackFrame.cpp | 2 +-
lldb/source/Target/LanguageRuntime.cpp | 2 +-
lldb/source/Target/StackFrame.cpp | 2 +-
lldb/source/Utility/DataBufferHeap.cpp | 8 +-
lldb/source/Utility/DataBufferLLVM.cpp | 4 +-
lldb/source/Utility/Log.cpp | 10 +-
lldb/source/Utility/Status.cpp | 8 +-
lldb/source/Utility/UnimplementedError.cpp | 2 +-
lldb/tools/lldb-dap/DAPError.cpp | 4 +-
lldb/tools/lldb-dap/DAPError.h | 4 +-
.../Expression/DWARFExpressionTest.cpp | 4 +-
lldb/unittests/Symbol/LineTableTest.cpp | 4 +-
llvm/docs/HowToSetUpLLVMStyleRTTI.rst | 12 +-
llvm/docs/ProgrammersManual.rst | 2 +-
llvm/examples/Bye/Bye.cpp | 4 +-
.../LLJITWithThinLTOSummaries.cpp | 8 +-
llvm/include/llvm/Analysis/AliasAnalysis.h | 4 +-
llvm/include/llvm/Analysis/AssumptionCache.h | 2 +-
.../llvm/Analysis/BasicAliasAnalysis.h | 2 +-
.../llvm/Analysis/BlockFrequencyInfo.h | 2 +-
.../llvm/Analysis/BranchProbabilityInfo.h | 2 +-
llvm/include/llvm/Analysis/CallGraph.h | 2 +-
llvm/include/llvm/Analysis/CallGraphSCCPass.h | 4 +-
llvm/include/llvm/Analysis/CycleAnalysis.h | 2 +-
.../llvm/Analysis/DOTGraphTraitsPass.h | 4 +-
.../llvm/Analysis/DXILMetadataAnalysis.h | 2 +-
llvm/include/llvm/Analysis/DXILResource.h | 6 +-
.../llvm/Analysis/DependenceAnalysis.h | 2 +-
.../include/llvm/Analysis/DominanceFrontier.h | 2 +-
llvm/include/llvm/Analysis/GlobalsModRef.h | 2 +-
.../llvm/Analysis/IRSimilarityIdentifier.h | 2 +-
llvm/include/llvm/Analysis/IVUsers.h | 2 +-
.../llvm/Analysis/LazyBlockFrequencyInfo.h | 2 +-
.../llvm/Analysis/LazyBranchProbabilityInfo.h | 2 +-
llvm/include/llvm/Analysis/LazyValueInfo.h | 2 +-
llvm/include/llvm/Analysis/LoopInfo.h | 2 +-
llvm/include/llvm/Analysis/LoopPass.h | 6 +-
.../llvm/Analysis/MemoryDependenceAnalysis.h | 2 +-
llvm/include/llvm/Analysis/MemorySSA.h | 2 +-
.../llvm/Analysis/ModuleSummaryAnalysis.h | 4 +-
.../llvm/Analysis/OptimizationRemarkEmitter.h | 2 +-
llvm/include/llvm/Analysis/PhiValues.h | 2 +-
llvm/include/llvm/Analysis/PostDominators.h | 2 +-
.../llvm/Analysis/ProfileSummaryInfo.h | 2 +-
llvm/include/llvm/Analysis/RegionInfo.h | 2 +-
llvm/include/llvm/Analysis/RegionPass.h | 4 +-
.../llvm/Analysis/RuntimeLibcallInfo.h | 2 +-
llvm/include/llvm/Analysis/ScalarEvolution.h | 2 +-
.../Analysis/ScalarEvolutionAliasAnalysis.h | 2 +-
llvm/include/llvm/Analysis/ScopedNoAliasAA.h | 2 +-
.../llvm/Analysis/StackSafetyAnalysis.h | 4 +-
.../llvm/Analysis/StaticDataProfileInfo.h | 2 +-
.../include/llvm/Analysis/TargetLibraryInfo.h | 2 +-
.../llvm/Analysis/TargetTransformInfo.h | 2 +-
.../llvm/Analysis/TypeBasedAliasAnalysis.h | 2 +-
.../llvm/Analysis/UniformityAnalysis.h | 2 +-
llvm/include/llvm/CAS/CASNodeSchema.h | 2 +-
llvm/include/llvm/CAS/NamedValuesSchema.h | 2 +-
llvm/include/llvm/CGData/CodeGenData.h | 2 +-
llvm/include/llvm/CodeGen/AsmPrinter.h | 4 +-
.../llvm/CodeGen/AssignmentTrackingAnalysis.h | 2 +-
.../CodeGen/BasicBlockMatchingAndInference.h | 2 +-
.../CodeGen/BasicBlockSectionsProfileReader.h | 2 +-
llvm/include/llvm/CodeGen/CFIFixup.h | 2 +-
llvm/include/llvm/CodeGen/EdgeBundles.h | 2 +-
.../include/llvm/CodeGen/ExecutionDomainFix.h | 2 +-
llvm/include/llvm/CodeGen/GCMetadata.h | 2 +-
.../include/llvm/CodeGen/GlobalISel/CSEInfo.h | 2 +-
.../CodeGen/GlobalISel/GISelValueTracking.h | 2 +-
.../llvm/CodeGen/GlobalISel/IRTranslator.h | 2 +-
.../CodeGen/GlobalISel/InstructionSelect.h | 4 +-
.../llvm/CodeGen/GlobalISel/Legalizer.h | 2 +-
.../llvm/CodeGen/GlobalISel/LoadStoreOpt.h | 2 +-
.../llvm/CodeGen/GlobalISel/Localizer.h | 2 +-
.../llvm/CodeGen/GlobalISel/RegBankSelect.h | 2 +-
llvm/include/llvm/CodeGen/IndirectThunks.h | 2 +-
.../CodeGen/LazyMachineBlockFrequencyInfo.h | 2 +-
.../llvm/CodeGen/LibcallLoweringInfo.h | 2 +-
.../include/llvm/CodeGen/LiveDebugVariables.h | 2 +-
llvm/include/llvm/CodeGen/LiveIntervals.h | 2 +-
llvm/include/llvm/CodeGen/LiveRegMatrix.h | 2 +-
llvm/include/llvm/CodeGen/LiveStacks.h | 2 +-
llvm/include/llvm/CodeGen/LiveVariables.h | 2 +-
llvm/include/llvm/CodeGen/MIR2Vec.h | 6 +-
.../include/llvm/CodeGen/MIRFSDiscriminator.h | 2 +-
llvm/include/llvm/CodeGen/MIRSampleProfile.h | 2 +-
.../llvm/CodeGen/MachineBlockFrequencyInfo.h | 2 +-
.../llvm/CodeGen/MachineBlockHashInfo.h | 2 +-
.../CodeGen/MachineBranchProbabilityInfo.h | 2 +-
.../llvm/CodeGen/MachineCycleAnalysis.h | 2 +-
.../llvm/CodeGen/MachineDominanceFrontier.h | 2 +-
llvm/include/llvm/CodeGen/MachineDominators.h | 2 +-
.../llvm/CodeGen/MachineFunctionPass.h | 2 +-
llvm/include/llvm/CodeGen/MachineLoopInfo.h | 2 +-
llvm/include/llvm/CodeGen/MachineModuleInfo.h | 2 +-
.../MachineOptimizationRemarkEmitter.h | 2 +-
llvm/include/llvm/CodeGen/MachinePipeliner.h | 2 +-
.../llvm/CodeGen/MachinePostDominators.h | 2 +-
llvm/include/llvm/CodeGen/MachineRegionInfo.h | 2 +-
.../llvm/CodeGen/MachineTraceMetrics.h | 2 +-
.../llvm/CodeGen/MachineUniformityAnalysis.h | 2 +-
llvm/include/llvm/CodeGen/Passes.h | 154 +++++++++---------
.../llvm/CodeGen/ReachingDefAnalysis.h | 2 +-
.../llvm/CodeGen/RegAllocEvictionAdvisor.h | 2 +-
.../llvm/CodeGen/RegAllocPriorityAdvisor.h | 2 +-
llvm/include/llvm/CodeGen/RegisterUsageInfo.h | 2 +-
llvm/include/llvm/CodeGen/ReplaceWithVeclib.h | 2 +-
llvm/include/llvm/CodeGen/SelectionDAGISel.h | 2 +-
llvm/include/llvm/CodeGen/SlotIndexes.h | 2 +-
llvm/include/llvm/CodeGen/SpillPlacement.h | 2 +-
llvm/include/llvm/CodeGen/StackProtector.h | 2 +-
llvm/include/llvm/CodeGen/TargetPassConfig.h | 2 +-
llvm/include/llvm/CodeGen/VirtRegMap.h | 2 +-
llvm/include/llvm/DWP/DWPError.h | 2 +-
.../llvm/DebugInfo/CodeView/CodeViewError.h | 2 +-
.../DebugInfo/DWARF/DWARFAcceleratorTable.h | 2 +-
.../llvm/DebugInfo/DWARF/DWARFDebugLoc.h | 2 +-
llvm/include/llvm/DebugInfo/MSF/MSFError.h | 2 +-
.../include/llvm/DebugInfo/PDB/DIA/DIAError.h | 2 +-
.../include/llvm/DebugInfo/PDB/GenericError.h | 2 +-
.../llvm/DebugInfo/PDB/Native/RawError.h | 2 +-
llvm/include/llvm/Debuginfod/HTTPServer.h | 2 +-
.../llvm/ExecutionEngine/JITLink/JITLink.h | 2 +-
llvm/include/llvm/ExecutionEngine/Orc/Core.h | 20 +--
llvm/include/llvm/ExecutionEngine/Orc/Layer.h | 2 +-
.../ExecutionEngine/Orc/MaterializationUnit.h | 2 +-
.../ExecutionEngine/Orc/ObjectLinkingLayer.h | 2 +-
.../Orc/ObjectTransformLayer.h | 2 +-
.../Orc/RTDyldObjectLinkingLayer.h | 2 +-
.../ExecutionEngine/Orc/Shared/OrcError.h | 4 +-
.../llvm/ExecutionEngine/Orc/TaskDispatch.h | 6 +-
.../llvm/ExecutionEngine/RuntimeDyld.h | 2 +-
.../Frontend/HLSL/RootSignatureMetadata.h | 2 +-
llvm/include/llvm/IR/Dominators.h | 2 +-
llvm/include/llvm/IR/LLVMRemarkStreamer.h | 6 +-
llvm/include/llvm/IR/LegacyPassManagers.h | 2 +-
llvm/include/llvm/MCA/InstrBuilder.h | 2 +-
llvm/include/llvm/MCA/Stages/Stage.h | 2 +-
llvm/include/llvm/MCA/Support.h | 4 +-
llvm/include/llvm/Object/Error.h | 4 +-
llvm/include/llvm/Pass.h | 10 +-
llvm/include/llvm/PassAnalysisSupport.h | 8 +-
.../ProfileData/Coverage/CoverageMapping.h | 2 +-
llvm/include/llvm/ProfileData/InstrProf.h | 2 +-
.../llvm/ProfileData/SymbolRemappingReader.h | 2 +-
llvm/include/llvm/Remarks/RemarkParser.h | 2 +-
llvm/include/llvm/Support/BinaryStreamError.h | 2 +-
llvm/include/llvm/Support/Error.h | 10 +-
llvm/include/llvm/Support/ExtensibleRTTI.h | 16 +-
llvm/include/llvm/Support/JSON.h | 2 +-
llvm/include/llvm/Support/LSP/Protocol.h | 2 +-
.../include/llvm/Support/VirtualOutputError.h | 6 +-
llvm/include/llvm/Support/VirtualOutputFile.h | 4 +-
llvm/include/llvm/TextAPI/TextAPIError.h | 2 +-
.../llvm/Transforms/InstCombine/InstCombine.h | 4 +-
llvm/include/llvm/Transforms/Utils.h | 10 +-
.../WindowsManifest/WindowsManifestMerger.h | 2 +-
llvm/lib/Analysis/AliasAnalysis.cpp | 4 +-
llvm/lib/Analysis/AssumptionCache.cpp | 2 +-
llvm/lib/Analysis/BasicAliasAnalysis.cpp | 2 +-
llvm/lib/Analysis/BlockFrequencyInfo.cpp | 2 +-
llvm/lib/Analysis/BranchProbabilityInfo.cpp | 2 +-
llvm/lib/Analysis/CallGraph.cpp | 2 +-
llvm/lib/Analysis/CallGraphSCCPass.cpp | 10 +-
llvm/lib/Analysis/CallPrinter.cpp | 8 +-
llvm/lib/Analysis/CycleAnalysis.cpp | 2 +-
llvm/lib/Analysis/DXILMetadataAnalysis.cpp | 2 +-
llvm/lib/Analysis/DXILResource.cpp | 6 +-
llvm/lib/Analysis/DependenceAnalysis.cpp | 2 +-
llvm/lib/Analysis/DomPrinter.cpp | 32 ++--
llvm/lib/Analysis/DominanceFrontier.cpp | 2 +-
llvm/lib/Analysis/GlobalsModRef.cpp | 2 +-
llvm/lib/Analysis/IRSimilarityIdentifier.cpp | 2 +-
llvm/lib/Analysis/IVUsers.cpp | 2 +-
llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp | 2 +-
.../Analysis/LazyBranchProbabilityInfo.cpp | 2 +-
llvm/lib/Analysis/LazyValueInfo.cpp | 2 +-
llvm/lib/Analysis/LoopInfo.cpp | 2 +-
llvm/lib/Analysis/LoopPass.cpp | 8 +-
.../lib/Analysis/MemoryDependenceAnalysis.cpp | 2 +-
llvm/lib/Analysis/MemorySSA.cpp | 2 +-
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 4 +-
.../Analysis/OptimizationRemarkEmitter.cpp | 2 +-
llvm/lib/Analysis/PhiValues.cpp | 2 +-
llvm/lib/Analysis/PostDominators.cpp | 2 +-
llvm/lib/Analysis/ProfileSummaryInfo.cpp | 2 +-
llvm/lib/Analysis/RegionInfo.cpp | 2 +-
llvm/lib/Analysis/RegionPass.cpp | 6 +-
llvm/lib/Analysis/RegionPrinter.cpp | 16 +-
llvm/lib/Analysis/RuntimeLibcallInfo.cpp | 2 +-
llvm/lib/Analysis/ScalarEvolution.cpp | 2 +-
.../Analysis/ScalarEvolutionAliasAnalysis.cpp | 2 +-
llvm/lib/Analysis/ScopedNoAliasAA.cpp | 2 +-
llvm/lib/Analysis/StackSafetyAnalysis.cpp | 4 +-
llvm/lib/Analysis/StaticDataProfileInfo.cpp | 2 +-
llvm/lib/Analysis/TargetLibraryInfo.cpp | 2 +-
llvm/lib/Analysis/TargetTransformInfo.cpp | 2 +-
llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp | 2 +-
llvm/lib/Analysis/UniformityAnalysis.cpp | 2 +-
llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 4 +-
llvm/lib/CAS/CASNodeSchema.cpp | 2 +-
llvm/lib/CAS/NamedValuesSchema.cpp | 2 +-
llvm/lib/CGData/CodeGenData.cpp | 2 +-
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 +-
.../CodeGen/AssignmentTrackingAnalysis.cpp | 2 +-
llvm/lib/CodeGen/AtomicExpandPass.cpp | 6 +-
.../BasicBlockMatchingAndInference.cpp | 2 +-
llvm/lib/CodeGen/BasicBlockPathCloning.cpp | 4 +-
llvm/lib/CodeGen/BasicBlockSections.cpp | 4 +-
.../BasicBlockSectionsProfileReader.cpp | 2 +-
llvm/lib/CodeGen/BranchFolding.cpp | 6 +-
llvm/lib/CodeGen/BranchRelaxation.cpp | 6 +-
llvm/lib/CodeGen/BreakFalseDeps.cpp | 4 +-
llvm/lib/CodeGen/CFGuardLongjmp.cpp | 4 +-
llvm/lib/CodeGen/CFIFixup.cpp | 2 +-
llvm/lib/CodeGen/CFIInstrInserter.cpp | 12 +-
llvm/lib/CodeGen/CallBrPrepare.cpp | 4 +-
llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 +-
.../lib/CodeGen/ComplexDeinterleavingPass.cpp | 4 +-
.../CodeGen/DeadMachineInstructionElim.cpp | 6 +-
llvm/lib/CodeGen/DetectDeadLanes.cpp | 6 +-
llvm/lib/CodeGen/DwarfEHPrepare.cpp | 4 +-
llvm/lib/CodeGen/EHContGuardTargets.cpp | 4 +-
llvm/lib/CodeGen/EarlyIfConversion.cpp | 12 +-
llvm/lib/CodeGen/EdgeBundles.cpp | 4 +-
llvm/lib/CodeGen/ExpandIRInsts.cpp | 4 +-
llvm/lib/CodeGen/ExpandMemCmp.cpp | 4 +-
llvm/lib/CodeGen/ExpandPostRAPseudos.cpp | 6 +-
llvm/lib/CodeGen/ExpandReductions.cpp | 4 +-
llvm/lib/CodeGen/FEntryInserter.cpp | 6 +-
llvm/lib/CodeGen/FinalizeISel.cpp | 6 +-
.../CodeGen/FixupStatepointCallerSaved.cpp | 7 +-
llvm/lib/CodeGen/FuncletLayout.cpp | 6 +-
llvm/lib/CodeGen/GCEmptyBasicBlocks.cpp | 4 +-
llvm/lib/CodeGen/GCMetadata.cpp | 2 +-
llvm/lib/CodeGen/GCRootLowering.cpp | 12 +-
llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp | 2 +-
.../CodeGen/GlobalISel/GISelValueTracking.cpp | 2 +-
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 2 +-
.../CodeGen/GlobalISel/InstructionSelect.cpp | 4 +-
llvm/lib/CodeGen/GlobalISel/Legalizer.cpp | 2 +-
llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp | 2 +-
llvm/lib/CodeGen/GlobalISel/Localizer.cpp | 2 +-
llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 2 +-
llvm/lib/CodeGen/GlobalMerge.cpp | 4 +-
llvm/lib/CodeGen/GlobalMergeFunctions.cpp | 4 +-
llvm/lib/CodeGen/HardwareLoops.cpp | 4 +-
llvm/lib/CodeGen/IfConversion.cpp | 6 +-
llvm/lib/CodeGen/ImplicitNullChecks.cpp | 6 +-
llvm/lib/CodeGen/IndirectBrExpandPass.cpp | 4 +-
llvm/lib/CodeGen/InitUndef.cpp | 6 +-
llvm/lib/CodeGen/InsertCodePrefetch.cpp | 4 +-
llvm/lib/CodeGen/InterleavedAccessPass.cpp | 4 +-
.../CodeGen/InterleavedLoadCombinePass.cpp | 4 +-
llvm/lib/CodeGen/JMCInstrumenter.cpp | 4 +-
llvm/lib/CodeGen/KCFI.cpp | 4 +-
.../CodeGen/LazyMachineBlockFrequencyInfo.cpp | 2 +-
llvm/lib/CodeGen/LibcallLoweringInfo.cpp | 2 +-
.../LiveDebugValues/LiveDebugValues.cpp | 6 +-
llvm/lib/CodeGen/LiveDebugVariables.cpp | 2 +-
llvm/lib/CodeGen/LiveIntervals.cpp | 4 +-
llvm/lib/CodeGen/LiveRangeShrink.cpp | 6 +-
llvm/lib/CodeGen/LiveRegMatrix.cpp | 2 +-
llvm/lib/CodeGen/LiveStacks.cpp | 4 +-
llvm/lib/CodeGen/LiveVariables.cpp | 4 +-
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | 6 +-
llvm/lib/CodeGen/LowerEmuTLS.cpp | 4 +-
llvm/lib/CodeGen/MIR2Vec.cpp | 6 +-
llvm/lib/CodeGen/MIRCanonicalizerPass.cpp | 6 +-
llvm/lib/CodeGen/MIRFSDiscriminator.cpp | 4 +-
llvm/lib/CodeGen/MIRNamerPass.cpp | 4 +-
llvm/lib/CodeGen/MIRPrintingPass.cpp | 6 +-
llvm/lib/CodeGen/MIRSampleProfile.cpp | 4 +-
llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp | 4 +-
.../lib/CodeGen/MachineBlockFrequencyInfo.cpp | 2 +-
llvm/lib/CodeGen/MachineBlockHashInfo.cpp | 2 +-
llvm/lib/CodeGen/MachineBlockPlacement.cpp | 13 +-
.../CodeGen/MachineBranchProbabilityInfo.cpp | 2 +-
llvm/lib/CodeGen/MachineCFGPrinter.cpp | 6 +-
llvm/lib/CodeGen/MachineCSE.cpp | 6 +-
llvm/lib/CodeGen/MachineCheckDebugify.cpp | 4 +-
llvm/lib/CodeGen/MachineCombiner.cpp | 6 +-
llvm/lib/CodeGen/MachineCopyPropagation.cpp | 6 +-
llvm/lib/CodeGen/MachineCycleAnalysis.cpp | 6 +-
llvm/lib/CodeGen/MachineDebugify.cpp | 4 +-
llvm/lib/CodeGen/MachineDominanceFrontier.cpp | 4 +-
llvm/lib/CodeGen/MachineDominators.cpp | 4 +-
.../CodeGen/MachineFunctionPrinterPass.cpp | 6 +-
llvm/lib/CodeGen/MachineFunctionSplitter.cpp | 4 +-
llvm/lib/CodeGen/MachineInstrBundle.cpp | 6 +-
llvm/lib/CodeGen/MachineLICM.cpp | 14 +-
llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp | 7 +-
llvm/lib/CodeGen/MachineLoopInfo.cpp | 4 +-
llvm/lib/CodeGen/MachineModuleInfo.cpp | 6 +-
.../MachineOptimizationRemarkEmitter.cpp | 2 +-
llvm/lib/CodeGen/MachineOutliner.cpp | 4 +-
llvm/lib/CodeGen/MachinePipeliner.cpp | 4 +-
llvm/lib/CodeGen/MachinePostDominators.cpp | 2 +-
llvm/lib/CodeGen/MachineRegionInfo.cpp | 4 +-
llvm/lib/CodeGen/MachineScheduler.cpp | 12 +-
llvm/lib/CodeGen/MachineSink.cpp | 12 +-
llvm/lib/CodeGen/MachineStripDebug.cpp | 4 +-
llvm/lib/CodeGen/MachineTraceMetrics.cpp | 4 +-
.../lib/CodeGen/MachineUniformityAnalysis.cpp | 6 +-
llvm/lib/CodeGen/MachineVerifier.cpp | 4 +-
llvm/lib/CodeGen/ModuloSchedule.cpp | 4 +-
llvm/lib/CodeGen/OptimizePHIs.cpp | 6 +-
llvm/lib/CodeGen/PHIElimination.cpp | 6 +-
llvm/lib/CodeGen/PatchableFunction.cpp | 6 +-
llvm/lib/CodeGen/PeepholeOptimizer.cpp | 6 +-
llvm/lib/CodeGen/PostRAHazardRecognizer.cpp | 6 +-
llvm/lib/CodeGen/PostRASchedulerList.cpp | 6 +-
llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 4 +-
llvm/lib/CodeGen/ProcessImplicitDefs.cpp | 6 +-
llvm/lib/CodeGen/PrologEpilogInserter.cpp | 6 +-
llvm/lib/CodeGen/PseudoProbeInserter.cpp | 4 +-
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | 2 +-
llvm/lib/CodeGen/RegAllocBasic.cpp | 4 +-
llvm/lib/CodeGen/RegAllocBasic.h | 2 +-
llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp | 2 +-
llvm/lib/CodeGen/RegAllocFast.cpp | 4 +-
llvm/lib/CodeGen/RegAllocGreedy.cpp | 6 +-
llvm/lib/CodeGen/RegAllocPBQP.cpp | 4 +-
llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp | 2 +-
llvm/lib/CodeGen/RegUsageInfoCollector.cpp | 4 +-
llvm/lib/CodeGen/RegUsageInfoPropagate.cpp | 4 +-
llvm/lib/CodeGen/RegisterCoalescer.cpp | 6 +-
llvm/lib/CodeGen/RegisterScavenging.cpp | 4 +-
llvm/lib/CodeGen/RegisterUsageInfo.cpp | 2 +-
llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp | 6 +-
.../CodeGen/RemoveRedundantDebugValues.cpp | 7 +-
llvm/lib/CodeGen/RenameIndependentSubregs.cpp | 7 +-
llvm/lib/CodeGen/ReplaceWithVeclib.cpp | 2 +-
llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | 4 +-
llvm/lib/CodeGen/SafeStack.cpp | 4 +-
llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp | 6 +-
llvm/lib/CodeGen/SelectOptimize.cpp | 4 +-
.../CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 +-
llvm/lib/CodeGen/ShadowStackGCLowering.cpp | 6 +-
llvm/lib/CodeGen/ShrinkWrap.cpp | 6 +-
llvm/lib/CodeGen/SjLjEHPrepare.cpp | 4 +-
llvm/lib/CodeGen/SlotIndexes.cpp | 2 +-
llvm/lib/CodeGen/SpillPlacement.cpp | 4 +-
llvm/lib/CodeGen/StackColoring.cpp | 6 +-
.../CodeGen/StackFrameLayoutAnalysisPass.cpp | 7 +-
llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp | 6 +-
llvm/lib/CodeGen/StackProtector.cpp | 2 +-
llvm/lib/CodeGen/StackSlotColoring.cpp | 6 +-
llvm/lib/CodeGen/StaticDataAnnotator.cpp | 4 +-
llvm/lib/CodeGen/StaticDataSplitter.cpp | 4 +-
llvm/lib/CodeGen/TailDuplication.cpp | 14 +-
llvm/lib/CodeGen/TargetPassConfig.cpp | 2 +-
.../lib/CodeGen/TwoAddressInstructionPass.cpp | 7 +-
llvm/lib/CodeGen/TypePromotion.cpp | 4 +-
llvm/lib/CodeGen/UnreachableBlockElim.cpp | 10 +-
llvm/lib/CodeGen/VirtRegMap.cpp | 8 +-
llvm/lib/CodeGen/WasmEHPrepare.cpp | 4 +-
llvm/lib/CodeGen/WinEHPrepare.cpp | 4 +-
llvm/lib/CodeGen/WindowsSecureHotPatching.cpp | 4 +-
llvm/lib/CodeGen/XRayInstrumentation.cpp | 6 +-
llvm/lib/DWP/DWPError.cpp | 2 +-
llvm/lib/DebugInfo/CodeView/CodeViewError.cpp | 2 +-
.../DebugInfo/DWARF/DWARFAcceleratorTable.cpp | 2 +-
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 2 +-
llvm/lib/DebugInfo/MSF/MSFError.cpp | 2 +-
llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp | 2 +-
llvm/lib/DebugInfo/PDB/GenericError.cpp | 2 +-
llvm/lib/DebugInfo/PDB/Native/RawError.cpp | 2 +-
llvm/lib/Debuginfod/HTTPServer.cpp | 2 +-
llvm/lib/ExecutionEngine/JITLink/JITLink.cpp | 2 +-
llvm/lib/ExecutionEngine/Orc/Core.cpp | 20 +--
llvm/lib/ExecutionEngine/Orc/Layer.cpp | 2 +-
.../Orc/ObjectLinkingLayer.cpp | 2 +-
.../Orc/ObjectTransformLayer.cpp | 2 +-
.../Orc/RTDyldObjectLinkingLayer.cpp | 2 +-
.../ExecutionEngine/Orc/Shared/OrcError.cpp | 4 +-
llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp | 6 +-
.../RuntimeDyld/RuntimeDyld.cpp | 2 +-
llvm/lib/FileCheck/FileCheck.cpp | 10 +-
llvm/lib/FileCheck/FileCheckImpl.h | 10 +-
.../Frontend/HLSL/RootSignatureMetadata.cpp | 2 +-
llvm/lib/IR/Dominators.cpp | 2 +-
llvm/lib/IR/IRPrintingPasses.cpp | 8 +-
llvm/lib/IR/LLVMRemarkStreamer.cpp | 6 +-
llvm/lib/IR/LegacyPassManager.cpp | 14 +-
llvm/lib/IR/Pass.cpp | 6 +-
llvm/lib/IR/SafepointIRVerifier.cpp | 4 +-
llvm/lib/IR/Verifier.cpp | 4 +-
llvm/lib/MCA/InstrBuilder.cpp | 2 +-
llvm/lib/MCA/Stages/Stage.cpp | 2 +-
llvm/lib/Object/DXContainer.cpp | 4 +-
llvm/lib/Object/Error.cpp | 4 +-
.../ProfileData/Coverage/CoverageMapping.cpp | 2 +-
llvm/lib/ProfileData/InstrProf.cpp | 2 +-
.../lib/ProfileData/SymbolRemappingReader.cpp | 2 +-
llvm/lib/Remarks/RemarkParser.cpp | 2 +-
llvm/lib/Remarks/YAMLRemarkParser.cpp | 2 +-
llvm/lib/Remarks/YAMLRemarkParser.h | 2 +-
llvm/lib/Support/BinaryStreamError.cpp | 2 +-
llvm/lib/Support/Error.cpp | 12 +-
llvm/lib/Support/ExtensibleRTTI.cpp | 2 +-
llvm/lib/Support/JSON.cpp | 2 +-
llvm/lib/Support/LSP/Protocol.cpp | 2 +-
llvm/lib/Support/VirtualOutputError.cpp | 6 +-
llvm/lib/Support/VirtualOutputFile.cpp | 4 +-
.../Target/AArch64/AArch64A53Fix835769.cpp | 4 +-
.../AArch64/AArch64A57FPLoadBalancing.cpp | 4 +-
.../AArch64/AArch64AdvSIMDScalarPass.cpp | 4 +-
.../AArch64/AArch64Arm64ECCallLowering.cpp | 4 +-
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 4 +-
.../Target/AArch64/AArch64BranchTargets.cpp | 4 +-
.../AArch64CleanupLocalDynamicTLSPass.cpp | 4 +-
llvm/lib/Target/AArch64/AArch64CollectLOH.cpp | 4 +-
.../AArch64/AArch64CompressJumpTables.cpp | 4 +-
.../Target/AArch64/AArch64CondBrTuning.cpp | 4 +-
.../AArch64/AArch64ConditionOptimizer.cpp | 4 +-
.../AArch64/AArch64ConditionalCompares.cpp | 4 +-
.../AArch64DeadRegisterDefinitionsPass.cpp | 4 +-
.../AArch64/AArch64ExpandPseudoInsts.cpp | 4 +-
.../Target/AArch64/AArch64FalkorHWPFFix.cpp | 8 +-
.../Target/AArch64/AArch64ISelDAGToDAG.cpp | 4 +-
.../AArch64/AArch64LoadStoreOptimizer.cpp | 4 +-
.../AArch64LowerHomogeneousPrologEpilog.cpp | 4 +-
.../Target/AArch64/AArch64MIPeepholeOpt.cpp | 4 +-
.../lib/Target/AArch64/AArch64PointerAuth.cpp | 4 +-
.../AArch64/AArch64PostCoalescerPass.cpp | 4 +-
.../Target/AArch64/AArch64PromoteConstant.cpp | 4 +-
.../AArch64RedundantCondBranchPass.cpp | 4 +-
.../AArch64RedundantCopyElimination.cpp | 4 +-
.../Target/AArch64/AArch64SIMDInstrOpt.cpp | 4 +-
.../Target/AArch64/AArch64SLSHardening.cpp | 4 +-
.../AArch64/AArch64SpeculationHardening.cpp | 4 +-
.../Target/AArch64/AArch64StackTagging.cpp | 4 +-
.../AArch64/AArch64StackTaggingPreRA.cpp | 4 +-
.../AArch64/AArch64StorePairSuppress.cpp | 4 +-
.../GISel/AArch64O0PreLegalizerCombiner.cpp | 4 +-
.../GISel/AArch64PostLegalizerCombiner.cpp | 4 +-
.../GISel/AArch64PostLegalizerLowering.cpp | 4 +-
.../GISel/AArch64PostSelectOptimize.cpp | 4 +-
.../GISel/AArch64PreLegalizerCombiner.cpp | 4 +-
llvm/lib/Target/AArch64/SMEABIPass.cpp | 4 +-
llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp | 4 +-
llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp | 4 +-
llvm/lib/Target/AMDGPU/AMDGPU.h | 132 +++++++--------
.../lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp | 4 +-
llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h | 4 +-
.../Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp | 4 +-
.../AMDGPU/AMDGPUAnnotateUniformValues.cpp | 4 +-
.../Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp | 2 +-
.../Target/AMDGPU/AMDGPUArgumentUsageInfo.h | 2 +-
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | 2 +-
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h | 2 +-
.../Target/AMDGPU/AMDGPUAtomicOptimizer.cpp | 6 +-
.../Target/AMDGPU/AMDGPUCodeGenPrepare.cpp | 4 +-
.../Target/AMDGPU/AMDGPUCtorDtorLowering.cpp | 6 +-
.../AMDGPUExportKernelRuntimeHandles.cpp | 6 +-
.../AMDGPUGlobalISelDivergenceLowering.cpp | 6 +-
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 2 +-
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h | 2 +-
.../AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp | 4 +-
.../Target/AMDGPU/AMDGPUInsertDelayAlu.cpp | 6 +-
.../AMDGPU/AMDGPULateCodeGenPrepare.cpp | 4 +-
.../AMDGPU/AMDGPULowerBufferFatPointers.cpp | 7 +-
.../lib/Target/AMDGPU/AMDGPULowerExecSync.cpp | 7 +-
.../Target/AMDGPU/AMDGPULowerIntrinsics.cpp | 4 +-
.../AMDGPU/AMDGPULowerKernelArguments.cpp | 4 +-
.../AMDGPU/AMDGPULowerKernelAttributes.cpp | 4 +-
.../AMDGPU/AMDGPULowerModuleLDSPass.cpp | 7 +-
.../Target/AMDGPU/AMDGPULowerVGPREncoding.cpp | 7 +-
.../AMDGPU/AMDGPUMarkLastScratchLoad.cpp | 7 +-
.../Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp | 7 +-
.../AMDGPU/AMDGPUPostLegalizerCombiner.cpp | 4 +-
.../AMDGPU/AMDGPUPreLegalizerCombiner.cpp | 4 +-
.../AMDGPU/AMDGPUPreloadKernArgProlog.cpp | 6 +-
.../AMDGPU/AMDGPUPreloadKernelArguments.cpp | 4 +-
.../Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp | 7 +-
.../AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | 6 +-
.../lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp | 6 +-
.../AMDGPU/AMDGPUPromoteKernelArguments.cpp | 4 +-
.../Target/AMDGPU/AMDGPURegBankCombiner.cpp | 4 +-
.../Target/AMDGPU/AMDGPURegBankLegalize.cpp | 6 +-
.../lib/Target/AMDGPU/AMDGPURegBankSelect.cpp | 6 +-
.../AMDGPURemoveIncompatibleFunctions.cpp | 4 +-
.../Target/AMDGPU/AMDGPUReserveWWMRegs.cpp | 6 +-
.../AMDGPU/AMDGPUResourceUsageAnalysis.cpp | 4 +-
.../AMDGPU/AMDGPUResourceUsageAnalysis.h | 4 +-
.../AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp | 6 +-
.../AMDGPU/AMDGPURewriteOutArguments.cpp | 4 +-
.../AMDGPU/AMDGPURewriteUndefForPHI.cpp | 4 +-
.../Target/AMDGPU/AMDGPUSetWavePriority.cpp | 4 +-
llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp | 6 +-
.../AMDGPU/AMDGPUUniformIntrinsicCombine.cpp | 6 +-
.../AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp | 7 +-
.../Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp | 7 +-
llvm/lib/Target/AMDGPU/GCNCreateVOPD.cpp | 6 +-
llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | 6 +-
llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp | 6 +-
.../Target/AMDGPU/GCNPreRALongBranchReg.cpp | 6 +-
.../Target/AMDGPU/GCNPreRAOptimizations.cpp | 6 +-
llvm/lib/Target/AMDGPU/GCNRegPressure.cpp | 4 +-
llvm/lib/Target/AMDGPU/GCNRegPressure.h | 2 +-
.../AMDGPU/GCNRewritePartialRegUses.cpp | 7 +-
llvm/lib/Target/AMDGPU/R600.h | 10 +-
.../lib/Target/AMDGPU/R600ClauseMergePass.cpp | 6 +-
.../AMDGPU/R600ControlFlowFinalizer.cpp | 6 +-
.../Target/AMDGPU/R600EmitClauseMarkers.cpp | 4 +-
.../Target/AMDGPU/R600ExpandSpecialInstrs.cpp | 7 +-
llvm/lib/Target/AMDGPU/R600ISelDAGToDAG.cpp | 4 +-
.../AMDGPU/R600MachineCFGStructurizer.cpp | 4 +-
.../R600OpenCLImageTypeLoweringPass.cpp | 4 +-
.../AMDGPU/R600OptimizeVectorRegisters.cpp | 6 +-
llvm/lib/Target/AMDGPU/R600Packetizer.cpp | 6 +-
.../Target/AMDGPU/SIAnnotateControlFlow.cpp | 4 +-
llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp | 6 +-
.../lib/Target/AMDGPU/SIFormMemoryClauses.cpp | 6 +-
.../lib/Target/AMDGPU/SIInsertHardClauses.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 6 +-
.../Target/AMDGPU/SILateBranchLowering.cpp | 6 +-
.../Target/AMDGPU/SILoadStoreOptimizer.cpp | 6 +-
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 6 +-
llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp | 6 +-
llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp | 6 +-
llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIModeRegister.cpp | 6 +-
.../Target/AMDGPU/SIOptimizeExecMasking.cpp | 7 +-
.../AMDGPU/SIOptimizeExecMaskingPreRA.cpp | 7 +-
.../Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp | 7 +-
llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIPostRABundler.cpp | 6 +-
.../Target/AMDGPU/SIPreAllocateWWMRegs.cpp | 6 +-
llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp | 6 +-
.../Target/AMDGPU/SIShrinkInstructions.cpp | 4 +-
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp | 6 +-
llvm/lib/Target/ARC/ARCAsmPrinter.cpp | 4 +-
llvm/lib/Target/ARC/ARCBranchFinalize.cpp | 4 +-
llvm/lib/Target/ARC/ARCExpandPseudos.cpp | 4 +-
llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/ARC/ARCOptAddrMode.cpp | 4 +-
llvm/lib/Target/ARM/A15SDOptimizer.cpp | 4 +-
llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 2 +-
llvm/lib/Target/ARM/ARMAsmPrinter.h | 2 +-
llvm/lib/Target/ARM/ARMBlockPlacement.cpp | 4 +-
llvm/lib/Target/ARM/ARMBranchTargets.cpp | 4 +-
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | 4 +-
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp | 4 +-
.../ARM/ARMFixCortexA57AES1742098Pass.cpp | 4 +-
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 8 +-
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | 4 +-
.../Target/ARM/ARMOptimizeBarriersPass.cpp | 4 +-
llvm/lib/Target/ARM/ARMParallelDSP.cpp | 4 +-
llvm/lib/Target/ARM/ARMSLSHardening.cpp | 8 +-
llvm/lib/Target/ARM/ARMTargetMachine.cpp | 4 +-
llvm/lib/Target/ARM/MLxExpansionPass.cpp | 4 +-
.../Target/ARM/MVEGatherScatterLowering.cpp | 4 +-
.../Target/ARM/MVELaneInterleavingPass.cpp | 4 +-
.../ARM/MVETPAndVPTOptimisationsPass.cpp | 4 +-
llvm/lib/Target/ARM/MVETailPredication.cpp | 4 +-
llvm/lib/Target/ARM/MVEVPTBlockPass.cpp | 4 +-
llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp | 4 +-
llvm/lib/Target/ARM/Thumb2SizeReduction.cpp | 4 +-
llvm/lib/Target/AVR/AVRAsmPrinter.cpp | 4 +-
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp | 4 +-
llvm/lib/Target/AVR/AVRFrameLowering.cpp | 4 +-
llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/AVR/AVRShiftExpand.cpp | 4 +-
llvm/lib/Target/BPF/BPFAsmPrinter.cpp | 2 +-
llvm/lib/Target/BPF/BPFAsmPrinter.h | 2 +-
llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp | 4 +-
llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/BPF/BPFMIChecking.cpp | 4 +-
llvm/lib/Target/BPF/BPFMIPeephole.cpp | 8 +-
.../lib/Target/BPF/BPFMISimplifyPatchable.cpp | 4 +-
.../Target/CSKY/CSKYConstantIslandPass.cpp | 4 +-
llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp | 4 +-
.../lib/Target/DirectX/DXContainerGlobals.cpp | 4 +-
llvm/lib/Target/DirectX/DXILCBufferAccess.cpp | 4 +-
.../Target/DirectX/DXILDataScalarization.cpp | 4 +-
.../Target/DirectX/DXILFinalizeLinkage.cpp | 2 +-
llvm/lib/Target/DirectX/DXILFinalizeLinkage.h | 2 +-
llvm/lib/Target/DirectX/DXILFlattenArrays.cpp | 4 +-
.../DirectX/DXILForwardHandleAccesses.cpp | 4 +-
.../Target/DirectX/DXILIntrinsicExpansion.cpp | 4 +-
llvm/lib/Target/DirectX/DXILLegalizePass.cpp | 4 +-
llvm/lib/Target/DirectX/DXILMemIntrinsics.cpp | 4 +-
llvm/lib/Target/DirectX/DXILOpLowering.cpp | 4 +-
.../DXILPostOptimizationValidation.cpp | 4 +-
llvm/lib/Target/DirectX/DXILPrepare.cpp | 4 +-
llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp | 4 +-
.../lib/Target/DirectX/DXILResourceAccess.cpp | 4 +-
.../DirectX/DXILResourceImplicitBinding.cpp | 4 +-
llvm/lib/Target/DirectX/DXILRootSignature.cpp | 2 +-
llvm/lib/Target/DirectX/DXILRootSignature.h | 2 +-
llvm/lib/Target/DirectX/DXILShaderFlags.cpp | 2 +-
llvm/lib/Target/DirectX/DXILShaderFlags.h | 2 +-
.../Target/DirectX/DXILTranslateMetadata.cpp | 2 +-
.../Target/DirectX/DXILTranslateMetadata.h | 2 +-
.../DirectX/DXILWriter/DXILWriterPass.cpp | 8 +-
llvm/lib/Target/Hexagon/Hexagon.h | 6 +-
llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp | 2 +-
llvm/lib/Target/Hexagon/HexagonAsmPrinter.h | 2 +-
.../lib/Target/Hexagon/HexagonBitSimplify.cpp | 8 +-
.../Hexagon/HexagonBranchRelaxation.cpp | 4 +-
.../Target/Hexagon/HexagonCFGOptimizer.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp | 4 +-
.../Target/Hexagon/HexagonConstExtenders.cpp | 4 +-
.../Hexagon/HexagonConstPropagation.cpp | 4 +-
.../Target/Hexagon/HexagonCopyHoisting.cpp | 6 +-
.../Target/Hexagon/HexagonCopyToCombine.cpp | 4 +-
.../lib/Target/Hexagon/HexagonEarlyIfConv.cpp | 4 +-
.../Target/Hexagon/HexagonExpandCondsets.cpp | 6 +-
.../Target/Hexagon/HexagonFixupHwLoops.cpp | 4 +-
.../Target/Hexagon/HexagonFrameLowering.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonGenExtract.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonGenInsert.cpp | 4 +-
.../Target/Hexagon/HexagonGenMemAbsolute.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonGenMux.cpp | 4 +-
.../Target/Hexagon/HexagonGenPredicate.cpp | 4 +-
.../Target/Hexagon/HexagonHardwareLoops.cpp | 4 +-
.../Target/Hexagon/HexagonISelDAGToDAG.cpp | 2 +-
llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h | 2 +-
.../Hexagon/HexagonLoadStoreWidening.cpp | 8 +-
llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp | 4 +-
.../Hexagon/HexagonLoopIdiomRecognition.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonMask.cpp | 4 +-
.../Target/Hexagon/HexagonNewValueJump.cpp | 4 +-
.../lib/Target/Hexagon/HexagonOptAddrMode.cpp | 4 +-
.../Hexagon/HexagonOptimizeSZextends.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonPeephole.cpp | 4 +-
.../Target/Hexagon/HexagonQFPOptimizer.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp | 4 +-
.../Hexagon/HexagonSplitConst32AndConst64.cpp | 4 +-
.../lib/Target/Hexagon/HexagonSplitDouble.cpp | 4 +-
llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp | 6 +-
llvm/lib/Target/Hexagon/HexagonVExtract.cpp | 4 +-
.../Target/Hexagon/HexagonVLIWPacketizer.cpp | 4 +-
.../Target/Hexagon/HexagonVectorCombine.cpp | 4 +-
.../Hexagon/HexagonVectorLoopCarriedReuse.cpp | 4 +-
.../lib/Target/Hexagon/HexagonVectorPrint.cpp | 4 +-
llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp | 4 +-
.../lib/Target/Lanai/LanaiDelaySlotFiller.cpp | 4 +-
llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp | 4 +-
.../Target/LoongArch/LoongArchAsmPrinter.cpp | 2 +-
.../Target/LoongArch/LoongArchAsmPrinter.h | 2 +-
.../LoongArchDeadRegisterDefinitions.cpp | 4 +-
.../LoongArchExpandAtomicPseudoInsts.cpp | 4 +-
.../LoongArch/LoongArchExpandPseudoInsts.cpp | 8 +-
.../LoongArch/LoongArchISelDAGToDAG.cpp | 2 +-
.../Target/LoongArch/LoongArchISelDAGToDAG.h | 2 +-
.../LoongArch/LoongArchMergeBaseOffset.cpp | 4 +-
.../Target/LoongArch/LoongArchOptWInstrs.cpp | 4 +-
llvm/lib/Target/M68k/M68kAsmPrinter.cpp | 2 +-
llvm/lib/Target/M68k/M68kAsmPrinter.h | 2 +-
.../lib/Target/M68k/M68kCollapseMOVEMPass.cpp | 4 +-
llvm/lib/Target/M68k/M68kExpandPseudo.cpp | 4 +-
llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/M68k/M68kInstrInfo.cpp | 4 +-
llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp | 4 +-
.../Target/MSP430/MSP430BranchSelector.cpp | 4 +-
llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 4 +-
.../Target/Mips/MicroMipsSizeReduction.cpp | 4 +-
llvm/lib/Target/Mips/Mips16HardFloat.cpp | 4 +-
llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 2 +-
llvm/lib/Target/Mips/MipsAsmPrinter.h | 2 +-
llvm/lib/Target/Mips/MipsBranchExpansion.cpp | 4 +-
.../Target/Mips/MipsConstantIslandPass.cpp | 4 +-
llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | 4 +-
llvm/lib/Target/Mips/MipsExpandPseudo.cpp | 4 +-
llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 2 +-
llvm/lib/Target/Mips/MipsISelDAGToDAG.h | 2 +-
.../Target/Mips/MipsModuleISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/Mips/MipsMulMulBugPass.cpp | 4 +-
llvm/lib/Target/Mips/MipsOptimizePICCall.cpp | 4 +-
llvm/lib/Target/Mips/MipsOs16.cpp | 4 +-
.../Target/Mips/MipsPostLegalizerCombiner.cpp | 4 +-
.../Target/Mips/MipsPreLegalizerCombiner.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h | 4 +-
llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 2 +-
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h | 2 +-
.../NVPTX/NVPTXAssignValidGlobalNames.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXAtomicLower.cpp | 4 +-
.../Target/NVPTX/NVPTXCtorDtorLowering.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXIRPeephole.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 2 +-
llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h | 2 +-
llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp | 4 +-
.../lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp | 4 +-
.../Target/NVPTX/NVPTXLowerUnreachable.cpp | 4 +-
llvm/lib/Target/NVPTX/NVPTXPeephole.cpp | 12 +-
.../Target/NVPTX/NVPTXPrologEpilogPass.cpp | 4 +-
.../lib/Target/NVPTX/NVPTXProxyRegErasure.cpp | 4 +-
.../Target/NVPTX/NVPTXReplaceImageHandles.cpp | 4 +-
.../Target/NVPTX/NVPTXTagInvariantLoads.cpp | 4 +-
llvm/lib/Target/NVPTX/NVVMIntrRange.cpp | 4 +-
llvm/lib/Target/NVPTX/NVVMReflect.cpp | 4 +-
llvm/lib/Target/PowerPC/PPC.h | 6 +-
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 10 +-
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 70 ++++----
.../Target/PowerPC/PPCBranchCoalescing.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCCTRLoops.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCCTRLoopsVerify.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp | 4 +-
.../PowerPC/PPCExpandAtomicPseudoInsts.cpp | 4 +-
.../PowerPC/PPCGenScalarMASSEntries.cpp | 6 +-
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 4 +-
.../Target/PowerPC/PPCLoopInstrFormPrep.cpp | 4 +-
.../Target/PowerPC/PPCLowerMASSVEntries.cpp | 6 +-
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | 4 +-
.../lib/Target/PowerPC/PPCPreEmitPeephole.cpp | 4 +-
.../Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp | 4 +-
.../Target/PowerPC/PPCReduceCRLogicals.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp | 6 +-
llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp | 4 +-
llvm/lib/Target/PowerPC/PPCVSXWACCCopy.cpp | 4 +-
.../GISel/RISCVO0PreLegalizerCombiner.cpp | 4 +-
.../GISel/RISCVPostLegalizerCombiner.cpp | 4 +-
.../RISCV/GISel/RISCVPreLegalizerCombiner.cpp | 4 +-
llvm/lib/Target/RISCV/RISCV.h | 2 +-
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | 4 +-
.../RISCV/RISCVDeadRegisterDefinitions.cpp | 4 +-
.../RISCV/RISCVExpandAtomicPseudoInsts.cpp | 4 +-
.../Target/RISCV/RISCVExpandPseudoInsts.cpp | 8 +-
llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp | 4 +-
.../RISCV/RISCVGatherScatterLowering.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 2 +-
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h | 2 +-
.../RISCV/RISCVIndirectBranchTracking.cpp | 4 +-
.../Target/RISCV/RISCVInsertReadWriteCSR.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | 6 +-
.../lib/Target/RISCV/RISCVInsertWriteVXRM.cpp | 4 +-
.../lib/Target/RISCV/RISCVLandingPadSetup.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVLateBranchOpt.cpp | 4 +-
.../Target/RISCV/RISCVLoadStoreOptimizer.cpp | 4 +-
.../Target/RISCV/RISCVMakeCompressible.cpp | 4 +-
.../lib/Target/RISCV/RISCVMergeBaseOffset.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVMoveMerger.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp | 4 +-
.../RISCV/RISCVPostRAExpandPseudoInsts.cpp | 4 +-
.../lib/Target/RISCV/RISCVPromoteConstant.cpp | 4 +-
.../Target/RISCV/RISCVPushPopOptimizer.cpp | 4 +-
.../RISCV/RISCVRedundantCopyElimination.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 4 +-
.../lib/Target/RISCV/RISCVVMV0Elimination.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVZacasABIFix.cpp | 4 +-
llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp | 4 +-
.../SPIRVConvergenceRegionAnalysis.cpp | 2 +-
.../Analysis/SPIRVConvergenceRegionAnalysis.h | 2 +-
llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVCBufferAccess.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp | 4 +-
.../Target/SPIRV/SPIRVEmitNonSemanticDI.cpp | 4 +-
.../SPIRV/SPIRVLegalizeImplicitBinding.cpp | 4 +-
.../Target/SPIRV/SPIRVLegalizePointerCast.cpp | 4 +-
.../SPIRV/SPIRVLegalizeZeroSizeArrays.cpp | 4 +-
.../SPIRV/SPIRVMergeRegionExitTargets.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp | 2 +-
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h | 2 +-
llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp | 4 +-
.../SPIRV/SPIRVPreLegalizerCombiner.cpp | 4 +-
.../Target/SPIRV/SPIRVPrepareFunctions.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp | 4 +-
.../Target/SPIRV/SPIRVPushConstantAccess.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVRegularizer.cpp | 4 +-
.../SPIRV/SPIRVStripConvergentIntrinsics.cpp | 4 +-
llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp | 4 +-
llvm/lib/Target/Sparc/DelaySlotFiller.cpp | 4 +-
llvm/lib/Target/Sparc/LeonPasses.cpp | 10 +-
llvm/lib/Target/Sparc/LeonPasses.h | 10 +-
llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 4 +-
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 2 +-
llvm/lib/Target/SystemZ/SystemZAsmPrinter.h | 2 +-
.../Target/SystemZ/SystemZCopyPhysRegs.cpp | 4 +-
.../lib/Target/SystemZ/SystemZElimCompare.cpp | 4 +-
.../Target/SystemZ/SystemZISelDAGToDAG.cpp | 4 +-
llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp | 4 +-
llvm/lib/Target/SystemZ/SystemZLongBranch.cpp | 4 +-
.../lib/Target/SystemZ/SystemZPostRewrite.cpp | 4 +-
.../lib/Target/SystemZ/SystemZShortenInst.cpp | 4 +-
llvm/lib/Target/SystemZ/SystemZTDC.cpp | 4 +-
llvm/lib/Target/VE/LVLGen.cpp | 4 +-
llvm/lib/Target/VE/VEAsmPrinter.cpp | 4 +-
llvm/lib/Target/VE/VEISelDAGToDAG.cpp | 4 +-
.../WebAssemblyAddMissingPrototypes.cpp | 4 +-
.../WebAssembly/WebAssemblyArgumentMove.cpp | 4 +-
.../WebAssembly/WebAssemblyAsmPrinter.cpp | 2 +-
.../WebAssembly/WebAssemblyAsmPrinter.h | 2 +-
.../Target/WebAssembly/WebAssemblyCFGSort.cpp | 4 +-
.../WebAssembly/WebAssemblyCFGStackify.cpp | 4 +-
.../WebAssemblyCleanCodeAfterTrap.cpp | 4 +-
.../WebAssembly/WebAssemblyDebugFixup.cpp | 4 +-
.../WebAssembly/WebAssemblyExceptionInfo.cpp | 2 +-
.../WebAssembly/WebAssemblyExceptionInfo.h | 2 +-
.../WebAssembly/WebAssemblyExplicitLocals.cpp | 4 +-
.../WebAssemblyFixBrTableDefaults.cpp | 4 +-
.../WebAssemblyFixFunctionBitcasts.cpp | 4 +-
.../WebAssemblyFixIrreducibleControlFlow.cpp | 4 +-
.../WebAssembly/WebAssemblyISelDAGToDAG.cpp | 4 +-
.../WebAssembly/WebAssemblyLateEHPrepare.cpp | 4 +-
.../WebAssembly/WebAssemblyLowerBrUnless.cpp | 4 +-
.../WebAssemblyLowerEmscriptenEHSjLj.cpp | 4 +-
.../WebAssemblyLowerRefTypesIntPtrConv.cpp | 4 +-
.../WebAssembly/WebAssemblyMCLowerPrePass.cpp | 4 +-
.../WebAssemblyMemIntrinsicResults.cpp | 4 +-
.../WebAssemblyNullifyDebugValueLists.cpp | 4 +-
.../WebAssemblyOptimizeLiveIntervals.cpp | 4 +-
.../WebAssemblyOptimizeReturned.cpp | 4 +-
.../WebAssembly/WebAssemblyPeephole.cpp | 4 +-
.../WebAssemblyRefTypeMem2Local.cpp | 4 +-
.../WebAssembly/WebAssemblyRegColoring.cpp | 4 +-
.../WebAssembly/WebAssemblyRegNumbering.cpp | 4 +-
.../WebAssembly/WebAssemblyRegStackify.cpp | 4 +-
.../WebAssemblyReplacePhysRegs.cpp | 4 +-
.../WebAssemblySetP2AlignOperands.cpp | 4 +-
.../WebAssembly/WebAssemblyTargetMachine.cpp | 4 +-
.../X86/GISel/X86PostLegalizerCombiner.cpp | 4 +-
.../X86/GISel/X86PreLegalizerCombiner.cpp | 4 +-
.../Target/X86/X86ArgumentStackSlotRebase.cpp | 4 +-
llvm/lib/Target/X86/X86AsmPrinter.cpp | 2 +-
llvm/lib/Target/X86/X86AsmPrinter.h | 2 +-
.../X86/X86AvoidStoreForwardingBlocks.cpp | 4 +-
llvm/lib/Target/X86/X86AvoidTrailingCall.cpp | 4 +-
.../Target/X86/X86CallFrameOptimization.cpp | 4 +-
llvm/lib/Target/X86/X86CmovConversion.cpp | 4 +-
llvm/lib/Target/X86/X86CompressEVEX.cpp | 4 +-
llvm/lib/Target/X86/X86DomainReassignment.cpp | 4 +-
llvm/lib/Target/X86/X86DynAllocaExpander.cpp | 4 +-
llvm/lib/Target/X86/X86ExpandPseudo.cpp | 4 +-
llvm/lib/Target/X86/X86FastPreTileConfig.cpp | 4 +-
llvm/lib/Target/X86/X86FastTileConfig.cpp | 4 +-
llvm/lib/Target/X86/X86FixupBWInsts.cpp | 4 +-
llvm/lib/Target/X86/X86FixupInstTuning.cpp | 4 +-
llvm/lib/Target/X86/X86FixupLEAs.cpp | 4 +-
llvm/lib/Target/X86/X86FixupSetCC.cpp | 4 +-
.../Target/X86/X86FixupVectorConstants.cpp | 4 +-
llvm/lib/Target/X86/X86FlagsCopyLowering.cpp | 4 +-
llvm/lib/Target/X86/X86FloatingPoint.cpp | 4 +-
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 4 +-
.../Target/X86/X86IndirectBranchTracking.cpp | 4 +-
llvm/lib/Target/X86/X86IndirectThunks.cpp | 4 +-
llvm/lib/Target/X86/X86InsertWait.cpp | 4 +-
llvm/lib/Target/X86/X86InstrInfo.cpp | 8 +-
.../X86LoadValueInjectionLoadHardening.cpp | 4 +-
.../X86/X86LoadValueInjectionRetHardening.cpp | 4 +-
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp | 4 +-
llvm/lib/Target/X86/X86LowerAMXType.cpp | 4 +-
llvm/lib/Target/X86/X86LowerTileCopy.cpp | 4 +-
llvm/lib/Target/X86/X86OptimizeLEAs.cpp | 4 +-
llvm/lib/Target/X86/X86PadShortFunction.cpp | 4 +-
llvm/lib/Target/X86/X86PartialReduction.cpp | 4 +-
llvm/lib/Target/X86/X86PreTileConfig.cpp | 4 +-
llvm/lib/Target/X86/X86ReturnThunks.cpp | 4 +-
...culativeExecutionSideEffectSuppression.cpp | 4 +-
.../X86/X86SpeculativeLoadHardening.cpp | 4 +-
.../lib/Target/X86/X86SuppressAPXForReloc.cpp | 4 +-
llvm/lib/Target/X86/X86TargetMachine.cpp | 4 +-
llvm/lib/Target/X86/X86TileConfig.cpp | 4 +-
llvm/lib/Target/X86/X86VZeroUpper.cpp | 4 +-
llvm/lib/Target/X86/X86WinEHState.cpp | 4 +-
llvm/lib/Target/X86/X86WinEHUnwindV2.cpp | 4 +-
llvm/lib/Target/XCore/XCoreAsmPrinter.cpp | 4 +-
.../XCore/XCoreFrameToArgsOffsetElim.cpp | 4 +-
llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp | 4 +-
.../Target/XCore/XCoreLowerThreadLocal.cpp | 4 +-
llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp | 2 +-
llvm/lib/Target/Xtensa/XtensaAsmPrinter.h | 2 +-
llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp | 4 +-
llvm/lib/TextAPI/TextAPIError.cpp | 2 +-
llvm/lib/Transforms/CFGuard/CFGuard.cpp | 4 +-
llvm/lib/Transforms/IPO/AlwaysInliner.cpp | 4 +-
llvm/lib/Transforms/IPO/BarrierNoopPass.cpp | 4 +-
.../IPO/DeadArgumentElimination.cpp | 10 +-
llvm/lib/Transforms/IPO/ExpandVariadics.cpp | 4 +-
llvm/lib/Transforms/IPO/GlobalDCE.cpp | 4 +-
llvm/lib/Transforms/IPO/LoopExtractor.cpp | 8 +-
.../InstCombine/InstructionCombining.cpp | 4 +-
.../Transforms/ObjCARC/ObjCARCContract.cpp | 4 +-
.../Transforms/Scalar/ConstantHoisting.cpp | 4 +-
llvm/lib/Transforms/Scalar/DCE.cpp | 4 +-
.../Scalar/DeadStoreElimination.cpp | 4 +-
llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 8 +-
llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp | 4 +-
llvm/lib/Transforms/Scalar/GVN.cpp | 4 +-
.../Transforms/Scalar/InferAddressSpaces.cpp | 4 +-
.../Transforms/Scalar/InstSimplifyPass.cpp | 4 +-
llvm/lib/Transforms/Scalar/LICM.cpp | 4 +-
.../Transforms/Scalar/LoopDataPrefetch.cpp | 4 +-
.../Transforms/Scalar/LoopStrengthReduce.cpp | 4 +-
llvm/lib/Transforms/Scalar/LoopTermFold.cpp | 4 +-
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | 4 +-
.../lib/Transforms/Scalar/LowerAtomicPass.cpp | 4 +-
llvm/lib/Transforms/Scalar/MergeICmps.cpp | 4 +-
.../lib/Transforms/Scalar/NaryReassociate.cpp | 4 +-
.../Scalar/PartiallyInlineLibCalls.cpp | 4 +-
.../lib/Transforms/Scalar/PlaceSafepoints.cpp | 4 +-
llvm/lib/Transforms/Scalar/Reassociate.cpp | 4 +-
llvm/lib/Transforms/Scalar/Reg2Mem.cpp | 4 +-
llvm/lib/Transforms/Scalar/SROA.cpp | 4 +-
.../Scalar/ScalarizeMaskedMemIntrin.cpp | 4 +-
llvm/lib/Transforms/Scalar/Scalarizer.cpp | 4 +-
.../Scalar/SeparateConstOffsetFromGEP.cpp | 4 +-
.../lib/Transforms/Scalar/SimplifyCFGPass.cpp | 4 +-
llvm/lib/Transforms/Scalar/Sink.cpp | 4 +-
.../Scalar/SpeculativeExecution.cpp | 4 +-
.../Scalar/StraightLineStrengthReduce.cpp | 4 +-
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | 4 +-
.../Scalar/TailRecursionElimination.cpp | 4 +-
.../Transforms/Utils/BreakCriticalEdges.cpp | 6 +-
.../Utils/CanonicalizeFreezeInLoops.cpp | 4 +-
llvm/lib/Transforms/Utils/Debugify.cpp | 16 +-
.../Utils/EntryExitInstrumenter.cpp | 4 +-
llvm/lib/Transforms/Utils/FixIrreducible.cpp | 4 +-
llvm/lib/Transforms/Utils/LCSSA.cpp | 6 +-
llvm/lib/Transforms/Utils/LoopSimplify.cpp | 6 +-
llvm/lib/Transforms/Utils/LoopUtils.cpp | 4 +-
.../lib/Transforms/Utils/LowerGlobalDtors.cpp | 4 +-
llvm/lib/Transforms/Utils/LowerInvoke.cpp | 6 +-
llvm/lib/Transforms/Utils/LowerSwitch.cpp | 6 +-
llvm/lib/Transforms/Utils/Mem2Reg.cpp | 4 +-
llvm/lib/Transforms/Utils/UnifyLoopExits.cpp | 4 +-
.../Vectorize/LoadStoreVectorizer.cpp | 4 +-
.../WindowsManifest/WindowsManifestMerger.cpp | 2 +-
llvm/tools/bugpoint-passes/TestPasses.cpp | 24 +--
.../llvm-cfi-verify/lib/FileAnalysis.cpp | 2 +-
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h | 2 +-
llvm/tools/llvm-exegesis/lib/Error.cpp | 10 +-
llvm/tools/llvm-exegesis/lib/Error.h | 10 +-
.../lib/RISCV/RISCVExegesisPostprocessing.cpp | 4 +-
.../lib/RISCV/RISCVExegesisPreprocessing.cpp | 4 +-
llvm/tools/llvm-rc/ResourceScriptParser.cpp | 2 +-
llvm/tools/llvm-rc/ResourceScriptParser.h | 2 +-
llvm/unittests/Analysis/AliasAnalysisTest.cpp | 8 +-
llvm/unittests/Analysis/CFGTest.cpp | 2 +-
llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp | 4 +-
.../CGPluginTest/Plugin/CodeGenTestPass.cpp | 2 +-
.../CGPluginTest/Plugin/CodeGenTestPass.h | 2 +-
.../ExecutionEngine/Orc/CoreAPIsTest.cpp | 4 +-
llvm/unittests/IR/LegacyPassManagerTest.cpp | 28 ++--
llvm/unittests/IR/ModuleTest.cpp | 2 +-
llvm/unittests/IR/TimePassesTest.cpp | 8 +-
llvm/unittests/MI/LiveIntervalTest.cpp | 4 +-
llvm/unittests/Support/ErrorTest.cpp | 12 +-
llvm/unittests/Support/ExtensibleRTTITest.cpp | 28 ++--
.../Transforms/Utils/DebugifyTest.cpp | 12 +-
.../IR/ScalableValueBoundsConstraintSet.h | 2 +-
.../mlir/Interfaces/ValueBoundsOpInterface.h | 2 +-
.../IR/ScalableValueBoundsConstraintSet.cpp | 2 +-
.../lib/Interfaces/ValueBoundsOpInterface.cpp | 2 +-
.../OpenMP/OpenMPToLLVMIRTranslation.cpp | 4 +-
.../common/include/OffloadError.h | 2 +-
.../common/src/OffloadError.cpp | 2 +-
orc-rt/include/orc-rt/Error.h | 4 +-
orc-rt/include/orc-rt/RTTI.h | 6 +-
orc-rt/lib/executor/RTTI.cpp | 2 +-
1122 files changed, 2413 insertions(+), 2394 deletions(-)
diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h
index 31c90d2c502bd..c7a194c2450b2 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -161,7 +161,7 @@ class FilterIterator {
/// as the error is checked.
class BOLTError : public ErrorInfo<BOLTError> {
public:
- static char ID;
+ static const char ID;
BOLTError(bool IsFatal, const Twine &S = Twine());
void log(raw_ostream &OS) const override;
diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp
index f0541921c70a8..5ea0f50aa3658 100644
--- a/bolt/lib/Core/BinaryContext.cpp
+++ b/bolt/lib/Core/BinaryContext.cpp
@@ -92,7 +92,7 @@ static cl::opt<bool>
namespace llvm {
namespace bolt {
-char BOLTError::ID = 0;
+const char BOLTError::ID = 0;
BOLTError::BOLTError(bool IsFatal, const Twine &S)
: IsFatal(IsFatal), Msg(S.str()) {}
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 9926f2dd63de5..6e77a2ae08c2f 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -41,7 +41,7 @@ bool mapOptOrNull(const llvm::json::Value &Params, llvm::StringLiteral Prop,
}
} // namespace
-char LSPError::ID;
+const char LSPError::ID = 0;
URIForFile URIForFile::canonicalize(llvm::StringRef AbsPath,
llvm::StringRef TUPath) {
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index a88c9a391f97a..ae3ebbe54e4b4 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -64,7 +64,7 @@ class LSPError : public llvm::ErrorInfo<LSPError> {
public:
std::string Message;
ErrorCode Code;
- static char ID;
+ static const char ID;
LSPError(std::string Message, ErrorCode Code)
: Message(std::move(Message)), Code(Code) {}
diff --git a/clang-tools-extra/clangd/support/Cancellation.cpp b/clang-tools-extra/clangd/support/Cancellation.cpp
index d544c17e279c7..a27feda45853d 100644
--- a/clang-tools-extra/clangd/support/Cancellation.cpp
+++ b/clang-tools-extra/clangd/support/Cancellation.cpp
@@ -12,7 +12,7 @@
namespace clang {
namespace clangd {
-char CancelledError::ID = 0;
+const char CancelledError::ID = 0;
// We don't want a cancelable scope to "shadow" an enclosing one.
struct CancelState {
diff --git a/clang-tools-extra/clangd/support/Cancellation.h b/clang-tools-extra/clangd/support/Cancellation.h
index f33b0b5c67635..8d50952ca49ec 100644
--- a/clang-tools-extra/clangd/support/Cancellation.h
+++ b/clang-tools-extra/clangd/support/Cancellation.h
@@ -85,7 +85,7 @@ int isCancelled(const Context &Ctx = Context::current());
/// Conventional error when no result is returned due to cancellation.
class CancelledError : public llvm::ErrorInfo<CancelledError> {
public:
- static char ID;
+ static const char ID;
const int Reason;
CancelledError(int Reason) : Reason(Reason) {}
diff --git a/clang-tools-extra/clangd/support/Logger.cpp b/clang-tools-extra/clangd/support/Logger.cpp
index e4e0499f9f57d..be6d27f1b1c05 100644
--- a/clang-tools-extra/clangd/support/Logger.cpp
+++ b/clang-tools-extra/clangd/support/Logger.cpp
@@ -71,9 +71,9 @@ class SimpleStringError : public llvm::ErrorInfo<SimpleStringError> {
void log(llvm::raw_ostream &OS) const override { OS << Message; }
std::string message() const override { return Message; }
std::error_code convertToErrorCode() const override { return EC; }
- static char ID;
+ static const char ID;
};
-char SimpleStringError::ID;
+const char SimpleStringError::ID = 0;
} // namespace
diff --git a/clang/include/clang/AST/ASTImportError.h b/clang/include/clang/AST/ASTImportError.h
index 728314ca0936e..4669dda2273b1 100644
--- a/clang/include/clang/AST/ASTImportError.h
+++ b/clang/include/clang/AST/ASTImportError.h
@@ -29,7 +29,7 @@ class ASTImportError : public llvm::ErrorInfo<ASTImportError> {
ErrorKind Error;
- static char ID;
+ static const char ID;
ASTImportError() : Error(Unknown) {}
ASTImportError(const ASTImportError &Other) : Error(Other.Error) {}
diff --git a/clang/include/clang/AST/ExternalASTSource.h b/clang/include/clang/AST/ExternalASTSource.h
index 8fc490b1d8471..b55aca9a39ee7 100644
--- a/clang/include/clang/AST/ExternalASTSource.h
+++ b/clang/include/clang/AST/ExternalASTSource.h
@@ -68,7 +68,7 @@ class ExternalASTSource : public RefCountedBase<ExternalASTSource> {
uint32_t CurrentGeneration = 0;
/// LLVM-style RTTI.
- static char ID;
+ static const char ID;
public:
ExternalASTSource() = default;
diff --git a/clang/include/clang/Basic/DiagnosticError.h b/clang/include/clang/Basic/DiagnosticError.h
index 744f7fe19db79..eb6ab8fc777e7 100644
--- a/clang/include/clang/Basic/DiagnosticError.h
+++ b/clang/include/clang/Basic/DiagnosticError.h
@@ -45,7 +45,7 @@ class DiagnosticError : public llvm::ErrorInfo<DiagnosticError> {
return Result;
}
- static char ID;
+ static const char ID;
private:
// Users are not expected to use error_code.
diff --git a/clang/include/clang/CrossTU/CrossTranslationUnit.h b/clang/include/clang/CrossTU/CrossTranslationUnit.h
index 9e0721edfc323..ac3fda9bbc95e 100644
--- a/clang/include/clang/CrossTU/CrossTranslationUnit.h
+++ b/clang/include/clang/CrossTU/CrossTranslationUnit.h
@@ -60,7 +60,7 @@ enum class index_error_code {
class IndexError : public llvm::ErrorInfo<IndexError> {
public:
- static char ID;
+ static const char ID;
IndexError(index_error_code C) : Code(C), LineNo(0) {}
IndexError(index_error_code C, std::string FileName, int LineNo = 0)
: Code(C), FileName(std::move(FileName)), LineNo(LineNo) {}
diff --git a/clang/include/clang/ExtractAPI/APIIgnoresList.h b/clang/include/clang/ExtractAPI/APIIgnoresList.h
index 3eee8e336cb63..3e0d5287c8761 100644
--- a/clang/include/clang/ExtractAPI/APIIgnoresList.h
+++ b/clang/include/clang/ExtractAPI/APIIgnoresList.h
@@ -32,7 +32,7 @@ namespace extractapi {
struct IgnoresFileNotFound : public llvm::ErrorInfo<IgnoresFileNotFound> {
std::string Path;
- static char ID;
+ static const char ID;
explicit IgnoresFileNotFound(StringRef Path) : Path(Path) {}
diff --git a/clang/include/clang/Sema/ExternalSemaSource.h b/clang/include/clang/Sema/ExternalSemaSource.h
index 11cd69df88d1c..e5669a324bb05 100644
--- a/clang/include/clang/Sema/ExternalSemaSource.h
+++ b/clang/include/clang/Sema/ExternalSemaSource.h
@@ -49,7 +49,7 @@ struct ExternalVTableUse {
/// analysis.
class ExternalSemaSource : public ExternalASTSource {
/// LLVM-style RTTI.
- static char ID;
+ static const char ID;
public:
ExternalSemaSource() = default;
diff --git a/clang/include/clang/Sema/MultiplexExternalSemaSource.h b/clang/include/clang/Sema/MultiplexExternalSemaSource.h
index 8bcaa121b3039..46865d592628b 100644
--- a/clang/include/clang/Sema/MultiplexExternalSemaSource.h
+++ b/clang/include/clang/Sema/MultiplexExternalSemaSource.h
@@ -37,7 +37,7 @@ namespace clang {
/// analysis.
class MultiplexExternalSemaSource : public ExternalSemaSource {
/// LLVM-style RTTI.
- static char ID;
+ static const char ID;
private:
SmallVector<llvm::IntrusiveRefCntPtr<ExternalSemaSource>, 2> Sources;
diff --git a/clang/include/clang/Serialization/ModuleFileExtension.h b/clang/include/clang/Serialization/ModuleFileExtension.h
index 50ce401516275..a106cb66aad71 100644
--- a/clang/include/clang/Serialization/ModuleFileExtension.h
+++ b/clang/include/clang/Serialization/ModuleFileExtension.h
@@ -66,7 +66,7 @@ class ModuleFileExtension
: public llvm::RTTIExtends<ModuleFileExtension, llvm::RTTIRoot> {
public:
/// Discriminator for LLVM RTTI.
- static char ID;
+ static const char ID;
virtual ~ModuleFileExtension();
diff --git a/clang/include/clang/Tooling/Core/Replacement.h b/clang/include/clang/Tooling/Core/Replacement.h
index f9452111e147f..84c438f73338f 100644
--- a/clang/include/clang/Tooling/Core/Replacement.h
+++ b/clang/include/clang/Tooling/Core/Replacement.h
@@ -171,7 +171,7 @@ class ReplacementError : public llvm::ErrorInfo<ReplacementError> {
replacement_error get() const { return Err; }
- static char ID;
+ static const char ID;
const std::optional<Replacement> &getNewReplacement() const {
return NewReplacement;
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index 101ab2c40973b..20c7a3d77d390 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -102,7 +102,7 @@ namespace clang {
llvm_unreachable("Function not implemented.");
}
- char ASTImportError::ID;
+ const char ASTImportError::ID = 0;
template <class T>
static SmallVector<Decl *, 2>
diff --git a/clang/lib/AST/ExternalASTSource.cpp b/clang/lib/AST/ExternalASTSource.cpp
index e8c1004089713..bf4ca1b67c0e8 100644
--- a/clang/lib/AST/ExternalASTSource.cpp
+++ b/clang/lib/AST/ExternalASTSource.cpp
@@ -24,7 +24,7 @@
using namespace clang;
-char ExternalASTSource::ID;
+const char ExternalASTSource::ID = 0;
ExternalASTSource::~ExternalASTSource() = default;
diff --git a/clang/lib/Analysis/FlowSensitive/Arena.cpp b/clang/lib/Analysis/FlowSensitive/Arena.cpp
index 7542a137c735e..7780ff8b143a7 100644
--- a/clang/lib/Analysis/FlowSensitive/Arena.cpp
+++ b/clang/lib/Analysis/FlowSensitive/Arena.cpp
@@ -180,7 +180,7 @@ class FormulaParseError : public llvm::ErrorInfo<FormulaParseError> {
unsigned Offset;
public:
- static char ID;
+ static const char ID;
FormulaParseError(llvm::StringRef Formula, unsigned Offset)
: Formula(Formula), Offset(Offset) {}
@@ -195,7 +195,7 @@ class FormulaParseError : public llvm::ErrorInfo<FormulaParseError> {
}
};
-char FormulaParseError::ID = 0;
+const char FormulaParseError::ID = 0;
} // namespace
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 4802478c379bb..ef2d2b1e45734 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -1468,4 +1468,4 @@ DiagStorageAllocator::~DiagStorageAllocator() {
"A partial is on the lam");
}
-char DiagnosticError::ID;
+const char DiagnosticError::ID = 0;
diff --git a/clang/lib/CrossTU/CrossTranslationUnit.cpp b/clang/lib/CrossTU/CrossTranslationUnit.cpp
index b0563b39e99ed..42ae9cb9fa06c 100644
--- a/clang/lib/CrossTU/CrossTranslationUnit.cpp
+++ b/clang/lib/CrossTU/CrossTranslationUnit.cpp
@@ -142,7 +142,7 @@ class IndexErrorCategory : public std::error_category {
static llvm::ManagedStatic<IndexErrorCategory> Category;
} // end anonymous namespace
-char IndexError::ID;
+const char IndexError::ID = 0;
void IndexError::log(raw_ostream &OS) const {
OS << Category->message(static_cast<int>(Code)) << '\n';
diff --git a/clang/lib/ExtractAPI/APIIgnoresList.cpp b/clang/lib/ExtractAPI/APIIgnoresList.cpp
index d6bbc6692d2bc..92b09bc0ad0ca 100644
--- a/clang/lib/ExtractAPI/APIIgnoresList.cpp
+++ b/clang/lib/ExtractAPI/APIIgnoresList.cpp
@@ -21,7 +21,7 @@ using namespace clang;
using namespace clang::extractapi;
using namespace llvm;
-char IgnoresFileNotFound::ID;
+const char IgnoresFileNotFound::ID = 0;
void IgnoresFileNotFound::log(llvm::raw_ostream &os) const {
os << "Could not find API ignores file " << Path;
diff --git a/clang/lib/Frontend/TestModuleFileExtension.cpp b/clang/lib/Frontend/TestModuleFileExtension.cpp
index 5e116702096b8..f9dfdb0105c45 100644
--- a/clang/lib/Frontend/TestModuleFileExtension.cpp
+++ b/clang/lib/Frontend/TestModuleFileExtension.cpp
@@ -14,7 +14,7 @@
using namespace clang;
using namespace clang::serialization;
-char TestModuleFileExtension::ID = 0;
+const char TestModuleFileExtension::ID = 0;
TestModuleFileExtension::Writer::~Writer() { }
diff --git a/clang/lib/Frontend/TestModuleFileExtension.h b/clang/lib/Frontend/TestModuleFileExtension.h
index e22c87ed2d1b5..0ca1682cffd27 100644
--- a/clang/lib/Frontend/TestModuleFileExtension.h
+++ b/clang/lib/Frontend/TestModuleFileExtension.h
@@ -44,7 +44,7 @@ class TestModuleFileExtension
};
public:
- static char ID;
+ static const char ID;
TestModuleFileExtension(StringRef BlockName, unsigned MajorVersion,
unsigned MinorVersion, bool Hashed,
diff --git a/clang/lib/Sema/MultiplexExternalSemaSource.cpp b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
index 1f040c879d724..db7a294a92db9 100644
--- a/clang/lib/Sema/MultiplexExternalSemaSource.cpp
+++ b/clang/lib/Sema/MultiplexExternalSemaSource.cpp
@@ -14,7 +14,7 @@
using namespace clang;
-char MultiplexExternalSemaSource::ID;
+const char MultiplexExternalSemaSource::ID = 0;
/// Constructs a new multiplexing external sema source and appends the
/// given element to it.
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index d53527af38653..d4a4bb11c2d36 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -2628,7 +2628,7 @@ void Sema::ActOnComment(SourceRange Comment) {
// Pin this vtable to this file.
ExternalSemaSource::~ExternalSemaSource() {}
-char ExternalSemaSource::ID;
+const char ExternalSemaSource::ID = 0;
void ExternalSemaSource::ReadMethodPool(Selector Sel) { }
void ExternalSemaSource::updateOutOfDateSelector(Selector Sel) { }
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index f3902d57e3d1f..5be296dc1baa2 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1661,7 +1661,7 @@ void ASTReader::Error(unsigned DiagID, StringRef Arg1, StringRef Arg2,
namespace {
struct AlreadyReportedDiagnosticError
: llvm::ErrorInfo<AlreadyReportedDiagnosticError> {
- static char ID;
+ static const char ID;
void log(raw_ostream &OS) const override {
llvm_unreachable("reporting an already-reported diagnostic error");
@@ -1672,7 +1672,7 @@ struct AlreadyReportedDiagnosticError
}
};
-char AlreadyReportedDiagnosticError::ID = 0;
+const char AlreadyReportedDiagnosticError::ID = 0;
} // namespace
void ASTReader::Error(llvm::Error &&Err) const {
diff --git a/clang/lib/Serialization/ModuleFileExtension.cpp b/clang/lib/Serialization/ModuleFileExtension.cpp
index 729529b5fca18..7dbc8faf72a0b 100644
--- a/clang/lib/Serialization/ModuleFileExtension.cpp
+++ b/clang/lib/Serialization/ModuleFileExtension.cpp
@@ -9,7 +9,7 @@
using namespace clang;
-char ModuleFileExtension::ID = 0;
+const char ModuleFileExtension::ID = 0;
ModuleFileExtension::~ModuleFileExtension() {}
diff --git a/clang/lib/Tooling/Core/Replacement.cpp b/clang/lib/Tooling/Core/Replacement.cpp
index 10bdc223e33f2..28cc19b18a1e2 100644
--- a/clang/lib/Tooling/Core/Replacement.cpp
+++ b/clang/lib/Tooling/Core/Replacement.cpp
@@ -186,7 +186,7 @@ std::string ReplacementError::message() const {
return Message;
}
-char ReplacementError::ID = 0;
+const char ReplacementError::ID = 0;
Replacements Replacements::getCanonicalReplacements() const {
std::vector<Replacement> NewReplaces;
diff --git a/clang/lib/Tooling/Transformer/Parsing.cpp b/clang/lib/Tooling/Transformer/Parsing.cpp
index f7bffda6967a9..1c698193a62f7 100644
--- a/clang/lib/Tooling/Transformer/Parsing.cpp
+++ b/clang/lib/Tooling/Transformer/Parsing.cpp
@@ -52,7 +52,7 @@ template <typename T> using ParseFunction = ExpectedProgress<T> (*)(ParseState);
class ParseError : public llvm::ErrorInfo<ParseError> {
public:
// Required field for all ErrorInfo derivatives.
- static char ID;
+ static const char ID;
ParseError(size_t Pos, std::string ErrorMsg, std::string InputExcerpt)
: Pos(Pos), ErrorMsg(std::move(ErrorMsg)),
@@ -74,7 +74,7 @@ class ParseError : public llvm::ErrorInfo<ParseError> {
std::string Excerpt;
};
-char ParseError::ID;
+const char ParseError::ID = 0;
} // namespace
static const llvm::StringMap<RangeSelectorOp<std::string>> &
diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp
index 64d0f4c38f11c..32a6e894484fc 100644
--- a/clang/unittests/Frontend/CompilerInvocationTest.cpp
+++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp
@@ -967,7 +967,7 @@ TEST_F(CommandLineTest, DigraphsEnabled) {
struct DummyModuleFileExtension
: public llvm::RTTIExtends<DummyModuleFileExtension, ModuleFileExtension> {
- static char ID;
+ static const char ID;
ModuleFileExtensionMetadata getExtensionMetadata() const override {
return {};
@@ -988,7 +988,7 @@ struct DummyModuleFileExtension
}
};
-char DummyModuleFileExtension::ID = 0;
+const char DummyModuleFileExtension::ID = 0;
TEST_F(CommandLineTest, TestModuleFileExtension) {
const char *Args[] = {"-ftest-module-file-extension=first:2:1:0:first",
diff --git a/compiler-rt/lib/orc/rtti.cpp b/compiler-rt/lib/orc/rtti.cpp
index 5989955aca2ac..6a83721c38f80 100644
--- a/compiler-rt/lib/orc/rtti.cpp
+++ b/compiler-rt/lib/orc/rtti.cpp
@@ -18,7 +18,7 @@
namespace orc_rt {
-char RTTIRoot::ID = 0;
+const char RTTIRoot::ID = 0;
void RTTIRoot::anchor() {}
} // namespace orc_rt
diff --git a/compiler-rt/lib/orc/rtti.h b/compiler-rt/lib/orc/rtti.h
index d9d18140dcc16..6596a6b952064 100644
--- a/compiler-rt/lib/orc/rtti.h
+++ b/compiler-rt/lib/orc/rtti.h
@@ -21,19 +21,19 @@
// @code{.cpp}
// class MyBaseClass : public RTTIExtends<MyBaseClass, RTTIRoot> {
// public:
-// static char ID;
+// static const char ID;
// virtual void foo() = 0;
// };
//
// class MyDerivedClass1 : public RTTIExtends<MyDerivedClass1, MyBaseClass> {
// public:
-// static char ID;
+// static const char ID;
// void foo() override {}
// };
//
// class MyDerivedClass2 : public RTTIExtends<MyDerivedClass2, MyBaseClass> {
// public:
-// static char ID;
+// static const char ID;
// void foo() override {}
// };
//
@@ -90,7 +90,7 @@ class RTTIRoot {
private:
virtual void anchor();
- static char ID;
+ static const char ID;
};
/// Inheritance utility for extensible RTTI.
@@ -104,12 +104,12 @@ class RTTIRoot {
///
/// class MyType : public RTTIExtends<MyType, RTTIRoot> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
/// class MyDerivedType : public RTTIExtends<MyDerivedType, MyType> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
template <typename ThisT, typename ParentT> class RTTIExtends : public ParentT {
@@ -118,7 +118,7 @@ template <typename ThisT, typename ParentT> class RTTIExtends : public ParentT {
using ParentT::isA;
using ParentT::ParentT;
- static char ID;
+ static const char ID;
static const void *classID() { return &ThisT::ID; }
@@ -132,7 +132,7 @@ template <typename ThisT, typename ParentT> class RTTIExtends : public ParentT {
};
template <typename ThisT, typename ParentT>
-char RTTIExtends<ThisT, ParentT>::ID = 0;
+const char RTTIExtends<ThisT, ParentT>::ID = 0;
/// Returns true if the given value is an instance of the template type
/// parameter.
diff --git a/lldb/include/lldb/Expression/DiagnosticManager.h b/lldb/include/lldb/Expression/DiagnosticManager.h
index c7e02d80cf750..c6969f4d0cd8a 100644
--- a/lldb/include/lldb/Expression/DiagnosticManager.h
+++ b/lldb/include/lldb/Expression/DiagnosticManager.h
@@ -32,7 +32,7 @@ class ExpressionError
std::vector<DiagnosticDetail> m_details;
public:
- static char ID;
+ static const char ID;
using llvm::ErrorInfo<ExpressionError, DiagnosticError>::ErrorInfo;
ExpressionError(lldb::ExpressionResults result, std::string msg,
std::vector<DiagnosticDetail> details = {});
diff --git a/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h b/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h
index 72b9ccbf7dd0c..978edc13c4b28 100644
--- a/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h
+++ b/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h
@@ -27,7 +27,7 @@ class ExpressionTypeSystemHelper
: public llvm::RTTIExtends<ExpressionTypeSystemHelper, llvm::RTTIRoot> {
public:
/// LLVM RTTI support
- static char ID;
+ static const char ID;
virtual ~ExpressionTypeSystemHelper() = default;
};
diff --git a/lldb/include/lldb/Expression/ExpressionVariable.h b/lldb/include/lldb/Expression/ExpressionVariable.h
index 68fa1c878a0e3..45f5c52245ea8 100644
--- a/lldb/include/lldb/Expression/ExpressionVariable.h
+++ b/lldb/include/lldb/Expression/ExpressionVariable.h
@@ -27,7 +27,7 @@ class ExpressionVariable
public llvm::RTTIExtends<ExpressionVariable, llvm::RTTIRoot> {
public:
/// LLVM RTTI support
- static char ID;
+ static const char ID;
ExpressionVariable();
@@ -214,7 +214,7 @@ class PersistentExpressionState
public llvm::RTTIExtends<PersistentExpressionState, llvm::RTTIRoot> {
public:
/// LLVM RTTI support
- static char ID;
+ static const char ID;
PersistentExpressionState();
diff --git a/lldb/include/lldb/Expression/FunctionCaller.h b/lldb/include/lldb/Expression/FunctionCaller.h
index f35ee820eddec..26efaed360405 100644
--- a/lldb/include/lldb/Expression/FunctionCaller.h
+++ b/lldb/include/lldb/Expression/FunctionCaller.h
@@ -55,7 +55,7 @@ namespace lldb_private {
/// argument space will be managed for you.
class FunctionCaller : public Expression {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override { return ClassID == &ID; }
diff --git a/lldb/include/lldb/Expression/LLVMUserExpression.h b/lldb/include/lldb/Expression/LLVMUserExpression.h
index 40b463933c07e..3f88aee236ea0 100644
--- a/lldb/include/lldb/Expression/LLVMUserExpression.h
+++ b/lldb/include/lldb/Expression/LLVMUserExpression.h
@@ -31,7 +31,7 @@ namespace lldb_private {
/// appropriate TypeSystem.
class LLVMUserExpression : public UserExpression {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override {
diff --git a/lldb/include/lldb/Expression/ObjectFileJIT.h b/lldb/include/lldb/Expression/ObjectFileJIT.h
index 0694a969ed8d1..930bc9ae5458c 100644
--- a/lldb/include/lldb/Expression/ObjectFileJIT.h
+++ b/lldb/include/lldb/Expression/ObjectFileJIT.h
@@ -66,7 +66,7 @@ class ObjectFileJIT : public ObjectFile {
lldb_private::ModuleSpecList &specs);
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/include/lldb/Expression/REPL.h b/lldb/include/lldb/Expression/REPL.h
index b1dc830ec8bf8..997d67bc0875e 100644
--- a/lldb/include/lldb/Expression/REPL.h
+++ b/lldb/include/lldb/Expression/REPL.h
@@ -23,7 +23,7 @@ class REPL : public IOHandlerDelegate,
public llvm::RTTIExtends<REPL, llvm::RTTIRoot> {
public:
/// LLVM RTTI support
- static char ID;
+ static const char ID;
REPL(Target &target);
diff --git a/lldb/include/lldb/Expression/UserExpression.h b/lldb/include/lldb/Expression/UserExpression.h
index 977a0adef1cbe..a4ce7fc3a0323 100644
--- a/lldb/include/lldb/Expression/UserExpression.h
+++ b/lldb/include/lldb/Expression/UserExpression.h
@@ -34,7 +34,7 @@ namespace lldb_private {
/// appropriate TypeSystem.
class UserExpression : public Expression {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override { return ClassID == &ID; }
diff --git a/lldb/include/lldb/Expression/UtilityFunction.h b/lldb/include/lldb/Expression/UtilityFunction.h
index 6b558b20e2120..085cf06ed2f4c 100644
--- a/lldb/include/lldb/Expression/UtilityFunction.h
+++ b/lldb/include/lldb/Expression/UtilityFunction.h
@@ -29,7 +29,7 @@ namespace lldb_private {
/// functions can perform error-checking for ClangUserExpressions,
class UtilityFunction : public Expression {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override { return ClassID == &ID; }
diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h
index 590c9fa523b29..6edc96c454d65 100644
--- a/lldb/include/lldb/Host/File.h
+++ b/lldb/include/lldb/Host/File.h
@@ -362,7 +362,7 @@ class File : public IOObject {
bool operator!() const { return !IsValid(); };
- static char ID;
+ static const char ID;
virtual bool isA(const void *classID) const { return classID == &ID; }
static bool classof(const File *file) { return file->isA(&ID); }
@@ -412,7 +412,7 @@ class NativeFile : public File {
size_t PrintfVarArg(const char *format, va_list args) override;
llvm::Expected<OpenOptions> GetOptions() const override;
- static char ID;
+ static const char ID;
bool isA(const void *classID) const override {
return classID == &ID || File::isA(classID);
}
@@ -484,7 +484,7 @@ class SerialPort : public NativeFile {
Status Close() override;
- static char ID;
+ static const char ID;
bool isA(const void *classID) const override {
return classID == &ID || File::isA(classID);
}
diff --git a/lldb/include/lldb/Host/Host.h b/lldb/include/lldb/Host/Host.h
index 4e19d15b06743..59d0d1e5aa302 100644
--- a/lldb/include/lldb/Host/Host.h
+++ b/lldb/include/lldb/Host/Host.h
@@ -288,7 +288,7 @@ class SystemLogHandler : public LogHandler {
static bool classof(const LogHandler *obj) { return obj->isA(&ID); }
private:
- static char ID;
+ static const char ID;
};
} // namespace lldb_private
diff --git a/lldb/include/lldb/Host/HostInfoBase.h b/lldb/include/lldb/Host/HostInfoBase.h
index 670fee19fca3d..d158503d782b1 100644
--- a/lldb/include/lldb/Host/HostInfoBase.h
+++ b/lldb/include/lldb/Host/HostInfoBase.h
@@ -34,7 +34,7 @@ struct SharedCacheImageInfo {
namespace {
struct HostInfoError : public llvm::ErrorInfo<HostInfoError> {
- static char ID;
+ static const char ID;
const std::string message_;
HostInfoError(const std::string message) : message_(std::move(message)) {}
@@ -46,7 +46,7 @@ struct HostInfoError : public llvm::ErrorInfo<HostInfoError> {
}
};
-char HostInfoError::ID = 0;
+const char HostInfoError::ID = 0;
} // namespace
class HostInfoBase {
diff --git a/lldb/include/lldb/Host/JSONTransport.h b/lldb/include/lldb/Host/JSONTransport.h
index bd41d077c903b..13d983a40cfa5 100644
--- a/lldb/include/lldb/Host/JSONTransport.h
+++ b/lldb/include/lldb/Host/JSONTransport.h
@@ -47,7 +47,7 @@ namespace lldb_private::transport {
class TransportUnhandledContentsError
: public llvm::ErrorInfo<TransportUnhandledContentsError> {
public:
- static char ID;
+ static const char ID;
explicit TransportUnhandledContentsError(std::string unhandled_contents);
@@ -66,7 +66,7 @@ class TransportUnhandledContentsError
/// deserialized.
class InvalidParams : public llvm::ErrorInfo<InvalidParams> {
public:
- static char ID;
+ static const char ID;
explicit InvalidParams(std::string method, std::string context)
: m_method(std::move(method)), m_context(std::move(context)) {}
@@ -86,7 +86,7 @@ class InvalidParams : public llvm::ErrorInfo<InvalidParams> {
/// An error to indicate that no handler was registered for a given method.
class MethodNotFound : public llvm::ErrorInfo<MethodNotFound> {
public:
- static char ID;
+ static const char ID;
static constexpr int kErrorCode = -32601;
diff --git a/lldb/include/lldb/Host/common/DiagnosticsRendering.h b/lldb/include/lldb/Host/common/DiagnosticsRendering.h
index 3eea0647da37e..2b017a03bad8d 100644
--- a/lldb/include/lldb/Host/common/DiagnosticsRendering.h
+++ b/lldb/include/lldb/Host/common/DiagnosticsRendering.h
@@ -91,7 +91,7 @@ class DiagnosticError
StructuredData::ObjectSP GetAsStructuredData() const override {
return Serialize(GetDetails());
}
- static char ID;
+ static const char ID;
};
} // namespace lldb_private
diff --git a/lldb/include/lldb/Protocol/MCP/MCPError.h b/lldb/include/lldb/Protocol/MCP/MCPError.h
index 609a1733197d4..29468bbfa28c8 100644
--- a/lldb/include/lldb/Protocol/MCP/MCPError.h
+++ b/lldb/include/lldb/Protocol/MCP/MCPError.h
@@ -16,7 +16,7 @@ namespace lldb_protocol::mcp {
class MCPError : public llvm::ErrorInfo<MCPError> {
public:
- static char ID;
+ static const char ID;
MCPError(std::string message, int64_t error_code = kInternalError);
@@ -35,7 +35,7 @@ class MCPError : public llvm::ErrorInfo<MCPError> {
class UnsupportedURI : public llvm::ErrorInfo<UnsupportedURI> {
public:
- static char ID;
+ static const char ID;
UnsupportedURI(std::string uri);
diff --git a/lldb/include/lldb/Symbol/ObjectFile.h b/lldb/include/lldb/Symbol/ObjectFile.h
index 2cdcadd262622..9301f05c43a72 100644
--- a/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/lldb/include/lldb/Symbol/ObjectFile.h
@@ -214,7 +214,7 @@ class ObjectFile : public std::enable_shared_from_this<ObjectFile>,
lldb_private::ConstString &archive_object, bool must_exist);
// LLVM RTTI support
- static char ID;
+ static const char ID;
virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
/// Gets the address size in bytes for the current object file.
diff --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index 6b53ba8b6acce..3547f73cb56d7 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -50,7 +50,7 @@ namespace lldb_private {
/// SymbolFile implementation.
class SymbolFile : public PluginInterface {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
@@ -540,7 +540,7 @@ class SymbolFile : public PluginInterface {
/// Most actual SymbolFile implementations should inherit from this class.
class SymbolFileCommon : public SymbolFile {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
index 6807ae2df8faa..2f35f95ad429f 100644
--- a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
+++ b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
@@ -32,7 +32,7 @@ namespace lldb_private {
/// SymbolFile via SymbolFile::SetLoadDebugInfoEnabled().
class SymbolFileOnDemand : public lldb_private::SymbolFile {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/include/lldb/Target/BorrowedStackFrame.h b/lldb/include/lldb/Target/BorrowedStackFrame.h
index 72e7777961da7..9adf7fbe9c21b 100644
--- a/lldb/include/lldb/Target/BorrowedStackFrame.h
+++ b/lldb/include/lldb/Target/BorrowedStackFrame.h
@@ -135,7 +135,7 @@ class BorrowedStackFrame : public StackFrame {
lldb::StackFrameSP m_borrowed_frame_sp;
uint32_t m_new_frame_index;
uint32_t m_new_concrete_frame_index;
- static char ID;
+ static const char ID;
BorrowedStackFrame(const BorrowedStackFrame &) = delete;
const BorrowedStackFrame &operator=(const BorrowedStackFrame &) = delete;
diff --git a/lldb/include/lldb/Target/LanguageRuntime.h b/lldb/include/lldb/Target/LanguageRuntime.h
index 7e4c11df0da7f..64a9dc619aaa1 100644
--- a/lldb/include/lldb/Target/LanguageRuntime.h
+++ b/lldb/include/lldb/Target/LanguageRuntime.h
@@ -211,7 +211,7 @@ class LanguageRuntime : public Runtime, public PluginInterface {
}
virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
- static char ID;
+ static const char ID;
/// A language runtime may be able to provide a special UnwindPlan for
/// the frame represented by the register contents \a regctx when that
diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h
index 5cba9afe2a7e8..7331ba4cfe093 100644
--- a/lldb/include/lldb/Target/StackFrame.h
+++ b/lldb/include/lldb/Target/StackFrame.h
@@ -45,7 +45,7 @@ class StackFrame : public ExecutionContextScope,
public:
/// LLVM RTTI support.
/// \{
- static char ID;
+ static const char ID;
virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
static bool classof(const StackFrame *obj) { return obj->isA(&ID); }
/// \}
diff --git a/lldb/include/lldb/Utility/DataBuffer.h b/lldb/include/lldb/Utility/DataBuffer.h
index 5529afec55303..2baa73eff05f5 100644
--- a/lldb/include/lldb/Utility/DataBuffer.h
+++ b/lldb/include/lldb/Utility/DataBuffer.h
@@ -62,7 +62,7 @@ class DataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
static bool classof(const DataBuffer *data_buffer) {
return data_buffer->isA(&ID);
@@ -113,7 +113,7 @@ class WritableDataBuffer : public DataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || DataBuffer::isA(ClassID);
}
@@ -133,7 +133,7 @@ class DataBufferUnowned : public WritableDataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || WritableDataBuffer::isA(ClassID);
}
diff --git a/lldb/include/lldb/Utility/DataBufferHeap.h b/lldb/include/lldb/Utility/DataBufferHeap.h
index a7270e95bf6d8..e6331bd981b5d 100644
--- a/lldb/include/lldb/Utility/DataBufferHeap.h
+++ b/lldb/include/lldb/Utility/DataBufferHeap.h
@@ -105,7 +105,7 @@ class DataBufferHeap : public WritableDataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || WritableDataBuffer::isA(ClassID);
}
diff --git a/lldb/include/lldb/Utility/DataBufferLLVM.h b/lldb/include/lldb/Utility/DataBufferLLVM.h
index 1058d7ac0811c..444216f9730ed 100644
--- a/lldb/include/lldb/Utility/DataBufferLLVM.h
+++ b/lldb/include/lldb/Utility/DataBufferLLVM.h
@@ -33,7 +33,7 @@ class DataBufferLLVM : public DataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || DataBuffer::isA(ClassID);
}
@@ -59,7 +59,7 @@ class WritableDataBufferLLVM : public WritableDataBuffer {
/// LLVM RTTI support.
/// {
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || WritableDataBuffer::isA(ClassID);
}
diff --git a/lldb/include/lldb/Utility/Log.h b/lldb/include/lldb/Utility/Log.h
index 1529178cb83b4..70e8b5fcae117 100644
--- a/lldb/include/lldb/Utility/Log.h
+++ b/lldb/include/lldb/Utility/Log.h
@@ -54,7 +54,7 @@ class LogHandler {
static bool classof(const LogHandler *obj) { return obj->isA(&ID); }
private:
- static char ID;
+ static const char ID;
};
class StreamLogHandler : public LogHandler {
@@ -71,7 +71,7 @@ class StreamLogHandler : public LogHandler {
private:
std::mutex m_mutex;
llvm::raw_fd_ostream m_stream;
- static char ID;
+ static const char ID;
};
class CallbackLogHandler : public LogHandler {
@@ -86,7 +86,7 @@ class CallbackLogHandler : public LogHandler {
private:
lldb::LogOutputCallback m_callback;
void *m_baton;
- static char ID;
+ static const char ID;
};
class RotatingLogHandler : public LogHandler {
@@ -109,7 +109,7 @@ class RotatingLogHandler : public LogHandler {
const size_t m_size = 0;
size_t m_next_index = 0;
size_t m_total_count = 0;
- static char ID;
+ static const char ID;
};
/// A T-style log handler that multiplexes messages to two log handlers.
@@ -126,7 +126,7 @@ class TeeLogHandler : public LogHandler {
private:
std::shared_ptr<LogHandler> m_first_log_handler;
std::shared_ptr<LogHandler> m_second_log_handler;
- static char ID;
+ static const char ID;
};
class Log final {
diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h
index 212282cca1f3e..29037d6037006 100644
--- a/lldb/include/lldb/Utility/Status.h
+++ b/lldb/include/lldb/Utility/Status.h
@@ -40,7 +40,7 @@ class CloneableError
virtual std::unique_ptr<CloneableError> Clone() const = 0;
virtual lldb::ErrorType GetErrorType() const = 0;
virtual StructuredData::ObjectSP GetAsStructuredData() const = 0;
- static char ID;
+ static const char ID;
};
/// Common base class for all error-code errors.
@@ -52,7 +52,7 @@ class CloneableECError
void log(llvm::raw_ostream &OS) const override { OS << EC.message(); }
lldb::ErrorType GetErrorType() const override;
virtual StructuredData::ObjectSP GetAsStructuredData() const override;
- static char ID;
+ static const char ID;
protected:
CloneableECError() = delete;
@@ -68,7 +68,7 @@ class MachKernelError
std::string message() const override;
std::unique_ptr<CloneableError> Clone() const override;
lldb::ErrorType GetErrorType() const override;
- static char ID;
+ static const char ID;
};
class Win32Error : public llvm::ErrorInfo<Win32Error, CloneableECError> {
@@ -78,7 +78,7 @@ class Win32Error : public llvm::ErrorInfo<Win32Error, CloneableECError> {
std::string message() const override;
std::unique_ptr<CloneableError> Clone() const override;
lldb::ErrorType GetErrorType() const override;
- static char ID;
+ static const char ID;
};
/// \class Status Status.h "lldb/Utility/Status.h" An error handling class.
diff --git a/lldb/include/lldb/Utility/UnimplementedError.h b/lldb/include/lldb/Utility/UnimplementedError.h
index c6fab0a9483c0..411fd0c06677f 100644
--- a/lldb/include/lldb/Utility/UnimplementedError.h
+++ b/lldb/include/lldb/Utility/UnimplementedError.h
@@ -15,7 +15,7 @@
namespace lldb_private {
class UnimplementedError : public llvm::ErrorInfo<UnimplementedError> {
public:
- static char ID;
+ static const char ID;
void log(llvm::raw_ostream &OS) const override { OS << "Not implemented"; }
diff --git a/lldb/source/Expression/DiagnosticManager.cpp b/lldb/source/Expression/DiagnosticManager.cpp
index 4c0233d467c95..2a5f0386aa68f 100644
--- a/lldb/source/Expression/DiagnosticManager.cpp
+++ b/lldb/source/Expression/DiagnosticManager.cpp
@@ -15,7 +15,7 @@
#include "lldb/Utility/StreamString.h"
using namespace lldb_private;
-char ExpressionError::ID;
+const char ExpressionError::ID = 0;
/// A std::error_code category for eErrorTypeExpression.
class ExpressionCategory : public std::error_category {
diff --git a/lldb/source/Expression/ExpressionTypeSystemHelper.cpp b/lldb/source/Expression/ExpressionTypeSystemHelper.cpp
index dbac376f5f1c0..df3bb401114e1 100644
--- a/lldb/source/Expression/ExpressionTypeSystemHelper.cpp
+++ b/lldb/source/Expression/ExpressionTypeSystemHelper.cpp
@@ -10,4 +10,4 @@
using namespace lldb_private;
-char ExpressionTypeSystemHelper::ID;
+const char ExpressionTypeSystemHelper::ID = 0;
diff --git a/lldb/source/Expression/ExpressionVariable.cpp b/lldb/source/Expression/ExpressionVariable.cpp
index 9e8ea60f8e052..6e6ec277bc8ae 100644
--- a/lldb/source/Expression/ExpressionVariable.cpp
+++ b/lldb/source/Expression/ExpressionVariable.cpp
@@ -15,7 +15,7 @@
using namespace lldb_private;
-char ExpressionVariable::ID;
+const char ExpressionVariable::ID = 0;
ExpressionVariable::ExpressionVariable() : m_flags(0) {}
@@ -33,7 +33,7 @@ uint8_t *ExpressionVariable::GetValueBytes() {
return nullptr;
}
-char PersistentExpressionState::ID;
+const char PersistentExpressionState::ID = 0;
PersistentExpressionState::PersistentExpressionState() = default;
diff --git a/lldb/source/Expression/FunctionCaller.cpp b/lldb/source/Expression/FunctionCaller.cpp
index 6c93d94f691cb..3a85530dc494b 100644
--- a/lldb/source/Expression/FunctionCaller.cpp
+++ b/lldb/source/Expression/FunctionCaller.cpp
@@ -31,7 +31,7 @@
using namespace lldb_private;
-char FunctionCaller::ID;
+const char FunctionCaller::ID = 0;
// FunctionCaller constructor
FunctionCaller::FunctionCaller(ExecutionContextScope &exe_scope,
diff --git a/lldb/source/Expression/LLVMUserExpression.cpp b/lldb/source/Expression/LLVMUserExpression.cpp
index 2d59194027b57..d874cf1cb8282 100644
--- a/lldb/source/Expression/LLVMUserExpression.cpp
+++ b/lldb/source/Expression/LLVMUserExpression.cpp
@@ -37,7 +37,7 @@
using namespace lldb;
using namespace lldb_private;
-char LLVMUserExpression::ID;
+const char LLVMUserExpression::ID = 0;
LLVMUserExpression::LLVMUserExpression(ExecutionContextScope &exe_scope,
llvm::StringRef expr,
diff --git a/lldb/source/Expression/ObjectFileJIT.cpp b/lldb/source/Expression/ObjectFileJIT.cpp
index 5f51617158197..a695895ef9293 100644
--- a/lldb/source/Expression/ObjectFileJIT.cpp
+++ b/lldb/source/Expression/ObjectFileJIT.cpp
@@ -28,7 +28,7 @@
using namespace lldb;
using namespace lldb_private;
-char ObjectFileJIT::ID;
+const char ObjectFileJIT::ID = 0;
void ObjectFileJIT::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp
index c6cf6d87a7220..01f936cc51009 100644
--- a/lldb/source/Expression/REPL.cpp
+++ b/lldb/source/Expression/REPL.cpp
@@ -22,7 +22,7 @@
using namespace lldb_private;
-char REPL::ID;
+const char REPL::ID = 0;
REPL::REPL(Target &target) : m_target(target) {
// Make sure all option values have sane defaults
diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp
index d39bcced48390..42575f5e62d5e 100644
--- a/lldb/source/Expression/UserExpression.cpp
+++ b/lldb/source/Expression/UserExpression.cpp
@@ -44,7 +44,7 @@
using namespace lldb_private;
-char UserExpression::ID;
+const char UserExpression::ID = 0;
UserExpression::UserExpression(ExecutionContextScope &exe_scope,
llvm::StringRef expr, llvm::StringRef prefix,
diff --git a/lldb/source/Expression/UtilityFunction.cpp b/lldb/source/Expression/UtilityFunction.cpp
index 97c226ae1c5f9..e114fb79e067e 100644
--- a/lldb/source/Expression/UtilityFunction.cpp
+++ b/lldb/source/Expression/UtilityFunction.cpp
@@ -26,7 +26,7 @@
using namespace lldb_private;
using namespace lldb;
-char UtilityFunction::ID;
+const char UtilityFunction::ID = 0;
/// Constructor
///
diff --git a/lldb/source/Host/common/DiagnosticsRendering.cpp b/lldb/source/Host/common/DiagnosticsRendering.cpp
index 2c9d33a6c325c..d41056ef5b18c 100644
--- a/lldb/source/Host/common/DiagnosticsRendering.cpp
+++ b/lldb/source/Host/common/DiagnosticsRendering.cpp
@@ -16,7 +16,7 @@ using namespace lldb;
namespace lldb_private {
-char DiagnosticError::ID;
+const char DiagnosticError::ID = 0;
lldb::ErrorType DiagnosticError::GetErrorType() const {
return lldb::eErrorTypeExpression;
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index 4fad93fca9ea3..a0b633eda4f55 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -969,6 +969,6 @@ Status SerialPort::Close() {
return NativeFile::Close();
}
-char File::ID = 0;
-char NativeFile::ID = 0;
-char SerialPort::ID = 0;
+const char File::ID = 0;
+const char NativeFile::ID = 0;
+const char SerialPort::ID = 0;
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 510f9c7696d12..fb920d207e31f 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -631,7 +631,7 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info,
return FindProcessesImpl(match_info, process_infos);
}
-char SystemLogHandler::ID;
+const char SystemLogHandler::ID = 0;
SystemLogHandler::SystemLogHandler() {}
diff --git a/lldb/source/Host/common/JSONTransport.cpp b/lldb/source/Host/common/JSONTransport.cpp
index 22de7fa8cbead..aaa7c91239a86 100644
--- a/lldb/source/Host/common/JSONTransport.cpp
+++ b/lldb/source/Host/common/JSONTransport.cpp
@@ -16,7 +16,7 @@
using namespace llvm;
using namespace lldb_private::transport;
-char TransportUnhandledContentsError::ID;
+const char TransportUnhandledContentsError::ID = 0;
TransportUnhandledContentsError::TransportUnhandledContentsError(
std::string unhandled_contents)
@@ -30,7 +30,7 @@ std::error_code TransportUnhandledContentsError::convertToErrorCode() const {
return std::make_error_code(std::errc::bad_message);
}
-char InvalidParams::ID;
+const char InvalidParams::ID = 0;
void InvalidParams::log(raw_ostream &OS) const {
OS << "invalid parameters for method '" << m_method << "': '" << m_context
@@ -40,7 +40,7 @@ std::error_code InvalidParams::convertToErrorCode() const {
return std::make_error_code(std::errc::invalid_argument);
}
-char MethodNotFound::ID;
+const char MethodNotFound::ID = 0;
void MethodNotFound::log(raw_ostream &OS) const {
OS << "method not found: '" << m_method << "'";
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp
index 521882ab3be8c..cf8613cf55832 100644
--- a/lldb/source/Interpreter/Options.cpp
+++ b/lldb/source/Interpreter/Options.cpp
@@ -54,10 +54,10 @@ class OptionParseError
llvm::ArrayRef<DiagnosticDetail> GetDetails() const override {
return m_details;
}
- static char ID;
+ static const char ID;
};
-char OptionParseError::ID;
+const char OptionParseError::ID = 0;
} // namespace lldb_private
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.cpp
index 97f9d17958fa6..4cce73f3c546c 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.cpp
@@ -10,4 +10,4 @@
using namespace lldb_private;
-char ClangExpressionHelper::ID;
+const char ClangExpressionHelper::ID = 0;
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h
index e66d46c21ddfa..2b09f63b2651c 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h
@@ -31,7 +31,7 @@ class ClangExpressionHelper
ExpressionTypeSystemHelper> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
index e2fb4a054daf3..72bb3dc576f81 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
@@ -20,7 +20,7 @@
using namespace lldb_private;
using namespace clang;
-char ClangExpressionVariable::ID;
+const char ClangExpressionVariable::ID = 0;
ClangExpressionVariable::ClangExpressionVariable(
ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order,
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
index 193ada018fa48..0d7b670939ac7 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
@@ -61,7 +61,7 @@ class ClangExpressionVariable
: public llvm::RTTIExtends<ClangExpressionVariable, ExpressionVariable> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
ClangExpressionVariable(ExecutionContextScope *exe_scope,
lldb::ByteOrder byte_order, uint32_t addr_byte_size);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.cpp
index 3eddf49a8b7e7..0c1951bf7ca18 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.cpp
@@ -16,7 +16,7 @@
using namespace lldb_private;
-char ClangExternalASTSourceCallbacks::ID;
+const char ClangExternalASTSourceCallbacks::ID = 0;
void ClangExternalASTSourceCallbacks::CompleteType(clang::TagDecl *tag_decl) {
m_ast.CompleteTagDecl(tag_decl);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.h
index d0eabb509455c..d688220806378 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExternalASTSourceCallbacks.h
@@ -23,7 +23,7 @@ namespace lldb_private {
class ClangExternalASTSourceCallbacks : public clang::ExternalASTSource {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
index d2db319afb7a0..ac73aaa143122 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
@@ -43,7 +43,7 @@
using namespace lldb_private;
-char ClangFunctionCaller::ID;
+const char ClangFunctionCaller::ID = 0;
// ClangFunctionCaller constructor
ClangFunctionCaller::ClangFunctionCaller(ExecutionContextScope &exe_scope,
@@ -207,7 +207,7 @@ ClangFunctionCaller::CompileFunction(lldb::ThreadSP thread_to_use_sp,
return num_errors;
}
-char ClangFunctionCaller::ClangFunctionCallerHelper::ID;
+const char ClangFunctionCaller::ClangFunctionCallerHelper::ID = 0;
clang::ASTConsumer *
ClangFunctionCaller::ClangFunctionCallerHelper::ASTTransformer(
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
index 9329ce76ec3bd..8bd27ae5531d7 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
@@ -62,7 +62,7 @@ class ClangFunctionCaller : public FunctionCaller {
ClangExpressionHelper> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
ClangFunctionCallerHelper(ClangFunctionCaller &owner) : m_owner(owner) {}
@@ -88,7 +88,7 @@ class ClangFunctionCaller : public FunctionCaller {
};
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override {
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
index 319ff3fe8b447..7a40cc510d69b 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
@@ -26,7 +26,7 @@
using namespace lldb;
using namespace lldb_private;
-char ClangPersistentVariables::ID;
+const char ClangPersistentVariables::ID = 0;
ClangPersistentVariables::ClangPersistentVariables(
std::shared_ptr<Target> target_sp)
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
index abeb431ccc08b..aaca2a85595ec 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
@@ -36,7 +36,7 @@ class ClangPersistentVariables
PersistentExpressionState> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
ClangPersistentVariables(std::shared_ptr<Target> target_sp);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
index 239280c652556..448285d8820ad 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -62,7 +62,7 @@
using namespace lldb_private;
-char ClangUserExpression::ID;
+const char ClangUserExpression::ID = 0;
ClangUserExpression::ClangUserExpression(
ExecutionContextScope &exe_scope, llvm::StringRef expr,
@@ -993,7 +993,7 @@ void ClangUserExpression::FixupParseErrorDiagnostics(
FixupCVRParseErrorDiagnostics(diagnostic_manager);
}
-char ClangUserExpression::ClangUserExpressionHelper::ID;
+const char ClangUserExpression::ClangUserExpressionHelper::ID = 0;
void ClangUserExpression::ClangUserExpressionHelper::ResetDeclMap(
ExecutionContext &exe_ctx,
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
index fd24893b1ecdd..8928e5baebbf4 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
@@ -41,7 +41,7 @@ class ClangExpressionParser;
/// the Clang parser to produce LLVM IR from the expression.
class ClangUserExpression : public LLVMUserExpression {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override {
@@ -56,7 +56,7 @@ class ClangUserExpression : public LLVMUserExpression {
ClangExpressionHelper> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
ClangUserExpressionHelper(Target &target, bool top_level)
: m_target(target), m_top_level(top_level) {}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
index 112ce9be7bd1a..87c49609ab791 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -27,7 +27,7 @@
using namespace lldb_private;
-char ClangUtilityFunction::ID;
+const char ClangUtilityFunction::ID = 0;
ClangUtilityFunction::ClangUtilityFunction(ExecutionContextScope &exe_scope,
std::string text, std::string name,
@@ -174,7 +174,7 @@ bool ClangUtilityFunction::Install(DiagnosticManager &diagnostic_manager,
}
}
-char ClangUtilityFunction::ClangUtilityFunctionHelper::ID;
+const char ClangUtilityFunction::ClangUtilityFunctionHelper::ID = 0;
void ClangUtilityFunction::ClangUtilityFunctionHelper::ResetDeclMap(
ExecutionContext &exe_ctx, bool keep_result_in_memory) {
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
index 72ff84f3ceaf7..9e717b6db378d 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
@@ -33,7 +33,7 @@ namespace lldb_private {
/// to call later on.
class ClangUtilityFunction : public UtilityFunction {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
bool isA(const void *ClassID) const override {
@@ -77,7 +77,7 @@ class ClangUtilityFunction : public UtilityFunction {
ClangExpressionHelper> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
/// Return the object that the parser should use when resolving external
/// values. May be NULL if everything should be self-contained.
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
index 9381a29f56f43..4c3718c44a251 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -98,7 +98,7 @@ emulateLookupInCtxt(Sema &sema, llvm::StringRef name, DeclContext *ctxt) {
/// Error class for handling problems when finding a certain DeclContext.
struct MissingDeclContext : public llvm::ErrorInfo<MissingDeclContext> {
- static char ID;
+ static const char ID;
MissingDeclContext(DeclContext *context, std::string error)
: m_context(context), m_error(error) {}
@@ -116,7 +116,7 @@ struct MissingDeclContext : public llvm::ErrorInfo<MissingDeclContext> {
}
};
-char MissingDeclContext::ID = 0;
+const char MissingDeclContext::ID = 0;
/// Given a foreign decl context, this function finds the equivalent local
/// decl context in the ASTContext of the given Sema. Potentially deserializes
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
index be17c5421fc51..5f1a1d3823be0 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
@@ -31,7 +31,7 @@
using namespace llvm;
using namespace lldb_private;
-static char ID;
+static const char ID;
#define VALID_OBJC_OBJECT_CHECK_NAME "$__lldb_objc_object_check"
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
index 913678b629f2f..7ed920b6b293d 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -41,7 +41,7 @@ static ConstString g_this = ConstString("this");
static ConstString g_promise = ConstString("__promise");
static ConstString g_coro_frame = ConstString("__coro_frame");
-char CPPLanguageRuntime::ID = 0;
+const char CPPLanguageRuntime::ID = 0;
/// A frame recognizer that is installed to hide libc++ implementation
/// details from the backtrace.
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
index 05639e9798917..934d35eb6cb62 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
@@ -40,7 +40,7 @@ class CPPLanguageRuntime : public LanguageRuntime {
LibCppStdFunctionCallableInfo
FindLibCppStdFunctionCallableInfo(lldb::ValueObjectSP &valobj_sp);
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || LanguageRuntime::isA(ClassID);
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 75b00518aac53..4e23c657f97e8 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -45,7 +45,7 @@ LLDB_PLUGIN_DEFINE_ADV(ItaniumABILanguageRuntime, CXXItaniumABI)
static const char *vtable_demangled_prefix = "vtable for ";
-char ItaniumABILanguageRuntime::ID = 0;
+const char ItaniumABILanguageRuntime::ID = 0;
bool ItaniumABILanguageRuntime::CouldHaveDynamicValue(ValueObject &in_value) {
const bool check_cxx = true;
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
index 7abf2f8547cd5..2fe28c1e7f801 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
@@ -37,7 +37,7 @@ class ItaniumABILanguageRuntime : public lldb_private::CPPLanguageRuntime {
static llvm::StringRef GetPluginNameStatic() { return "itanium"; }
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || CPPLanguageRuntime::isA(ClassID);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index ad60290382c02..52b141a38f9fd 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -48,7 +48,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(AppleObjCRuntime)
-char AppleObjCRuntime::ID = 0;
+const char AppleObjCRuntime::ID = 0;
AppleObjCRuntime::~AppleObjCRuntime() = default;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
index 425a608d65c2c..31b2a3acc7950 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
@@ -29,7 +29,7 @@ class AppleObjCRuntime : public lldb_private::ObjCLanguageRuntime {
// because
// you can't make an instance of this generic runtime.
- static char ID;
+ static const char ID;
static void Initialize();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index b1f2a661c4af6..5b1b95ec15abb 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -37,7 +37,7 @@
using namespace lldb;
using namespace lldb_private;
-char AppleObjCRuntimeV1::ID = 0;
+const char AppleObjCRuntimeV1::ID = 0;
AppleObjCRuntimeV1::AppleObjCRuntimeV1(Process *process)
: AppleObjCRuntime(process), m_hash_signature(),
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
index c51ac24e690b8..29c8fc7b67498 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
@@ -30,7 +30,7 @@ class AppleObjCRuntimeV1 : public AppleObjCRuntime {
static llvm::StringRef GetPluginNameStatic() { return "apple-objc-v1"; }
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || AppleObjCRuntime::isA(ClassID);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index be313866a1015..2b011e46b0f80 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -69,7 +69,7 @@
using namespace lldb;
using namespace lldb_private;
-char AppleObjCRuntimeV2::ID = 0;
+const char AppleObjCRuntimeV2::ID = 0;
static const char *g_get_dynamic_class_info_name =
"__lldb_apple_objc_v2_get_dynamic_class_info";
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index b99bda2f7e259..07af9f29c9ec8 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -41,7 +41,7 @@ class AppleObjCRuntimeV2 : public AppleObjCRuntime {
LanguageRuntime *GetPreferredLanguageRuntime(ValueObject &in_value) override;
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || AppleObjCRuntime::isA(ClassID);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
index 8dc5f511c6291..937dc2cb90b85 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp
@@ -25,7 +25,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(GNUstepObjCRuntime)
-char GNUstepObjCRuntime::ID = 0;
+const char GNUstepObjCRuntime::ID = 0;
void GNUstepObjCRuntime::Initialize() {
PluginManager::RegisterPlugin(
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
index 94a5c9e1261a8..63e296682a460 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.h
@@ -29,7 +29,7 @@ class GNUstepObjCRuntime : public lldb_private::ObjCLanguageRuntime {
// PluginManager, PluginInterface and LLVM RTTI implementation
//
- static char ID;
+ static const char ID;
static void Initialize();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
index 2b2ca080c7f55..dfee72c4b4651 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -31,7 +31,7 @@
using namespace lldb;
using namespace lldb_private;
-char ObjCLanguageRuntime::ID = 0;
+const char ObjCLanguageRuntime::ID = 0;
// Destructor
ObjCLanguageRuntime::~ObjCLanguageRuntime() = default;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
index cc8281e9d1a02..f6d0f7afb1870 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -209,7 +209,7 @@ class ObjCLanguageRuntime : public LanguageRuntime {
~ObjCLanguageRuntime() override;
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || LanguageRuntime::isA(ClassID);
diff --git a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
index 41acc0207fb80..b9877e8597ea3 100644
--- a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
+++ b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
@@ -45,7 +45,7 @@ std::optional<Header> Header::parse(llvm::StringRef text) {
return Header{ArchSpec(triple), std::move(uuid)};
}
-char ObjectFileBreakpad::ID;
+const char ObjectFileBreakpad::ID = 0;
void ObjectFileBreakpad::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
index c866aa73e0cdf..e20d8c2795da9 100644
--- a/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
+++ b/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
@@ -49,7 +49,7 @@ class ObjectFileBreakpad : public ObjectFile {
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
index 123d1ccf229d8..182b41af36778 100644
--- a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
@@ -29,7 +29,7 @@ static bool IsCOFFObjectFile(const llvm::ArrayRef<uint8_t> data) {
LLDB_PLUGIN_DEFINE(ObjectFileCOFF)
-char ObjectFileCOFF::ID;
+const char ObjectFileCOFF::ID = 0;
ObjectFileCOFF::~ObjectFileCOFF() = default;
diff --git a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.h b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.h
index 0df6803deb29d..965a7e9033777 100644
--- a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.h
+++ b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.h
@@ -62,7 +62,7 @@ class ObjectFileCOFF : public lldb_private::ObjectFile {
lldb_private::ModuleSpecList &specs);
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 90afd5b2dc93a..e0876bf4afa9c 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -370,7 +370,7 @@ static uint32_t subTypeFromElfHeader(const elf::ELFHeader &header) {
return LLDB_INVALID_CPUTYPE;
}
-char ObjectFileELF::ID;
+const char ObjectFileELF::ID = 0;
// Arbitrary constant used as UUID prefix for core files.
const uint32_t ObjectFileELF::g_core_uuid_magic(0xE210C);
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index 4992e9e2482f3..98db6492baee8 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -92,7 +92,7 @@ class ObjectFileELF : public lldb_private::ObjectFile {
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp
index 3375c47f22105..7f6032f2edbc4 100644
--- a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp
+++ b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp
@@ -24,7 +24,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(ObjectFileJSON)
-char ObjectFileJSON::ID;
+const char ObjectFileJSON::ID = 0;
void ObjectFileJSON::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h
index fc471d3d4df5a..cb488595c7369 100644
--- a/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h
+++ b/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h
@@ -48,7 +48,7 @@ class ObjectFileJSON : public ObjectFile {
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index c1729d7ef57ba..ad15866ac9f94 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -768,7 +768,7 @@ static uint32_t MachHeaderSizeFromMagic(uint32_t magic) {
#define MACHO_NLIST_ARM_SYMBOL_IS_THUMB 0x0008
-char ObjectFileMachO::ID;
+const char ObjectFileMachO::ID = 0;
void ObjectFileMachO::Initialize() {
PluginManager::RegisterPlugin(
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index d4c3a1f613ad2..9bea3339fda76 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -72,7 +72,7 @@ class ObjectFileMachO : public lldb_private::ObjectFile {
lldb::addr_t offset, lldb::addr_t length);
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
index 7cebffbb904c2..11fd431986604 100644
--- a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
+++ b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
@@ -34,7 +34,7 @@ static UUID GetPDBUUID(InfoStream &IS, DbiStream &DS) {
return UUID(debug_info);
}
-char ObjectFilePDB::ID;
+const char ObjectFilePDB::ID = 0;
void ObjectFilePDB::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.h b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.h
index 0a10d7e51bdd5..1ff873aaa37df 100644
--- a/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.h
+++ b/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.h
@@ -53,7 +53,7 @@ class ObjectFilePDB : public ObjectFile {
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index cf2f84677b0fc..1b1ebf5e4583c 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -174,7 +174,7 @@ static UUID GetCoffUUID(llvm::object::COFFObjectFile &coff_obj) {
return UUID(&data, sizeof(data));
}
-char ObjectFilePECOFF::ID;
+const char ObjectFilePECOFF::ID = 0;
void ObjectFilePECOFF::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
index 8002e70e604bb..f2ffdef9deb36 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -94,7 +94,7 @@ class ObjectFilePECOFF : public lldb_private::ObjectFile {
static lldb::SymbolType MapSymbolType(uint16_t coff_symbol_type);
// LLVM RTTI support
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
index 8e540f5c3d290..b9824a53f0146 100644
--- a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
+++ b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
@@ -126,7 +126,7 @@ static bool ValidateModuleHeader(llvm::ArrayRef<uint8_t> data) {
return version == llvm::wasm::WasmVersion;
}
-char ObjectFileWasm::ID;
+const char ObjectFileWasm::ID = 0;
void ObjectFileWasm::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
index 18e36b22a4641..070584977fadf 100644
--- a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
+++ b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
@@ -56,7 +56,7 @@ class ObjectFileWasm : public ObjectFile {
/// LLVM RTTI support
/// \{
- static char ID;
+ static const char ID;
bool isA(const void *ClassID) const override {
return ClassID == &ID || ObjectFile::isA(ClassID);
}
diff --git a/lldb/source/Plugins/Process/scripted/ScriptedFrame.cpp b/lldb/source/Plugins/Process/scripted/ScriptedFrame.cpp
index ab7f70efb4bd4..0f3144f6e88c7 100644
--- a/lldb/source/Plugins/Process/scripted/ScriptedFrame.cpp
+++ b/lldb/source/Plugins/Process/scripted/ScriptedFrame.cpp
@@ -34,7 +34,7 @@
using namespace lldb;
using namespace lldb_private;
-char ScriptedFrame::ID;
+const char ScriptedFrame::ID = 0;
void ScriptedFrame::CheckInterpreterAndScriptObject() const {
lldbassert(m_script_object_sp && "Invalid Script Object.");
diff --git a/lldb/source/Plugins/Process/scripted/ScriptedFrame.h b/lldb/source/Plugins/Process/scripted/ScriptedFrame.h
index fe154792c745b..eccb2973f31f0 100644
--- a/lldb/source/Plugins/Process/scripted/ScriptedFrame.h
+++ b/lldb/source/Plugins/Process/scripted/ScriptedFrame.h
@@ -104,7 +104,7 @@ class ScriptedFrame : public lldb_private::StackFrame {
lldb_private::StructuredData::GenericSP m_script_object_sp;
lldb::VariableListSP m_variable_list_sp;
- static char ID;
+ static const char ID;
};
} // namespace lldb_private
diff --git a/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp b/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp
index 41e3e2706c1a0..6fae4571f5dcd 100644
--- a/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp
+++ b/lldb/source/Plugins/REPL/Clang/ClangREPL.cpp
@@ -15,7 +15,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(ClangREPL)
-char ClangREPL::ID;
+const char ClangREPL::ID = 0;
ClangREPL::ClangREPL(lldb::LanguageType language, Target &target)
: llvm::RTTIExtends<ClangREPL, REPL>(target), m_language(language),
diff --git a/lldb/source/Plugins/REPL/Clang/ClangREPL.h b/lldb/source/Plugins/REPL/Clang/ClangREPL.h
index 7d219c46189ea..4cebdda62f51d 100644
--- a/lldb/source/Plugins/REPL/Clang/ClangREPL.h
+++ b/lldb/source/Plugins/REPL/Clang/ClangREPL.h
@@ -17,7 +17,7 @@ namespace lldb_private {
class ClangREPL : public llvm::RTTIExtends<ClangREPL, REPL> {
public:
// LLVM RTTI support
- static char ID;
+ static const char ID;
ClangREPL(lldb::LanguageType language, Target &target);
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 74b1c3a6e1ac8..6b29ff5aa9889 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -1000,7 +1000,7 @@ std::string PythonException::ReadBacktrace() const {
return std::move(backtrace.get());
}
-char PythonException::ID = 0;
+const char PythonException::ID = 0;
llvm::Expected<File::OpenOptions>
GetOptionsForPyObject(const PythonObject &obj) {
@@ -1093,13 +1093,13 @@ class SimplePythonFile : public OwnedPythonFile<NativeFile> {
File::OpenOptions options)
: OwnedPythonFile(file, borrowed, fd, options, false) {}
- static char ID;
+ static const char ID;
bool isA(const void *classID) const override {
return classID == &ID || NativeFile::isA(classID);
}
static bool classof(const File *file) { return file->isA(&ID); }
};
-char SimplePythonFile::ID = 0;
+const char SimplePythonFile::ID = 0;
} // namespace
// Shared methods between TextPythonFile and BinaryPythonFile
@@ -1139,13 +1139,13 @@ class PythonIOFile : public OwnedPythonFile<File> {
return GetOptionsForPyObject(m_py_obj);
}
- static char ID;
+ static const char ID;
bool isA(const void *classID) const override {
return classID == &ID || File::isA(classID);
}
static bool classof(const File *file) { return file->isA(&ID); }
};
-char PythonIOFile::ID = 0;
+const char PythonIOFile::ID = 0;
} // namespace
namespace {
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 45bb499248329..791e539b4ecf6 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -655,7 +655,7 @@ class PythonException : public llvm::ErrorInfo<PythonException> {
PyObject *m_repr_bytes;
public:
- static char ID;
+ static const char ID;
const char *toCString() const;
PythonException(const char *caller = nullptr);
void Restore();
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index 39f21250649d8..101391ad9d009 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -29,7 +29,7 @@ using namespace lldb_private::breakpad;
LLDB_PLUGIN_DEFINE(SymbolFileBreakpad)
-char SymbolFileBreakpad::ID;
+const char SymbolFileBreakpad::ID = 0;
class SymbolFileBreakpad::LineIterator {
public:
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index 0bf67518efd5c..6b5812524439a 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -23,7 +23,7 @@ namespace breakpad {
class SymbolFileBreakpad : public SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
index 0d3acf2565879..34d5d3fd3dde2 100644
--- a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
+++ b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
@@ -47,7 +47,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(SymbolFileCTF)
-char SymbolFileCTF::ID;
+const char SymbolFileCTF::ID = 0;
SymbolFileCTF::SymbolFileCTF(lldb::ObjectFileSP objfile_sp)
: SymbolFileCommon(std::move(objfile_sp)) {}
diff --git a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h
index 3a80138fffbc3..61e883323f231 100644
--- a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h
+++ b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h
@@ -21,7 +21,7 @@ namespace lldb_private {
class SymbolFileCTF : public lldb_private::SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 3a790afb1458d..62b5084edf20e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -112,7 +112,7 @@ using namespace llvm::dwarf;
LLDB_PLUGIN_DEFINE(SymbolFileDWARF)
-char SymbolFileDWARF::ID;
+const char SymbolFileDWARF::ID = 0;
namespace {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index a60527b8eda33..9710057928758 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -65,7 +65,7 @@ class SymbolFileDWARFDwp;
class SymbolFileDWARF : public SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 1553fcbc831a9..3150db8bbd0c7 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -49,7 +49,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::plugin::dwarf;
-char SymbolFileDWARFDebugMap::ID;
+const char SymbolFileDWARFDebugMap::ID = 0;
// Subclass lldb_private::Module so we can intercept the
// "Module::GetObjectFile()" (so we can fixup the object file sections) and
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index 74b97f610f29c..58625f14f3d94 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -33,7 +33,7 @@ class DWARFDeclContext;
class SymbolFileDWARFDebugMap : public SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
index 60d87c3fc2559..14fd08792c4a1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
@@ -23,7 +23,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::plugin::dwarf;
-char SymbolFileDWARFDwo::ID;
+const char SymbolFileDWARFDwo::ID = 0;
SymbolFileDWARFDwo::SymbolFileDWARFDwo(SymbolFileDWARF &base_symbol_file,
ObjectFileSP objfile, uint32_t id)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
index d906e09fe81ab..8ae2df6c3e039 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
@@ -17,7 +17,7 @@ namespace lldb_private::plugin {
namespace dwarf {
class SymbolFileDWARFDwo : public SymbolFileDWARF {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.cpp b/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.cpp
index 5112e10782773..b3ff721b503d2 100644
--- a/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.cpp
+++ b/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.cpp
@@ -33,7 +33,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(SymbolFileJSON)
-char SymbolFileJSON::ID;
+const char SymbolFileJSON::ID = 0;
SymbolFileJSON::SymbolFileJSON(lldb::ObjectFileSP objfile_sp)
: SymbolFileCommon(std::move(objfile_sp)) {}
diff --git a/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.h b/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.h
index 3dd33b3dc82fb..73e52b31076bf 100644
--- a/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.h
+++ b/lldb/source/Plugins/SymbolFile/JSON/SymbolFileJSON.h
@@ -20,7 +20,7 @@ namespace lldb_private {
class SymbolFileJSON : public lldb_private::SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 7e39af7d32e2f..98adc923086eb 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -65,7 +65,7 @@ using namespace npdb;
using namespace llvm::codeview;
using namespace llvm::pdb;
-char SymbolFileNativePDB::ID;
+const char SymbolFileNativePDB::ID = 0;
static lldb::LanguageType TranslateLanguage(PDB_Lang lang) {
switch (lang) {
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 11b982e6fc67e..9758b4b0bec0f 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -44,7 +44,7 @@ class SymbolFileNativePDB : public SymbolFileCommon {
friend class UdtRecordCompleter;
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 97c995fc9b22a..45ca7ff46f610 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -69,7 +69,7 @@ using namespace llvm::pdb;
LLDB_PLUGIN_DEFINE(SymbolFilePDB)
-char SymbolFilePDB::ID;
+const char SymbolFilePDB::ID = 0;
namespace {
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
index ccbf02db1159f..e53d32db25cd9 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -24,7 +24,7 @@ class PDBASTParser;
class SymbolFilePDB : public lldb_private::SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index 4cd46440b10bd..5ea7c6420717a 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -28,7 +28,7 @@ using namespace lldb_private;
LLDB_PLUGIN_DEFINE(SymbolFileSymtab)
-char SymbolFileSymtab::ID;
+const char SymbolFileSymtab::ID = 0;
void SymbolFileSymtab::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
index a36311525334e..3fc898e613db2 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
@@ -18,7 +18,7 @@
class SymbolFileSymtab : public lldb_private::SymbolFileCommon {
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
public:
/// LLVM RTTI support.
diff --git a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
index 9c075398d5470..6db6c1d4af77b 100644
--- a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
@@ -17,7 +17,7 @@ using namespace lldb_private;
using namespace lldb_private::trace_intel_pt;
using namespace llvm;
-char IntelPTError::ID;
+const char IntelPTError::ID = 0;
IntelPTError::IntelPTError(int libipt_error_code, lldb::addr_t address)
: m_libipt_error_code(libipt_error_code), m_address(address) {
diff --git a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
index a48c55cc76df6..8bbee83298d4a 100644
--- a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
+++ b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
@@ -25,7 +25,7 @@ namespace trace_intel_pt {
/// Class for representing a libipt decoding error.
class IntelPTError : public llvm::ErrorInfo<IntelPTError> {
public:
- static char ID;
+ static const char ID;
/// \param[in] libipt_error_code
/// Negative number returned by libipt when decoding the trace and
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index c9192938fca80..bb51001ffbb4e 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -363,7 +363,7 @@ static void SetMemberOwningModule(clang::Decl *member,
}
}
-char TypeSystemClang::ID;
+const char TypeSystemClang::ID = 0;
bool TypeSystemClang::IsOperator(llvm::StringRef name,
clang::OverloadedOperatorKind &op_kind) {
@@ -9732,7 +9732,7 @@ class SpecializedScratchAST : public TypeSystemClang {
};
} // namespace
-char ScratchTypeSystemClang::ID;
+const char ScratchTypeSystemClang::ID = 0;
const std::nullopt_t ScratchTypeSystemClang::DefaultAST = std::nullopt;
ScratchTypeSystemClang::ScratchTypeSystemClang(Target &target,
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
index 40844f67b2445..dd2d625420bd7 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
@@ -116,7 +116,7 @@ class TypePayloadClang {
/// clang::ASTContext that was created by clang::CompilerInstance).
class TypeSystemClang : public TypeSystem {
// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
typedef void (*CompleteTagDeclCallback)(void *baton, clang::TagDecl *);
@@ -1267,7 +1267,7 @@ class TypeSystemClang : public TypeSystem {
/// lldb::Target.
class ScratchTypeSystemClang : public TypeSystemClang {
/// LLVM RTTI support
- static char ID;
+ static const char ID;
public:
ScratchTypeSystemClang(Target &target, llvm::Triple triple);
diff --git a/lldb/source/Protocol/MCP/MCPError.cpp b/lldb/source/Protocol/MCP/MCPError.cpp
index cfac055ba5f11..00c40cd499e74 100644
--- a/lldb/source/Protocol/MCP/MCPError.cpp
+++ b/lldb/source/Protocol/MCP/MCPError.cpp
@@ -13,8 +13,8 @@
using namespace lldb_protocol::mcp;
-char MCPError::ID;
-char UnsupportedURI::ID;
+const char MCPError::ID = 0;
+const char UnsupportedURI::ID = 0;
MCPError::MCPError(std::string message, int64_t error_code)
: m_message(message), m_error_code(error_code) {}
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 6ed98c0a3ad94..2908282c8e06f 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -29,7 +29,7 @@
using namespace lldb;
using namespace lldb_private;
-char ObjectFile::ID;
+const char ObjectFile::ID = 0;
size_t ObjectFile::g_initial_bytes_to_read = 512;
static ObjectFileSP
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index bfc63003216b2..e1cbbded75510 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -26,8 +26,8 @@
using namespace lldb_private;
using namespace lldb;
-char SymbolFile::ID;
-char SymbolFileCommon::ID;
+const char SymbolFile::ID = 0;
+const char SymbolFileCommon::ID = 0;
void SymbolFile::PreloadSymbols() {
// No-op for most implementations.
diff --git a/lldb/source/Symbol/SymbolFileOnDemand.cpp b/lldb/source/Symbol/SymbolFileOnDemand.cpp
index 5ff4d7d23fc81..a6b9f38a879c4 100644
--- a/lldb/source/Symbol/SymbolFileOnDemand.cpp
+++ b/lldb/source/Symbol/SymbolFileOnDemand.cpp
@@ -17,7 +17,7 @@
using namespace lldb;
using namespace lldb_private;
-char SymbolFileOnDemand::ID;
+const char SymbolFileOnDemand::ID = 0;
SymbolFileOnDemand::SymbolFileOnDemand(
std::unique_ptr<SymbolFile> &&symbol_file)
diff --git a/lldb/source/Target/BorrowedStackFrame.cpp b/lldb/source/Target/BorrowedStackFrame.cpp
index 5afadf21fde03..55668874f9b48 100644
--- a/lldb/source/Target/BorrowedStackFrame.cpp
+++ b/lldb/source/Target/BorrowedStackFrame.cpp
@@ -11,7 +11,7 @@
using namespace lldb;
using namespace lldb_private;
-char BorrowedStackFrame::ID;
+const char BorrowedStackFrame::ID = 0;
BorrowedStackFrame::BorrowedStackFrame(
StackFrameSP borrowed_frame_sp, uint32_t new_frame_index,
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp
index 269d1e017fdf2..a73f4da7b7a0f 100644
--- a/lldb/source/Target/LanguageRuntime.cpp
+++ b/lldb/source/Target/LanguageRuntime.cpp
@@ -16,7 +16,7 @@
using namespace lldb;
using namespace lldb_private;
-char LanguageRuntime::ID = 0;
+const char LanguageRuntime::ID = 0;
ExceptionSearchFilter::ExceptionSearchFilter(const lldb::TargetSP &target_sp,
lldb::LanguageType language,
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 340607e14abed..d343045270a42 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -46,7 +46,7 @@ using namespace lldb;
using namespace lldb_private;
// LLVM RTTI support.
-char StackFrame::ID;
+const char StackFrame::ID = 0;
// The first bits in the flags are reserved for the SymbolContext::Scope bits
// so we know if we have tried to look up information in our internal symbol
diff --git a/lldb/source/Utility/DataBufferHeap.cpp b/lldb/source/Utility/DataBufferHeap.cpp
index ea84a36f16977..9e85bbecd2167 100644
--- a/lldb/source/Utility/DataBufferHeap.cpp
+++ b/lldb/source/Utility/DataBufferHeap.cpp
@@ -68,7 +68,7 @@ void DataBufferHeap::Clear() {
m_data.swap(empty);
}
-char DataBuffer::ID;
-char WritableDataBuffer::ID;
-char DataBufferUnowned::ID;
-char DataBufferHeap::ID;
+const char DataBuffer::ID = 0;
+const char WritableDataBuffer::ID = 0;
+const char DataBufferUnowned::ID = 0;
+const char DataBufferHeap::ID = 0;
diff --git a/lldb/source/Utility/DataBufferLLVM.cpp b/lldb/source/Utility/DataBufferLLVM.cpp
index 376fe0689ecf0..e5e07c13d8979 100644
--- a/lldb/source/Utility/DataBufferLLVM.cpp
+++ b/lldb/source/Utility/DataBufferLLVM.cpp
@@ -47,5 +47,5 @@ lldb::offset_t WritableDataBufferLLVM::GetByteSize() const {
return Buffer->getBufferSize();
}
-char DataBufferLLVM::ID;
-char WritableDataBufferLLVM::ID;
+const char DataBufferLLVM::ID = 0;
+const char WritableDataBufferLLVM::ID = 0;
diff --git a/lldb/source/Utility/Log.cpp b/lldb/source/Utility/Log.cpp
index 4c2c33aaafe00..1e239f748be6e 100644
--- a/lldb/source/Utility/Log.cpp
+++ b/lldb/source/Utility/Log.cpp
@@ -35,11 +35,11 @@
using namespace lldb_private;
-char LogHandler::ID;
-char StreamLogHandler::ID;
-char CallbackLogHandler::ID;
-char RotatingLogHandler::ID;
-char TeeLogHandler::ID;
+const char LogHandler::ID = 0;
+const char StreamLogHandler::ID = 0;
+const char CallbackLogHandler::ID = 0;
+const char RotatingLogHandler::ID = 0;
+const char TeeLogHandler::ID = 0;
llvm::ManagedStatic<Log::ChannelMap> Log::g_channel_map;
diff --git a/lldb/source/Utility/Status.cpp b/lldb/source/Utility/Status.cpp
index 49dd469d20bd5..4715f54ea8925 100644
--- a/lldb/source/Utility/Status.cpp
+++ b/lldb/source/Utility/Status.cpp
@@ -39,10 +39,10 @@ class raw_ostream;
using namespace lldb;
using namespace lldb_private;
-char CloneableError::ID;
-char CloneableECError::ID;
-char MachKernelError::ID;
-char Win32Error::ID;
+const char CloneableError::ID = 0;
+const char CloneableECError::ID = 0;
+const char MachKernelError::ID = 0;
+const char Win32Error::ID = 0;
namespace {
/// A std::error_code category for eErrorTypeGeneric.
diff --git a/lldb/source/Utility/UnimplementedError.cpp b/lldb/source/Utility/UnimplementedError.cpp
index 034ad5b17b640..7a9ebc9b505b2 100644
--- a/lldb/source/Utility/UnimplementedError.cpp
+++ b/lldb/source/Utility/UnimplementedError.cpp
@@ -8,4 +8,4 @@
#include "lldb/Utility/UnimplementedError.h"
-char lldb_private::UnimplementedError::ID;
+const char lldb_private::UnimplementedError::ID = 0;
diff --git a/lldb/tools/lldb-dap/DAPError.cpp b/lldb/tools/lldb-dap/DAPError.cpp
index 5c5bae37cc600..5c1a934fc9a94 100644
--- a/lldb/tools/lldb-dap/DAPError.cpp
+++ b/lldb/tools/lldb-dap/DAPError.cpp
@@ -13,7 +13,7 @@
namespace lldb_dap {
-char DAPError::ID;
+const char DAPError::ID = 0;
DAPError::DAPError(std::string message, std::error_code EC, bool show_user,
std::optional<std::string> url,
@@ -25,7 +25,7 @@ void DAPError::log(llvm::raw_ostream &OS) const { OS << m_message; }
std::error_code DAPError::convertToErrorCode() const { return m_ec; }
-char NotStoppedError::ID;
+const char NotStoppedError::ID = 0;
void NotStoppedError::log(llvm::raw_ostream &OS) const { OS << "not stopped"; }
diff --git a/lldb/tools/lldb-dap/DAPError.h b/lldb/tools/lldb-dap/DAPError.h
index 26b1daae59340..a18dc50133ccd 100644
--- a/lldb/tools/lldb-dap/DAPError.h
+++ b/lldb/tools/lldb-dap/DAPError.h
@@ -20,7 +20,7 @@ namespace lldb_dap {
/// the user.
class DAPError : public llvm::ErrorInfo<DAPError> {
public:
- static char ID;
+ static const char ID;
DAPError(std::string message,
std::error_code EC = llvm::inconvertibleErrorCode(),
@@ -47,7 +47,7 @@ class DAPError : public llvm::ErrorInfo<DAPError> {
/// the process is not stopped.
class NotStoppedError : public llvm::ErrorInfo<NotStoppedError> {
public:
- static char ID;
+ static const char ID;
void log(llvm::raw_ostream &OS) const override;
std::error_code convertToErrorCode() const override;
};
diff --git a/lldb/unittests/Expression/DWARFExpressionTest.cpp b/lldb/unittests/Expression/DWARFExpressionTest.cpp
index f264fb3ce94e5..c31a4378b9585 100644
--- a/lldb/unittests/Expression/DWARFExpressionTest.cpp
+++ b/lldb/unittests/Expression/DWARFExpressionTest.cpp
@@ -746,7 +746,7 @@ TEST_F(DWARFExpressionMockProcessTest, WASM_DW_OP_addr_index) {
}
class CustomSymbolFileDWARF : public SymbolFileDWARF {
- static char ID;
+ static const char ID;
public:
using SymbolFileDWARF::SymbolFileDWARF;
@@ -829,7 +829,7 @@ class CustomSymbolFileDWARF : public SymbolFileDWARF {
}
};
-char CustomSymbolFileDWARF::ID;
+const char CustomSymbolFileDWARF::ID = 0;
static auto testExpressionVendorExtensions(lldb::ModuleSP module_sp,
DWARFUnit &dwarf_unit,
diff --git a/lldb/unittests/Symbol/LineTableTest.cpp b/lldb/unittests/Symbol/LineTableTest.cpp
index ca63c6ff51dad..bf7d3f6ca638a 100644
--- a/lldb/unittests/Symbol/LineTableTest.cpp
+++ b/lldb/unittests/Symbol/LineTableTest.cpp
@@ -46,7 +46,7 @@ class FakeSymbolFile : public SymbolFile {
private:
/// LLVM RTTI support.
- static char ID;
+ static const char ID;
static SymbolFile *CreateInstance(ObjectFileSP objfile_sp) {
return new FakeSymbolFile(std::move(objfile_sp));
@@ -148,7 +148,7 @@ class LineSequenceBuilder {
} // namespace
-char FakeSymbolFile::ID;
+const char FakeSymbolFile::ID = 0;
static llvm::Expected<FakeModuleFixture>
CreateFakeModule(std::vector<LineTable::Sequence> line_sequences) {
diff --git a/llvm/docs/HowToSetUpLLVMStyleRTTI.rst b/llvm/docs/HowToSetUpLLVMStyleRTTI.rst
index 423f4d5ffc56b..d7f87370709c7 100644
--- a/llvm/docs/HowToSetUpLLVMStyleRTTI.rst
+++ b/llvm/docs/HowToSetUpLLVMStyleRTTI.rst
@@ -442,14 +442,14 @@ E.g.
class Shape : public RTTIExtends<Shape, RTTIRoot> {
public:
- static char ID;
+ static const char ID;
virtual double computeArea() = 0;
};
class Square : public RTTIExtends<Square, Shape> {
double SideLength;
public:
- static char ID;
+ static const char ID;
Square(double S) : SideLength(S) {}
double computeArea() override;
@@ -458,15 +458,15 @@ E.g.
class Circle : public RTTIExtends<Circle, Shape> {
double Radius;
public:
- static char ID;
+ static const char ID;
Circle(double R) : Radius(R) {}
double computeArea() override;
};
- char Shape::ID = 0;
- char Square::ID = 0;
- char Circle::ID = 0;
+ const char Shape::ID = 0;
+ const char Square::ID = 0;
+ const char Circle::ID = 0;
Advanced Use Cases
==================
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 51a813eadee73..193c9d421822e 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -499,7 +499,7 @@ that inherits from the ``ErrorInfo`` utility, E.g.:
class BadFileFormat : public ErrorInfo<BadFileFormat> {
public:
- static char ID;
+ static const char ID;
std::string Path;
BadFileFormat(StringRef Path) : Path(Path.str()) {}
diff --git a/llvm/examples/Bye/Bye.cpp b/llvm/examples/Bye/Bye.cpp
index b476ab72a65f2..98b43f8f369b2 100644
--- a/llvm/examples/Bye/Bye.cpp
+++ b/llvm/examples/Bye/Bye.cpp
@@ -25,7 +25,7 @@ bool runBye(Function &F) {
}
struct LegacyBye : public FunctionPass {
- static char ID;
+ static const char ID;
LegacyBye() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override { return runBye(F); }
};
@@ -71,7 +71,7 @@ bool preCodeGenCallback(Module &M, TargetMachine &, CodeGenFileType CGFT,
} // namespace
-char LegacyBye::ID = 0;
+const char LegacyBye::ID = 0;
static RegisterPass<LegacyBye> X("goodbye", "Good Bye World Pass",
false /* Only looks at CFG */,
diff --git a/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp b/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp
index 84f17871c03e4..82d20346e3de1 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp
+++ b/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp
@@ -65,7 +65,7 @@ static cl::opt<std::string> IndexFile{cl::desc("<module summary index>"),
class DuplicateDefinitionInSummary
: public ErrorInfo<DuplicateDefinitionInSummary> {
public:
- static char ID;
+ static const char ID;
DuplicateDefinitionInSummary(std::string GlobalValueName, ValueInfo VI)
: GlobalValueName(std::move(GlobalValueName)) {
@@ -100,7 +100,7 @@ class DuplicateDefinitionInSummary
class DefinitionNotFoundInSummary
: public ErrorInfo<DefinitionNotFoundInSummary> {
public:
- static char ID;
+ static const char ID;
DefinitionNotFoundInSummary(std::string GlobalValueName,
ModuleSummaryIndex &Index)
@@ -129,8 +129,8 @@ class DefinitionNotFoundInSummary
std::vector<std::string> ModulePaths;
};
-char DuplicateDefinitionInSummary::ID = 0;
-char DefinitionNotFoundInSummary::ID = 0;
+const char DuplicateDefinitionInSummary::ID = 0;
+const char DefinitionNotFoundInSummary::ID = 0;
// Lookup the a function in the ModuleSummaryIndex and return the path of the
// module that defines it. Paths in the ModuleSummaryIndex are relative to the
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h
index 878b7e7a1fb3b..9f3dfe6c71c1d 100644
--- a/llvm/include/llvm/Analysis/AliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/AliasAnalysis.h
@@ -1023,7 +1023,7 @@ class LLVM_ABI AAResultsWrapperPass : public FunctionPass {
std::unique_ptr<AAResults> AAR;
public:
- static char ID;
+ static const char ID;
AAResultsWrapperPass();
@@ -1042,7 +1042,7 @@ struct ExternalAAWrapperPass : ImmutablePass {
CallbackT CB;
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
LLVM_ABI ExternalAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/AssumptionCache.h b/llvm/include/llvm/Analysis/AssumptionCache.h
index 5656729d20366..254e2b7dcf720 100644
--- a/llvm/include/llvm/Analysis/AssumptionCache.h
+++ b/llvm/include/llvm/Analysis/AssumptionCache.h
@@ -257,7 +257,7 @@ class LLVM_ABI AssumptionCacheTracker : public ImmutablePass {
return false;
}
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
};
template<> struct simplify_type<AssumptionCache::ResultElem> {
diff --git a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
index 31875e59207b3..fa97f9204e274 100644
--- a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
@@ -174,7 +174,7 @@ class LLVM_ABI BasicAAWrapperPass : public FunctionPass {
virtual void anchor();
public:
- static char ID;
+ static const char ID;
BasicAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h b/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
index 860ceb4e6cce6..c77babde9fcd7 100644
--- a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
+++ b/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
@@ -148,7 +148,7 @@ class LLVM_ABI BlockFrequencyInfoWrapperPass : public FunctionPass {
BlockFrequencyInfo BFI;
public:
- static char ID;
+ static const char ID;
BlockFrequencyInfoWrapperPass();
~BlockFrequencyInfoWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
index cf57f2c95b55b..8aee2b706a46a 100644
--- a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
+++ b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
@@ -456,7 +456,7 @@ class LLVM_ABI BranchProbabilityInfoWrapperPass : public FunctionPass {
BranchProbabilityInfo BPI;
public:
- static char ID;
+ static const char ID;
BranchProbabilityInfoWrapperPass();
diff --git a/llvm/include/llvm/Analysis/CallGraph.h b/llvm/include/llvm/Analysis/CallGraph.h
index 1dd37d47eea71..900bdfa239bd7 100644
--- a/llvm/include/llvm/Analysis/CallGraph.h
+++ b/llvm/include/llvm/Analysis/CallGraph.h
@@ -334,7 +334,7 @@ class LLVM_ABI CallGraphWrapperPass : public ModulePass {
std::unique_ptr<CallGraph> G;
public:
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
CallGraphWrapperPass();
~CallGraphWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/CallGraphSCCPass.h b/llvm/include/llvm/Analysis/CallGraphSCCPass.h
index 4ef38cbbcbd64..e5d778859c07e 100644
--- a/llvm/include/llvm/Analysis/CallGraphSCCPass.h
+++ b/llvm/include/llvm/Analysis/CallGraphSCCPass.h
@@ -34,7 +34,7 @@ class PMStack;
class LLVM_ABI CallGraphSCCPass : public Pass {
public:
- explicit CallGraphSCCPass(char &pid) : Pass(PT_CallGraphSCC, pid) {}
+ explicit CallGraphSCCPass(const char &pid) : Pass(PT_CallGraphSCC, pid) {}
/// createPrinterPass - Get a pass that prints the Module
/// corresponding to a CallGraph.
@@ -115,7 +115,7 @@ class CallGraphSCC {
/// codegen to follow bottom up order on call graph.
class DummyCGSCCPass : public CallGraphSCCPass {
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
DummyCGSCCPass() : CallGraphSCCPass(ID) {}
diff --git a/llvm/include/llvm/Analysis/CycleAnalysis.h b/llvm/include/llvm/Analysis/CycleAnalysis.h
index 40c42d5495f7c..f8ca0b7ce271f 100644
--- a/llvm/include/llvm/Analysis/CycleAnalysis.h
+++ b/llvm/include/llvm/Analysis/CycleAnalysis.h
@@ -27,7 +27,7 @@ class CycleInfoWrapperPass : public FunctionPass {
CycleInfo CI;
public:
- static char ID;
+ static const char ID;
CycleInfoWrapperPass();
diff --git a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
index 19a202f78c6ce..fef45ac4883af 100644
--- a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
+++ b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
@@ -180,7 +180,7 @@ template <typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *,
LegacyDefaultAnalysisGraphTraits<AnalysisT, GraphT>>
class DOTGraphTraitsViewerWrapperPass : public FunctionPass {
public:
- DOTGraphTraitsViewerWrapperPass(StringRef GraphName, char &ID)
+ DOTGraphTraitsViewerWrapperPass(StringRef GraphName, const char &ID)
: FunctionPass(ID), Name(GraphName) {}
/// Return true if this function should be processed.
@@ -219,7 +219,7 @@ template <typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *,
LegacyDefaultAnalysisGraphTraits<AnalysisT, GraphT>>
class DOTGraphTraitsPrinterWrapperPass : public FunctionPass {
public:
- DOTGraphTraitsPrinterWrapperPass(StringRef GraphName, char &ID)
+ DOTGraphTraitsPrinterWrapperPass(StringRef GraphName, const char &ID)
: FunctionPass(ID), Name(GraphName) {}
/// Return true if this function should be processed.
diff --git a/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h b/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
index a1b030c157eae..5db504ead6fdb 100644
--- a/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
+++ b/llvm/include/llvm/Analysis/DXILMetadataAnalysis.h
@@ -75,7 +75,7 @@ class DXILMetadataAnalysisWrapperPass : public ModulePass {
std::unique_ptr<dxil::ModuleMetadataInfo> MetadataInfo;
public:
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
DXILMetadataAnalysisWrapperPass();
~DXILMetadataAnalysisWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/DXILResource.h b/llvm/include/llvm/Analysis/DXILResource.h
index f38de81d76a2c..b72217a8f963d 100644
--- a/llvm/include/llvm/Analysis/DXILResource.h
+++ b/llvm/include/llvm/Analysis/DXILResource.h
@@ -484,7 +484,7 @@ class LLVM_ABI DXILResourceTypeWrapperPass : public ImmutablePass {
virtual void anchor();
public:
- static char ID;
+ static const char ID;
DXILResourceTypeWrapperPass();
DXILResourceTypeMap &getResourceTypeMap() { return DRTM; }
@@ -633,7 +633,7 @@ class LLVM_ABI DXILResourceWrapperPass : public ModulePass {
DXILResourceTypeMap *DRTM;
public:
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
DXILResourceWrapperPass();
~DXILResourceWrapperPass() override;
@@ -704,7 +704,7 @@ class LLVM_ABI DXILResourceBindingWrapperPass : public ModulePass {
std::unique_ptr<DXILResourceBindingInfo> BindingInfo;
public:
- static char ID;
+ static const char ID;
DXILResourceBindingWrapperPass();
~DXILResourceBindingWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/DependenceAnalysis.h b/llvm/include/llvm/Analysis/DependenceAnalysis.h
index 6963914d6a03d..23c0cb6525de1 100644
--- a/llvm/include/llvm/Analysis/DependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/DependenceAnalysis.h
@@ -801,7 +801,7 @@ struct DependenceAnalysisPrinterPass
/// Legacy pass manager pass to access dependence information
class LLVM_ABI DependenceAnalysisWrapperPass : public FunctionPass {
public:
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
DependenceAnalysisWrapperPass();
bool runOnFunction(Function &F) override;
diff --git a/llvm/include/llvm/Analysis/DominanceFrontier.h b/llvm/include/llvm/Analysis/DominanceFrontier.h
index ec49b36d64cfd..abbf878914f2d 100644
--- a/llvm/include/llvm/Analysis/DominanceFrontier.h
+++ b/llvm/include/llvm/Analysis/DominanceFrontier.h
@@ -137,7 +137,7 @@ class DominanceFrontierWrapperPass : public FunctionPass {
DominanceFrontier DF;
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
DominanceFrontierWrapperPass();
diff --git a/llvm/include/llvm/Analysis/GlobalsModRef.h b/llvm/include/llvm/Analysis/GlobalsModRef.h
index 10275ac0d784c..cd1d5d7e0e88a 100644
--- a/llvm/include/llvm/Analysis/GlobalsModRef.h
+++ b/llvm/include/llvm/Analysis/GlobalsModRef.h
@@ -147,7 +147,7 @@ class LLVM_ABI GlobalsAAWrapperPass : public ModulePass {
std::unique_ptr<GlobalsAAResult> Result;
public:
- static char ID;
+ static const char ID;
GlobalsAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
index 693777483ade2..0f1f1f65f831c 100644
--- a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
+++ b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
@@ -1161,7 +1161,7 @@ class LLVM_ABI IRSimilarityIdentifierWrapperPass : public ModulePass {
std::unique_ptr<IRSimilarity::IRSimilarityIdentifier> IRSI;
public:
- static char ID;
+ static const char ID;
IRSimilarityIdentifierWrapperPass();
IRSimilarity::IRSimilarityIdentifier &getIRSI() { return *IRSI; }
diff --git a/llvm/include/llvm/Analysis/IVUsers.h b/llvm/include/llvm/Analysis/IVUsers.h
index 2af3e389446c6..5c047282649c0 100644
--- a/llvm/include/llvm/Analysis/IVUsers.h
+++ b/llvm/include/llvm/Analysis/IVUsers.h
@@ -164,7 +164,7 @@ class IVUsersWrapperPass : public LoopPass {
std::unique_ptr<IVUsers> IU;
public:
- static char ID;
+ static const char ID;
IVUsersWrapperPass();
diff --git a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h b/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
index 0ce882fcd7a9d..4e5e52530d0e5 100644
--- a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
+++ b/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h
@@ -101,7 +101,7 @@ class LazyBlockFrequencyInfoPass : public FunctionPass {
LBFI;
public:
- static char ID;
+ static const char ID;
LazyBlockFrequencyInfoPass();
diff --git a/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h b/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
index fe1f7b25c0f15..0c2557edcb3db 100644
--- a/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
+++ b/llvm/include/llvm/Analysis/LazyBranchProbabilityInfo.h
@@ -83,7 +83,7 @@ class LazyBranchProbabilityInfoPass : public FunctionPass {
std::unique_ptr<LazyBranchProbabilityInfo> LBPI;
public:
- static char ID;
+ static const char ID;
LazyBranchProbabilityInfoPass();
diff --git a/llvm/include/llvm/Analysis/LazyValueInfo.h b/llvm/include/llvm/Analysis/LazyValueInfo.h
index 52c7f68361a5b..9b0d4a47e585b 100644
--- a/llvm/include/llvm/Analysis/LazyValueInfo.h
+++ b/llvm/include/llvm/Analysis/LazyValueInfo.h
@@ -164,7 +164,7 @@ class LazyValueInfoWrapperPass : public FunctionPass {
LazyValueInfoWrapperPass(const LazyValueInfoWrapperPass&) = delete;
void operator=(const LazyValueInfoWrapperPass&) = delete;
public:
- static char ID;
+ static const char ID;
LazyValueInfoWrapperPass();
~LazyValueInfoWrapperPass() override {
assert(!Info.PImpl && "releaseMemory not called");
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index 0ecb1141dc1be..a56219366d50e 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/include/llvm/Analysis/LoopInfo.h
@@ -597,7 +597,7 @@ class LLVM_ABI LoopInfoWrapperPass : public FunctionPass {
LoopInfo LI;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LoopInfoWrapperPass();
diff --git a/llvm/include/llvm/Analysis/LoopPass.h b/llvm/include/llvm/Analysis/LoopPass.h
index e0301fecff084..09a9da811f0d8 100644
--- a/llvm/include/llvm/Analysis/LoopPass.h
+++ b/llvm/include/llvm/Analysis/LoopPass.h
@@ -28,7 +28,7 @@ class Function;
class LLVM_ABI LoopPass : public Pass {
public:
- explicit LoopPass(char &pid) : Pass(PT_Loop, pid) {}
+ explicit LoopPass(const char &pid) : Pass(PT_Loop, pid) {}
/// getPrinterPass - Get a pass to print the function corresponding
/// to a Loop.
@@ -76,7 +76,7 @@ class LLVM_ABI LoopPass : public Pass {
class LLVM_ABI LPPassManager : public FunctionPass, public PMDataManager {
public:
- static char ID;
+ static const char ID;
explicit LPPassManager();
/// run - Execute all of the passes scheduled for execution. Keep track of
@@ -123,7 +123,7 @@ class LLVM_ABI LPPassManager : public FunctionPass, public PMDataManager {
// LPPassManager to check if current pass preserves LCSSA form, and if it does
// pass manager calls lcssa verification for the current loop.
struct LCSSAVerificationPass : public FunctionPass {
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
LLVM_ABI LCSSAVerificationPass();
bool runOnFunction(Function &F) override { return false; }
diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
index d6288f2aa061e..229633a175b11 100644
--- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -533,7 +533,7 @@ class MemoryDependenceWrapperPass : public FunctionPass {
std::optional<MemoryDependenceResults> MemDep;
public:
- static char ID;
+ static const char ID;
MemoryDependenceWrapperPass();
~MemoryDependenceWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/MemorySSA.h b/llvm/include/llvm/Analysis/MemorySSA.h
index ab44bc09d9550..46e73e89c6e86 100644
--- a/llvm/include/llvm/Analysis/MemorySSA.h
+++ b/llvm/include/llvm/Analysis/MemorySSA.h
@@ -994,7 +994,7 @@ class LLVM_ABI MemorySSAWrapperPass : public FunctionPass {
public:
MemorySSAWrapperPass();
- static char ID;
+ static const char ID;
bool runOnFunction(Function &) override;
void releaseMemory() override;
diff --git a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h b/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
index 7e78e9b9f2262..35bd1fb72e783 100644
--- a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
+++ b/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
@@ -59,7 +59,7 @@ class LLVM_ABI ModuleSummaryIndexWrapperPass : public ModulePass {
std::optional<ModuleSummaryIndex> Index;
public:
- static char ID;
+ static const char ID;
ModuleSummaryIndexWrapperPass();
@@ -84,7 +84,7 @@ class LLVM_ABI ImmutableModuleSummaryIndexWrapperPass : public ImmutablePass {
const ModuleSummaryIndex *Index;
public:
- static char ID;
+ static const char ID;
ImmutableModuleSummaryIndexWrapperPass(
const ModuleSummaryIndex *Index = nullptr);
diff --git a/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h b/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
index d8c0ebbe29242..ec3d578cb0db6 100644
--- a/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
+++ b/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
@@ -161,7 +161,7 @@ class LLVM_ABI OptimizationRemarkEmitterWrapperPass : public FunctionPass {
return *ORE;
}
- static char ID;
+ static const char ID;
};
class OptimizationRemarkEmitterAnalysis
diff --git a/llvm/include/llvm/Analysis/PhiValues.h b/llvm/include/llvm/Analysis/PhiValues.h
index fc51d7b095acc..b2d65683aa155 100644
--- a/llvm/include/llvm/Analysis/PhiValues.h
+++ b/llvm/include/llvm/Analysis/PhiValues.h
@@ -141,7 +141,7 @@ class LLVM_ABI PhiValuesWrapperPass : public FunctionPass {
std::unique_ptr<PhiValues> Result;
public:
- static char ID;
+ static const char ID;
PhiValuesWrapperPass();
PhiValues &getResult() { return *Result; }
diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h
index 79dc1409919e1..4f78fa7850571 100644
--- a/llvm/include/llvm/Analysis/PostDominators.h
+++ b/llvm/include/llvm/Analysis/PostDominators.h
@@ -74,7 +74,7 @@ class PostDominatorTreePrinterPass
};
struct LLVM_ABI PostDominatorTreeWrapperPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
PostDominatorTree DT;
diff --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
index ef6663efc9df8..65232a24480be 100644
--- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
+++ b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
@@ -359,7 +359,7 @@ class LLVM_ABI ProfileSummaryInfoWrapperPass : public ImmutablePass {
std::unique_ptr<ProfileSummaryInfo> PSI;
public:
- static char ID;
+ static const char ID;
ProfileSummaryInfoWrapperPass();
ProfileSummaryInfo &getPSI() { return *PSI; }
diff --git a/llvm/include/llvm/Analysis/RegionInfo.h b/llvm/include/llvm/Analysis/RegionInfo.h
index 474bd3a9483e7..69748a88d924d 100644
--- a/llvm/include/llvm/Analysis/RegionInfo.h
+++ b/llvm/include/llvm/Analysis/RegionInfo.h
@@ -941,7 +941,7 @@ class RegionInfoPass : public FunctionPass {
RegionInfo RI;
public:
- static char ID;
+ static const char ID;
explicit RegionInfoPass();
~RegionInfoPass() override;
diff --git a/llvm/include/llvm/Analysis/RegionPass.h b/llvm/include/llvm/Analysis/RegionPass.h
index 40809108b558f..1a05772705307 100644
--- a/llvm/include/llvm/Analysis/RegionPass.h
+++ b/llvm/include/llvm/Analysis/RegionPass.h
@@ -32,7 +32,7 @@ class RegionInfo;
/// RegionPass is managed by RGPassManager.
class LLVM_ABI RegionPass : public Pass {
public:
- explicit RegionPass(char &pid) : Pass(PT_Region, pid) {}
+ explicit RegionPass(const char &pid) : Pass(PT_Region, pid) {}
//===--------------------------------------------------------------------===//
/// @name To be implemented by every RegionPass
@@ -91,7 +91,7 @@ class LLVM_ABI RGPassManager : public FunctionPass, public PMDataManager {
Region *CurrentRegion;
public:
- static char ID;
+ static const char ID;
explicit RGPassManager();
/// Execute all of the passes scheduled for execution.
diff --git a/llvm/include/llvm/Analysis/RuntimeLibcallInfo.h b/llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
index 3054177bc6cce..2d5575e0e822f 100644
--- a/llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
+++ b/llvm/include/llvm/Analysis/RuntimeLibcallInfo.h
@@ -45,7 +45,7 @@ class LLVM_ABI RuntimeLibraryInfoWrapper : public ImmutablePass {
std::optional<RTLIB::RuntimeLibcallsInfo> RTLCI;
public:
- static char ID;
+ static const char ID;
RuntimeLibraryInfoWrapper();
RuntimeLibraryInfoWrapper(
const Triple &TT,
diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index 6aff53a1e7b70..2c5343616f023 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -2413,7 +2413,7 @@ class LLVM_ABI ScalarEvolutionWrapperPass : public FunctionPass {
std::unique_ptr<ScalarEvolution> SE;
public:
- static char ID;
+ static const char ID;
ScalarEvolutionWrapperPass();
diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h b/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
index 75d827768b8a7..a804b1599e4a0 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h
@@ -59,7 +59,7 @@ class LLVM_ABI SCEVAAWrapperPass : public FunctionPass {
std::unique_ptr<SCEVAAResult> Result;
public:
- static char ID;
+ static const char ID;
SCEVAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
index dbe1afa50ee3a..dc5207088c058 100644
--- a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
+++ b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
@@ -71,7 +71,7 @@ class LLVM_ABI ScopedNoAliasAAWrapperPass : public ImmutablePass {
std::unique_ptr<ScopedNoAliasAAResult> Result;
public:
- static char ID;
+ static const char ID;
ScopedNoAliasAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/StackSafetyAnalysis.h b/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
index b7b816fa4021e..631dfce31d513 100644
--- a/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
+++ b/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
@@ -113,7 +113,7 @@ class StackSafetyInfoWrapperPass : public FunctionPass {
StackSafetyInfo SSI;
public:
- static char ID;
+ static const char ID;
StackSafetyInfoWrapperPass();
const StackSafetyInfo &getResult() const { return SSI; }
@@ -153,7 +153,7 @@ class StackSafetyGlobalInfoWrapperPass : public ModulePass {
StackSafetyGlobalInfo SSGI;
public:
- static char ID;
+ static const char ID;
StackSafetyGlobalInfoWrapperPass();
~StackSafetyGlobalInfoWrapperPass() override;
diff --git a/llvm/include/llvm/Analysis/StaticDataProfileInfo.h b/llvm/include/llvm/Analysis/StaticDataProfileInfo.h
index ac03137c93610..22d0b1c2307cb 100644
--- a/llvm/include/llvm/Analysis/StaticDataProfileInfo.h
+++ b/llvm/include/llvm/Analysis/StaticDataProfileInfo.h
@@ -92,7 +92,7 @@ class StaticDataProfileInfo {
/// backend pass to operate on.
class LLVM_ABI StaticDataProfileInfoWrapperPass : public ImmutablePass {
public:
- static char ID;
+ static const char ID;
StaticDataProfileInfoWrapperPass();
bool doInitialization(Module &M) override;
bool doFinalization(Module &M) override;
diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
index a2986c7374665..d3beaa7634699 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
@@ -631,7 +631,7 @@ class LLVM_ABI TargetLibraryInfoWrapperPass : public ImmutablePass {
virtual void anchor();
public:
- static char ID;
+ static const char ID;
/// The default constructor should not be used and is only for pass manager
/// initialization purposes.
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index a013122df5f06..efb1e84801f65 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -2141,7 +2141,7 @@ class LLVM_ABI TargetTransformInfoWrapperPass : public ImmutablePass {
virtual void anchor();
public:
- static char ID;
+ static const char ID;
/// We must provide a default constructor for the pass but it should
/// never be used.
diff --git a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h b/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
index 38f9fc718824f..7232181eeacfe 100644
--- a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
@@ -88,7 +88,7 @@ class LLVM_ABI TypeBasedAAWrapperPass : public ImmutablePass {
std::unique_ptr<TypeBasedAAResult> Result;
public:
- static char ID;
+ static const char ID;
TypeBasedAAWrapperPass();
diff --git a/llvm/include/llvm/Analysis/UniformityAnalysis.h b/llvm/include/llvm/Analysis/UniformityAnalysis.h
index a067a9b42893c..d78853ad71b56 100644
--- a/llvm/include/llvm/Analysis/UniformityAnalysis.h
+++ b/llvm/include/llvm/Analysis/UniformityAnalysis.h
@@ -59,7 +59,7 @@ class UniformityInfoWrapperPass : public FunctionPass {
UniformityInfo m_uniformityInfo;
public:
- static char ID;
+ static const char ID;
UniformityInfoWrapperPass();
diff --git a/llvm/include/llvm/CAS/CASNodeSchema.h b/llvm/include/llvm/CAS/CASNodeSchema.h
index 4d75b80d7d136..611b2a5009323 100644
--- a/llvm/include/llvm/CAS/CASNodeSchema.h
+++ b/llvm/include/llvm/CAS/CASNodeSchema.h
@@ -22,7 +22,7 @@ class LLVM_ABI NodeSchema : public RTTIExtends<NodeSchema, RTTIRoot> {
void anchor() override;
public:
- static char ID;
+ static const char ID;
/// Check if \a Node is a root (entry node) for the schema. This is a strong
/// check, since it requires that the first reference matches a complete
diff --git a/llvm/include/llvm/CAS/NamedValuesSchema.h b/llvm/include/llvm/CAS/NamedValuesSchema.h
index cf9652a58a26b..83eb5886ef360 100644
--- a/llvm/include/llvm/CAS/NamedValuesSchema.h
+++ b/llvm/include/llvm/CAS/NamedValuesSchema.h
@@ -51,7 +51,7 @@ class LLVM_ABI NamedValuesSchema
void anchor() override;
public:
- static char ID;
+ static const char ID;
bool isRootNode(const ObjectProxy &Node) const final {
// NamedValuesSchema only has one node, thus root node.
diff --git a/llvm/include/llvm/CGData/CodeGenData.h b/llvm/include/llvm/CGData/CodeGenData.h
index e44497a408245..13a89ce091e60 100644
--- a/llvm/include/llvm/CGData/CodeGenData.h
+++ b/llvm/include/llvm/CGData/CodeGenData.h
@@ -96,7 +96,7 @@ class LLVM_ABI CGDataError : public ErrorInfo<CGDataError> {
return {Err, Msg};
}
- static char ID;
+ static const char ID;
private:
cgdata_error Err;
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index fa08bfa476fae..ba1eecc11ff62 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -214,7 +214,7 @@ class LLVM_ABI AsmPrinter : public MachineFunctionPass {
/// List of symbols to be inserted into PC sections.
DenseMap<const MDNode *, SmallVector<const MCSymbol *>> PCSectionsSymbols;
- static char ID;
+ static const char ID;
protected:
MCSymbol *CurrentFnBegin = nullptr;
@@ -267,7 +267,7 @@ class LLVM_ABI AsmPrinter : public MachineFunctionPass {
protected:
AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer,
- char &ID = AsmPrinter::ID);
+ const char &ID = AsmPrinter::ID);
/// Create the DwarfDebug handler. Targets can override this to provide
/// custom debug information handling.
diff --git a/llvm/include/llvm/CodeGen/AssignmentTrackingAnalysis.h b/llvm/include/llvm/CodeGen/AssignmentTrackingAnalysis.h
index fb0ecd828b68f..c8600d513b988 100644
--- a/llvm/include/llvm/CodeGen/AssignmentTrackingAnalysis.h
+++ b/llvm/include/llvm/CodeGen/AssignmentTrackingAnalysis.h
@@ -125,7 +125,7 @@ class AssignmentTrackingAnalysis : public FunctionPass {
std::unique_ptr<FunctionVarLocs> Results;
public:
- static char ID;
+ static const char ID;
AssignmentTrackingAnalysis();
diff --git a/llvm/include/llvm/CodeGen/BasicBlockMatchingAndInference.h b/llvm/include/llvm/CodeGen/BasicBlockMatchingAndInference.h
index 6e9bbb969a445..c49b71dea52e4 100644
--- a/llvm/include/llvm/CodeGen/BasicBlockMatchingAndInference.h
+++ b/llvm/include/llvm/CodeGen/BasicBlockMatchingAndInference.h
@@ -35,7 +35,7 @@ class BasicBlockMatchingAndInference : public MachineFunctionPass {
};
public:
- static char ID;
+ static const char ID;
BasicBlockMatchingAndInference();
StringRef getPassName() const override {
diff --git a/llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h b/llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
index b28a55e5be28c..2260b6b71df95 100644
--- a/llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
+++ b/llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h
@@ -219,7 +219,7 @@ class BasicBlockSectionsProfileReaderAnalysis
class BasicBlockSectionsProfileReaderWrapperPass : public ImmutablePass {
public:
- static char ID;
+ static const char ID;
BasicBlockSectionsProfileReader BBSPR;
BasicBlockSectionsProfileReaderWrapperPass(const MemoryBuffer *Buf)
diff --git a/llvm/include/llvm/CodeGen/CFIFixup.h b/llvm/include/llvm/CodeGen/CFIFixup.h
index d3e4131e3551d..1e1d175cb7ab8 100644
--- a/llvm/include/llvm/CodeGen/CFIFixup.h
+++ b/llvm/include/llvm/CodeGen/CFIFixup.h
@@ -20,7 +20,7 @@
namespace llvm {
class CFIFixup : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
CFIFixup() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/CodeGen/EdgeBundles.h b/llvm/include/llvm/CodeGen/EdgeBundles.h
index 6e0c301a651e3..f556972b9bccf 100644
--- a/llvm/include/llvm/CodeGen/EdgeBundles.h
+++ b/llvm/include/llvm/CodeGen/EdgeBundles.h
@@ -65,7 +65,7 @@ class EdgeBundles {
class EdgeBundlesWrapperLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
EdgeBundlesWrapperLegacy() : MachineFunctionPass(ID) {}
EdgeBundles &getEdgeBundles() { return *Impl; }
diff --git a/llvm/include/llvm/CodeGen/ExecutionDomainFix.h b/llvm/include/llvm/CodeGen/ExecutionDomainFix.h
index 81994d932cc8a..9b830f21adacc 100644
--- a/llvm/include/llvm/CodeGen/ExecutionDomainFix.h
+++ b/llvm/include/llvm/CodeGen/ExecutionDomainFix.h
@@ -136,7 +136,7 @@ class ExecutionDomainFix : public MachineFunctionPass {
ReachingDefInfo *RDI = nullptr;
public:
- ExecutionDomainFix(char &PassID, const TargetRegisterClass &RC)
+ ExecutionDomainFix(const char &PassID, const TargetRegisterClass &RC)
: MachineFunctionPass(PassID), RC(&RC), NumRegs(RC.getNumRegs()) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
diff --git a/llvm/include/llvm/CodeGen/GCMetadata.h b/llvm/include/llvm/CodeGen/GCMetadata.h
index 5b9ee2869aa1b..2069d25cee895 100644
--- a/llvm/include/llvm/CodeGen/GCMetadata.h
+++ b/llvm/include/llvm/CodeGen/GCMetadata.h
@@ -265,7 +265,7 @@ class GCModuleInfo : public ImmutablePass {
public:
using iterator = SmallVector<std::unique_ptr<GCStrategy>, 1>::const_iterator;
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
LLVM_ABI GCModuleInfo();
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
index 6701ae0510581..8c25f6d329e13 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h
@@ -230,7 +230,7 @@ class LLVM_ABI GISelCSEAnalysisWrapperPass : public MachineFunctionPass {
GISelCSEAnalysisWrapper Wrapper;
public:
- static char ID;
+ static const char ID;
GISelCSEAnalysisWrapperPass();
void getAnalysisUsage(AnalysisUsage &AU) const override;
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
index 2ce085b8da7b6..97d6adf802b56 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h
@@ -164,7 +164,7 @@ class LLVM_ABI GISelValueTrackingAnalysisLegacy : public MachineFunctionPass {
std::unique_ptr<GISelValueTracking> Info;
public:
- static char ID;
+ static const char ID;
GISelValueTrackingAnalysisLegacy() : MachineFunctionPass(ID) {}
GISelValueTracking &get(MachineFunction &MF);
void getAnalysisUsage(AnalysisUsage &AU) const override;
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
index 2f3f55a58a517..b5dc1f854a7e0 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
@@ -65,7 +65,7 @@ class Value;
// by the LLVM IR as soon as the translation is over.
class IRTranslator : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
private:
/// Interface used to lower the everything related to calls.
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h b/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h
index 066a8ae487564..90942a46ee53d 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelect.h
@@ -35,7 +35,7 @@ class ProfileSummaryInfo;
/// \post for all inst in MF: not isPreISelGenericOpcode(inst.opcode)
class LLVM_ABI InstructionSelect : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
StringRef getPassName() const override { return "InstructionSelect"; }
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -52,7 +52,7 @@ class LLVM_ABI InstructionSelect : public MachineFunctionPass {
}
InstructionSelect(CodeGenOptLevel OL = CodeGenOptLevel::Default,
- char &PassID = ID);
+ const char &PassID = ID);
bool runOnMachineFunction(MachineFunction &MF) override;
bool selectMachineFunction(MachineFunction &MF);
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h b/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
index f8e629bc50a90..117e23ef6b93c 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
@@ -38,7 +38,7 @@ class LostDebugLocObserver;
class LLVM_ABI Legalizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
struct MFResult {
bool Changed;
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h b/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
index 4b7506e013762..c31a3257ee156 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
@@ -77,7 +77,7 @@ using namespace GISelAddressing;
class LLVM_ABI LoadStoreOpt : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
private:
/// An input function to decide if the pass should run or not
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h b/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
index 4c25c9c2a8345..dbb1ee2680137 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h
@@ -42,7 +42,7 @@ class TargetTransformInfo;
/// related predecessor.
class Localizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
private:
/// An input function to decide if the pass should run or not
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h b/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h
index 6060bb6144c62..654165e259c88 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h
@@ -90,7 +90,7 @@ class TargetRegisterInfo;
/// pipeline. At the end of this pass, all register operands have been assigned
class RegBankSelect : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
/// List of the modes supported by the RegBankSelect pass.
enum Mode {
diff --git a/llvm/include/llvm/CodeGen/IndirectThunks.h b/llvm/include/llvm/CodeGen/IndirectThunks.h
index c54df87aa8228..add0b028accb1 100644
--- a/llvm/include/llvm/CodeGen/IndirectThunks.h
+++ b/llvm/include/llvm/CodeGen/IndirectThunks.h
@@ -190,7 +190,7 @@ class ThunkInserterPass : public MachineFunctionPass {
protected:
std::tuple<Inserters...> TIs;
- ThunkInserterPass(char &ID) : MachineFunctionPass(ID) {}
+ ThunkInserterPass(const char &ID) : MachineFunctionPass(ID) {}
public:
bool doInitialization(Module &M) override {
diff --git a/llvm/include/llvm/CodeGen/LazyMachineBlockFrequencyInfo.h b/llvm/include/llvm/CodeGen/LazyMachineBlockFrequencyInfo.h
index f7e5b0e4f9d2b..2005b7b3469d5 100644
--- a/llvm/include/llvm/CodeGen/LazyMachineBlockFrequencyInfo.h
+++ b/llvm/include/llvm/CodeGen/LazyMachineBlockFrequencyInfo.h
@@ -53,7 +53,7 @@ class LazyMachineBlockFrequencyInfoPass : public MachineFunctionPass {
MachineBlockFrequencyInfo &calculateIfNotAvailable() const;
public:
- static char ID;
+ static const char ID;
LazyMachineBlockFrequencyInfoPass();
diff --git a/llvm/include/llvm/CodeGen/LibcallLoweringInfo.h b/llvm/include/llvm/CodeGen/LibcallLoweringInfo.h
index c0d72ea4d4d38..69a75988aeed2 100644
--- a/llvm/include/llvm/CodeGen/LibcallLoweringInfo.h
+++ b/llvm/include/llvm/CodeGen/LibcallLoweringInfo.h
@@ -128,7 +128,7 @@ class LLVM_ABI LibcallLoweringInfoWrapper : public ImmutablePass {
RuntimeLibraryInfoWrapper *RuntimeLibcallsWrapper = nullptr;
public:
- static char ID;
+ static const char ID;
LibcallLoweringInfoWrapper();
const LibcallLoweringInfo &
diff --git a/llvm/include/llvm/CodeGen/LiveDebugVariables.h b/llvm/include/llvm/CodeGen/LiveDebugVariables.h
index 9d737a8f66c92..aef22d5edcd4a 100644
--- a/llvm/include/llvm/CodeGen/LiveDebugVariables.h
+++ b/llvm/include/llvm/CodeGen/LiveDebugVariables.h
@@ -72,7 +72,7 @@ class LiveDebugVariablesWrapperLegacy : public MachineFunctionPass {
std::unique_ptr<LiveDebugVariables> Impl;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LiveDebugVariablesWrapperLegacy();
diff --git a/llvm/include/llvm/CodeGen/LiveIntervals.h b/llvm/include/llvm/CodeGen/LiveIntervals.h
index b618e0b778ae8..a0a9e46a179d8 100644
--- a/llvm/include/llvm/CodeGen/LiveIntervals.h
+++ b/llvm/include/llvm/CodeGen/LiveIntervals.h
@@ -536,7 +536,7 @@ class LLVM_ABI LiveIntervalsWrapperPass : public MachineFunctionPass {
LiveIntervals LIS;
public:
- static char ID;
+ static const char ID;
LiveIntervalsWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/LiveRegMatrix.h b/llvm/include/llvm/CodeGen/LiveRegMatrix.h
index 10ba09f033949..e46f906e6fa67 100644
--- a/llvm/include/llvm/CodeGen/LiveRegMatrix.h
+++ b/llvm/include/llvm/CodeGen/LiveRegMatrix.h
@@ -189,7 +189,7 @@ class LiveRegMatrixWrapperLegacy : public MachineFunctionPass {
LiveRegMatrix LRM;
public:
- static char ID;
+ static const char ID;
LiveRegMatrixWrapperLegacy() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/CodeGen/LiveStacks.h b/llvm/include/llvm/CodeGen/LiveStacks.h
index 04ff4584182b8..17c8e5f2a038f 100644
--- a/llvm/include/llvm/CodeGen/LiveStacks.h
+++ b/llvm/include/llvm/CodeGen/LiveStacks.h
@@ -97,7 +97,7 @@ class LiveStacksWrapperLegacy : public MachineFunctionPass {
LiveStacks Impl;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LiveStacksWrapperLegacy() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/CodeGen/LiveVariables.h b/llvm/include/llvm/CodeGen/LiveVariables.h
index f51834f44baad..e641056583a77 100644
--- a/llvm/include/llvm/CodeGen/LiveVariables.h
+++ b/llvm/include/llvm/CodeGen/LiveVariables.h
@@ -324,7 +324,7 @@ class LLVM_ABI LiveVariablesWrapperPass : public MachineFunctionPass {
LiveVariables LV;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LiveVariablesWrapperPass() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/CodeGen/MIR2Vec.h b/llvm/include/llvm/CodeGen/MIR2Vec.h
index 9e59b0d3da4f4..8561cc1e7e1d9 100644
--- a/llvm/include/llvm/CodeGen/MIR2Vec.h
+++ b/llvm/include/llvm/CodeGen/MIR2Vec.h
@@ -396,7 +396,7 @@ class MIR2VecVocabLegacyAnalysis : public ImmutablePass {
std::unique_ptr<MIR2VecVocabProvider> Provider;
public:
- static char ID;
+ static const char ID;
MIR2VecVocabLegacyAnalysis() : ImmutablePass(ID) {}
Expected<mir2vec::MIRVocabulary> getMIR2VecVocabulary(const Module &M) {
@@ -418,7 +418,7 @@ class MIR2VecVocabPrinterLegacyPass : public MachineFunctionPass {
raw_ostream &OS;
public:
- static char ID;
+ static const char ID;
explicit MIR2VecVocabPrinterLegacyPass(raw_ostream &OS)
: MachineFunctionPass(ID), OS(OS) {}
@@ -441,7 +441,7 @@ class MIR2VecPrinterLegacyPass : public MachineFunctionPass {
raw_ostream &OS;
public:
- static char ID;
+ static const char ID;
explicit MIR2VecPrinterLegacyPass(raw_ostream &OS)
: MachineFunctionPass(ID), OS(OS) {}
diff --git a/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h b/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
index da943268dac87..cda05407ef19c 100644
--- a/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
+++ b/llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
@@ -36,7 +36,7 @@ class MIRAddFSDiscriminators : public MachineFunctionPass {
unsigned HighBit;
public:
- static char ID;
+ static const char ID;
/// PassNum is the sequence number this pass is called, start from 1.
MIRAddFSDiscriminators(FSDiscriminatorPass P = FSDiscriminatorPass::Pass1)
: MachineFunctionPass(ID), Pass(P) {
diff --git a/llvm/include/llvm/CodeGen/MIRSampleProfile.h b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
index 221e966e2b9e0..93d060197453a 100644
--- a/llvm/include/llvm/CodeGen/MIRSampleProfile.h
+++ b/llvm/include/llvm/CodeGen/MIRSampleProfile.h
@@ -42,7 +42,7 @@ class MIRProfileLoaderPass : public MachineFunctionPass {
unsigned HighBit;
public:
- static char ID;
+ static const char ID;
/// FS bits will only use the '1' bits in the Mask.
MIRProfileLoaderPass(std::string FileName = "",
std::string RemappingFileName = "",
diff --git a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
index 794075201d646..bb5ecb902efce 100644
--- a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
@@ -142,7 +142,7 @@ class LLVM_ABI MachineBlockFrequencyInfoWrapperPass
MachineBlockFrequencyInfo MBFI;
public:
- static char ID;
+ static const char ID;
MachineBlockFrequencyInfoWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineBlockHashInfo.h b/llvm/include/llvm/CodeGen/MachineBlockHashInfo.h
index 6f26819d566ae..4aad3ef689b67 100644
--- a/llvm/include/llvm/CodeGen/MachineBlockHashInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineBlockHashInfo.h
@@ -99,7 +99,7 @@ class MachineBlockHashInfo : public MachineFunctionPass {
DenseMap<const MachineBasicBlock *, uint64_t> MBBHashInfo;
public:
- static char ID;
+ static const char ID;
MachineBlockHashInfo();
StringRef getPassName() const override { return "Basic Block Hash Compute"; }
diff --git a/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h b/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
index 12d33f96edd11..f82206d985beb 100644
--- a/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
@@ -83,7 +83,7 @@ class MachineBranchProbabilityInfoWrapperPass : public ImmutablePass {
MachineBranchProbabilityInfo MBPI;
public:
- static char ID;
+ static const char ID;
MachineBranchProbabilityInfoWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h b/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
index 622f529939bcb..c5536b09348df 100644
--- a/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
+++ b/llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
@@ -31,7 +31,7 @@ class LLVM_ABI MachineCycleInfoWrapperPass : public MachineFunctionPass {
MachineCycleInfo CI;
public:
- static char ID;
+ static const char ID;
MachineCycleInfoWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h b/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
index bbbd1a546a573..8a85924b9d2bd 100644
--- a/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
+++ b/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
@@ -47,7 +47,7 @@ class MachineDominanceFrontierWrapperPass : public MachineFunctionPass {
MachineDominanceFrontierWrapperPass &
operator=(const MachineDominanceFrontierWrapperPass &) = delete;
- static char ID;
+ static const char ID;
bool runOnMachineFunction(MachineFunction &F) override;
diff --git a/llvm/include/llvm/CodeGen/MachineDominators.h b/llvm/include/llvm/CodeGen/MachineDominators.h
index faea0b7de525f..5b8c36c28633c 100644
--- a/llvm/include/llvm/CodeGen/MachineDominators.h
+++ b/llvm/include/llvm/CodeGen/MachineDominators.h
@@ -129,7 +129,7 @@ class LLVM_ABI MachineDominatorTreeWrapperPass : public MachineFunctionPass {
std::optional<MachineDominatorTree> DT;
public:
- static char ID;
+ static const char ID;
MachineDominatorTreeWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineFunctionPass.h b/llvm/include/llvm/CodeGen/MachineFunctionPass.h
index 9d7afef5b79af..75102745e4db4 100644
--- a/llvm/include/llvm/CodeGen/MachineFunctionPass.h
+++ b/llvm/include/llvm/CodeGen/MachineFunctionPass.h
@@ -39,7 +39,7 @@ class LLVM_ABI MachineFunctionPass : public FunctionPass {
return false;
}
protected:
- explicit MachineFunctionPass(char &ID) : FunctionPass(ID) {}
+ explicit MachineFunctionPass(const char &ID) : FunctionPass(ID) {}
/// runOnMachineFunction - This method must be overloaded to perform the
/// desired machine code transformation or analysis.
diff --git a/llvm/include/llvm/CodeGen/MachineLoopInfo.h b/llvm/include/llvm/CodeGen/MachineLoopInfo.h
index bcec6df39e73c..74bb0713e8570 100644
--- a/llvm/include/llvm/CodeGen/MachineLoopInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineLoopInfo.h
@@ -162,7 +162,7 @@ class LLVM_ABI MachineLoopInfoWrapperPass : public MachineFunctionPass {
MachineLoopInfo LI;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
MachineLoopInfoWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
index 6c5ed5622a321..0121abb7a50a5 100644
--- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
@@ -174,7 +174,7 @@ class LLVM_ABI MachineModuleInfoWrapperPass : public ImmutablePass {
MachineModuleInfo MMI;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit MachineModuleInfoWrapperPass(const TargetMachine *TM = nullptr);
explicit MachineModuleInfoWrapperPass(const TargetMachine *TM,
diff --git a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
index 0b6e9c6f15391..f43ec2490befd 100644
--- a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
+++ b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
@@ -254,7 +254,7 @@ class LLVM_ABI MachineOptimizationRemarkEmitterPass
return *ORE;
}
- static char ID;
+ static const char ID;
};
}
diff --git a/llvm/include/llvm/CodeGen/MachinePipeliner.h b/llvm/include/llvm/CodeGen/MachinePipeliner.h
index cf7901ad697de..667a7aa1d51ab 100644
--- a/llvm/include/llvm/CodeGen/MachinePipeliner.h
+++ b/llvm/include/llvm/CodeGen/MachinePipeliner.h
@@ -93,7 +93,7 @@ class MachinePipeliner : public MachineFunctionPass {
};
LoopInfo LI;
- static char ID;
+ static const char ID;
MachinePipeliner() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/CodeGen/MachinePostDominators.h b/llvm/include/llvm/CodeGen/MachinePostDominators.h
index 8b7c9690d6c8d..d8ad5c0f47dea 100644
--- a/llvm/include/llvm/CodeGen/MachinePostDominators.h
+++ b/llvm/include/llvm/CodeGen/MachinePostDominators.h
@@ -96,7 +96,7 @@ class LLVM_ABI MachinePostDominatorTreeWrapperPass
std::optional<MachinePostDominatorTree> PDT;
public:
- static char ID;
+ static const char ID;
MachinePostDominatorTreeWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineRegionInfo.h b/llvm/include/llvm/CodeGen/MachineRegionInfo.h
index eeb69fef2c6b9..85099437712a4 100644
--- a/llvm/include/llvm/CodeGen/MachineRegionInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineRegionInfo.h
@@ -86,7 +86,7 @@ class MachineRegionInfoPass : public MachineFunctionPass {
MachineRegionInfo RI;
public:
- static char ID;
+ static const char ID;
explicit MachineRegionInfoPass();
~MachineRegionInfoPass() override;
diff --git a/llvm/include/llvm/CodeGen/MachineTraceMetrics.h b/llvm/include/llvm/CodeGen/MachineTraceMetrics.h
index b29984cd95a4b..5b9009d627b47 100644
--- a/llvm/include/llvm/CodeGen/MachineTraceMetrics.h
+++ b/llvm/include/llvm/CodeGen/MachineTraceMetrics.h
@@ -470,7 +470,7 @@ struct MachineTraceMetricsVerifierPass
class MachineTraceMetricsWrapperPass : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineTraceMetrics MTM;
MachineTraceMetricsWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/MachineUniformityAnalysis.h b/llvm/include/llvm/CodeGen/MachineUniformityAnalysis.h
index e8c0dc9b43823..04658a44976f0 100644
--- a/llvm/include/llvm/CodeGen/MachineUniformityAnalysis.h
+++ b/llvm/include/llvm/CodeGen/MachineUniformityAnalysis.h
@@ -38,7 +38,7 @@ class MachineUniformityAnalysisPass : public MachineFunctionPass {
MachineUniformityInfo UI;
public:
- static char ID;
+ static const char ID;
MachineUniformityAnalysisPass();
diff --git a/llvm/include/llvm/CodeGen/Passes.h b/llvm/include/llvm/CodeGen/Passes.h
index 2717110e1b3e7..9afa7351d1946 100644
--- a/llvm/include/llvm/CodeGen/Passes.h
+++ b/llvm/include/llvm/CodeGen/Passes.h
@@ -132,103 +132,103 @@ LLVM_ABI FunctionPass *createComplexDeinterleavingPass(const TargetMachine *TM);
/// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg
/// load-linked/store-conditional loops.
-LLVM_ABI extern char &AtomicExpandID;
+LLVM_ABI extern const char &AtomicExpandID;
/// MachineLoopInfo - This pass is a loop analysis pass.
-LLVM_ABI extern char &MachineLoopInfoID;
+LLVM_ABI extern const char &MachineLoopInfoID;
/// MachineDominators - This pass is a machine dominators analysis pass.
-LLVM_ABI extern char &MachineDominatorsID;
+LLVM_ABI extern const char &MachineDominatorsID;
/// MachineDominanaceFrontier - This pass is a machine dominators analysis.
-LLVM_ABI extern char &MachineDominanceFrontierID;
+LLVM_ABI extern const char &MachineDominanceFrontierID;
/// MachineRegionInfo - This pass computes SESE regions for machine functions.
-LLVM_ABI extern char &MachineRegionInfoPassID;
+LLVM_ABI extern const char &MachineRegionInfoPassID;
/// EdgeBundles analysis - Bundle machine CFG edges.
-LLVM_ABI extern char &EdgeBundlesWrapperLegacyID;
+LLVM_ABI extern const char &EdgeBundlesWrapperLegacyID;
/// LiveVariables pass - This pass computes the set of blocks in which each
/// variable is life and sets machine operand kill flags.
-LLVM_ABI extern char &LiveVariablesID;
+LLVM_ABI extern const char &LiveVariablesID;
/// PHIElimination - This pass eliminates machine instruction PHI nodes
/// by inserting copy instructions. This destroys SSA information, but is the
/// desired input for some register allocators. This pass is "required" by
/// these register allocator like this: AU.addRequiredID(PHIEliminationID);
-LLVM_ABI extern char &PHIEliminationID;
+LLVM_ABI extern const char &PHIEliminationID;
/// LiveIntervals - This analysis keeps track of the live ranges of virtual
/// and physical registers.
-LLVM_ABI extern char &LiveIntervalsID;
+LLVM_ABI extern const char &LiveIntervalsID;
/// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
-LLVM_ABI extern char &LiveStacksID;
+LLVM_ABI extern const char &LiveStacksID;
/// TwoAddressInstruction - This pass reduces two-address instructions to
/// use two operands. This destroys SSA information but it is desired by
/// register allocators.
-LLVM_ABI extern char &TwoAddressInstructionPassID;
+LLVM_ABI extern const char &TwoAddressInstructionPassID;
/// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.
-LLVM_ABI extern char &ProcessImplicitDefsID;
+LLVM_ABI extern const char &ProcessImplicitDefsID;
/// RegisterCoalescer - This pass merges live ranges to eliminate copies.
-LLVM_ABI extern char &RegisterCoalescerID;
+LLVM_ABI extern const char &RegisterCoalescerID;
/// MachineScheduler - This pass schedules machine instructions.
-LLVM_ABI extern char &MachineSchedulerID;
+LLVM_ABI extern const char &MachineSchedulerID;
/// PostMachineScheduler - This pass schedules machine instructions postRA.
-LLVM_ABI extern char &PostMachineSchedulerID;
+LLVM_ABI extern const char &PostMachineSchedulerID;
/// SpillPlacement analysis. Suggest optimal placement of spill code between
/// basic blocks.
-LLVM_ABI extern char &SpillPlacementID;
+LLVM_ABI extern const char &SpillPlacementID;
/// ShrinkWrap pass. Look for the best place to insert save and restore
// instruction and update the MachineFunctionInfo with that information.
-LLVM_ABI extern char &ShrinkWrapID;
+LLVM_ABI extern const char &ShrinkWrapID;
/// LiveRangeShrink pass. Move instruction close to its definition to shrink
/// the definition's live range.
-LLVM_ABI extern char &LiveRangeShrinkID;
+LLVM_ABI extern const char &LiveRangeShrinkID;
/// Greedy register allocator.
-LLVM_ABI extern char &RAGreedyLegacyID;
+LLVM_ABI extern const char &RAGreedyLegacyID;
/// Basic register allocator.
-LLVM_ABI extern char &RABasicID;
+LLVM_ABI extern const char &RABasicID;
/// VirtRegRewriter pass. Rewrite virtual registers to physical registers as
/// assigned in VirtRegMap.
-LLVM_ABI extern char &VirtRegRewriterID;
+LLVM_ABI extern const char &VirtRegRewriterID;
LLVM_ABI FunctionPass *createVirtRegRewriter(bool ClearVirtRegs = true);
/// UnreachableMachineBlockElimination - This pass removes unreachable
/// machine basic blocks.
-LLVM_ABI extern char &UnreachableMachineBlockElimID;
+LLVM_ABI extern const char &UnreachableMachineBlockElimID;
/// DeadMachineInstructionElim - This pass removes dead machine instructions.
-LLVM_ABI extern char &DeadMachineInstructionElimID;
+LLVM_ABI extern const char &DeadMachineInstructionElimID;
/// This pass adds dead/undef flags after analyzing subregister lanes.
-LLVM_ABI extern char &DetectDeadLanesID;
+LLVM_ABI extern const char &DetectDeadLanesID;
/// This pass perform post-ra machine sink for COPY instructions.
-LLVM_ABI extern char &PostRAMachineSinkingID;
+LLVM_ABI extern const char &PostRAMachineSinkingID;
/// This pass adds flow sensitive discriminators.
-LLVM_ABI extern char &MIRAddFSDiscriminatorsID;
+LLVM_ABI extern const char &MIRAddFSDiscriminatorsID;
/// This pass reads flow sensitive profile.
-LLVM_ABI extern char &MIRProfileLoaderPassID;
+LLVM_ABI extern const char &MIRProfileLoaderPassID;
// This pass gives undef values a Pseudo Instruction definition for
// Instructions to ensure early-clobber is followed when using the greedy
// register allocator.
-LLVM_ABI extern char &InitUndefID;
+LLVM_ABI extern const char &InitUndefID;
/// FastRegisterAllocation Pass - This pass register allocates as fast as
/// possible. It is best suited for debug code where live ranges are short.
@@ -256,84 +256,84 @@ LLVM_ABI FunctionPass *createDefaultPBQPRegisterAllocator();
/// PrologEpilogCodeInserter - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
-LLVM_ABI extern char &PrologEpilogCodeInserterID;
+LLVM_ABI extern const char &PrologEpilogCodeInserterID;
LLVM_ABI MachineFunctionPass *createPrologEpilogInserterPass();
/// ExpandPostRAPseudos - This pass expands pseudo instructions after
/// register allocation.
-LLVM_ABI extern char &ExpandPostRAPseudosID;
+LLVM_ABI extern const char &ExpandPostRAPseudosID;
/// PostRAHazardRecognizer - This pass runs the post-ra hazard
/// recognizer.
-LLVM_ABI extern char &PostRAHazardRecognizerID;
+LLVM_ABI extern const char &PostRAHazardRecognizerID;
/// PostRAScheduler - This pass performs post register allocation
/// scheduling.
-LLVM_ABI extern char &PostRASchedulerID;
+LLVM_ABI extern const char &PostRASchedulerID;
/// BranchFolding - This pass performs machine code CFG based
/// optimizations to delete branches to branches, eliminate branches to
/// successor blocks (creating fall throughs), and eliminating branches over
/// branches.
-LLVM_ABI extern char &BranchFolderPassID;
+LLVM_ABI extern const char &BranchFolderPassID;
/// BranchRelaxation - This pass replaces branches that need to jump further
/// than is supported by a branch instruction.
-LLVM_ABI extern char &BranchRelaxationPassID;
+LLVM_ABI extern const char &BranchRelaxationPassID;
/// MachineFunctionPrinterPass - This pass prints out MachineInstr's.
-LLVM_ABI extern char &MachineFunctionPrinterPassID;
+LLVM_ABI extern const char &MachineFunctionPrinterPassID;
/// MIRPrintingPass - this pass prints out the LLVM IR using the MIR
/// serialization format.
-LLVM_ABI extern char &MIRPrintingPassID;
+LLVM_ABI extern const char &MIRPrintingPassID;
/// TailDuplicate - Duplicate blocks with unconditional branches
/// into tails of their predecessors.
-LLVM_ABI extern char &TailDuplicateLegacyID;
+LLVM_ABI extern const char &TailDuplicateLegacyID;
/// Duplicate blocks with unconditional branches into tails of their
/// predecessors. Variant that works before register allocation.
-LLVM_ABI extern char &EarlyTailDuplicateLegacyID;
+LLVM_ABI extern const char &EarlyTailDuplicateLegacyID;
/// MachineTraceMetrics - This pass computes critical path and CPU resource
/// usage in an ensemble of traces.
-LLVM_ABI extern char &MachineTraceMetricsID;
+LLVM_ABI extern const char &MachineTraceMetricsID;
/// EarlyIfConverter - This pass performs if-conversion on SSA form by
/// inserting cmov instructions.
-LLVM_ABI extern char &EarlyIfConverterLegacyID;
+LLVM_ABI extern const char &EarlyIfConverterLegacyID;
/// EarlyIfPredicator - This pass performs if-conversion on SSA form by
/// predicating if/else block and insert select at the join point.
-LLVM_ABI extern char &EarlyIfPredicatorID;
+LLVM_ABI extern const char &EarlyIfPredicatorID;
/// This pass performs instruction combining using trace metrics to estimate
/// critical-path and resource depth.
-LLVM_ABI extern char &MachineCombinerID;
+LLVM_ABI extern const char &MachineCombinerID;
/// StackSlotColoring - This pass performs stack coloring and merging.
/// It merges disjoint allocas to reduce the stack size.
-LLVM_ABI extern char &StackColoringLegacyID;
+LLVM_ABI extern const char &StackColoringLegacyID;
/// StackFramePrinter - This pass prints the stack frame layout and variable
/// mappings.
-LLVM_ABI extern char &StackFrameLayoutAnalysisPassID;
+LLVM_ABI extern const char &StackFrameLayoutAnalysisPassID;
/// IfConverter - This pass performs machine code if conversion.
-LLVM_ABI extern char &IfConverterID;
+LLVM_ABI extern const char &IfConverterID;
LLVM_ABI FunctionPass *
createIfConverter(std::function<bool(const MachineFunction &)> Ftor);
/// MachineBlockPlacement - This pass places basic blocks based on branch
/// probabilities.
-LLVM_ABI extern char &MachineBlockPlacementID;
+LLVM_ABI extern const char &MachineBlockPlacementID;
/// MachineBlockPlacementStats - This pass collects statistics about the
/// basic block placement using branch probabilities and block frequency
/// information.
-LLVM_ABI extern char &MachineBlockPlacementStatsID;
+LLVM_ABI extern const char &MachineBlockPlacementStatsID;
/// GCLowering Pass - Used by gc.root to perform its default lowering
/// operations.
@@ -341,7 +341,7 @@ LLVM_ABI FunctionPass *createGCLoweringPass();
/// GCLowering Pass - Used by gc.root to perform its default lowering
/// operations.
-LLVM_ABI extern char &GCLoweringID;
+LLVM_ABI extern const char &GCLoweringID;
/// ShadowStackGCLowering - Implements the custom lowering mechanism
/// used by the shadow stack GC. Only runs on functions which opt in to
@@ -350,70 +350,70 @@ LLVM_ABI FunctionPass *createShadowStackGCLoweringPass();
/// ShadowStackGCLowering - Implements the custom lowering mechanism
/// used by the shadow stack GC.
-LLVM_ABI extern char &ShadowStackGCLoweringID;
+LLVM_ABI extern const char &ShadowStackGCLoweringID;
/// GCMachineCodeAnalysis - Target-independent pass to mark safe points
/// in machine code. Must be added very late during code generation, just
/// prior to output, and importantly after all CFG transformations (such as
/// branch folding).
-LLVM_ABI extern char &GCMachineCodeAnalysisID;
+LLVM_ABI extern const char &GCMachineCodeAnalysisID;
/// MachineCSE - This pass performs global CSE on machine instructions.
-LLVM_ABI extern char &MachineCSELegacyID;
+LLVM_ABI extern const char &MachineCSELegacyID;
/// MIRCanonicalizer - This pass canonicalizes MIR by renaming vregs
/// according to the semantics of the instruction as well as hoists
/// code.
-LLVM_ABI extern char &MIRCanonicalizerID;
+LLVM_ABI extern const char &MIRCanonicalizerID;
/// ImplicitNullChecks - This pass folds null pointer checks into nearby
/// memory operations.
-LLVM_ABI extern char &ImplicitNullChecksID;
+LLVM_ABI extern const char &ImplicitNullChecksID;
/// This pass performs loop invariant code motion on machine instructions.
-LLVM_ABI extern char &MachineLICMID;
+LLVM_ABI extern const char &MachineLICMID;
/// This pass performs loop invariant code motion on machine instructions.
/// This variant works before register allocation. \see MachineLICMID.
-LLVM_ABI extern char &EarlyMachineLICMID;
+LLVM_ABI extern const char &EarlyMachineLICMID;
/// MachineSinking - This pass performs sinking on machine instructions.
-LLVM_ABI extern char &MachineSinkingLegacyID;
+LLVM_ABI extern const char &MachineSinkingLegacyID;
/// MachineCopyPropagation - This pass performs copy propagation on
/// machine instructions.
-LLVM_ABI extern char &MachineCopyPropagationID;
+LLVM_ABI extern const char &MachineCopyPropagationID;
LLVM_ABI MachineFunctionPass *
createMachineCopyPropagationPass(bool UseCopyInstr);
/// MachineLateInstrsCleanup - This pass removes redundant identical
/// instructions after register allocation and rematerialization.
-LLVM_ABI extern char &MachineLateInstrsCleanupID;
+LLVM_ABI extern const char &MachineLateInstrsCleanupID;
/// PeepholeOptimizer - This pass performs peephole optimizations -
/// like extension and comparison eliminations.
-LLVM_ABI extern char &PeepholeOptimizerLegacyID;
+LLVM_ABI extern const char &PeepholeOptimizerLegacyID;
/// OptimizePHIs - This pass optimizes machine instruction PHIs
/// to take advantage of opportunities created during DAG legalization.
-LLVM_ABI extern char &OptimizePHIsLegacyID;
+LLVM_ABI extern const char &OptimizePHIsLegacyID;
/// StackSlotColoring - This pass performs stack slot coloring.
-LLVM_ABI extern char &StackSlotColoringID;
+LLVM_ABI extern const char &StackSlotColoringID;
/// This pass lays out funclets contiguously.
-LLVM_ABI extern char &FuncletLayoutID;
+LLVM_ABI extern const char &FuncletLayoutID;
/// This pass inserts the XRay instrumentation sleds if they are supported by
/// the target platform.
-LLVM_ABI extern char &XRayInstrumentationID;
+LLVM_ABI extern const char &XRayInstrumentationID;
/// This pass inserts FEntry calls
-LLVM_ABI extern char &FEntryInserterID;
+LLVM_ABI extern const char &FEntryInserterID;
/// This pass implements the "patchable-function" attribute.
-LLVM_ABI extern char &PatchableFunctionID;
+LLVM_ABI extern const char &PatchableFunctionID;
/// createStackProtectorPass - This pass adds stack protectors to functions.
///
@@ -445,14 +445,14 @@ LLVM_ABI FunctionPass *createWasmEHPass();
/// slots relative to one another and allocates base registers to access them
/// when it is estimated by the target to be out of range of normal frame
/// pointer or stack pointer index addressing.
-LLVM_ABI extern char &LocalStackSlotAllocationID;
+LLVM_ABI extern const char &LocalStackSlotAllocationID;
/// This pass expands pseudo-instructions, reserves registers and adjusts
/// machine frame information.
-LLVM_ABI extern char &FinalizeISelID;
+LLVM_ABI extern const char &FinalizeISelID;
/// UnpackMachineBundles - This pass unpack machine instruction bundles.
-LLVM_ABI extern char &UnpackMachineBundlesID;
+LLVM_ABI extern const char &UnpackMachineBundlesID;
LLVM_ABI FunctionPass *
createUnpackMachineBundles(std::function<bool(const MachineFunction &)> Ftor);
@@ -460,23 +460,23 @@ createUnpackMachineBundles(std::function<bool(const MachineFunction &)> Ftor);
/// StackMapLiveness - This pass analyses the register live-out set of
/// stackmap/patchpoint intrinsics and attaches the calculated information to
/// the intrinsic for later emission to the StackMap.
-LLVM_ABI extern char &StackMapLivenessID;
+LLVM_ABI extern const char &StackMapLivenessID;
// MachineSanitizerBinaryMetadata - appends/finalizes sanitizer binary
// metadata after llvm SanitizerBinaryMetadata pass.
-LLVM_ABI extern char &MachineSanitizerBinaryMetadataID;
+LLVM_ABI extern const char &MachineSanitizerBinaryMetadataID;
/// RemoveLoadsIntoFakeUses pass.
-LLVM_ABI extern char &RemoveLoadsIntoFakeUsesID;
+LLVM_ABI extern const char &RemoveLoadsIntoFakeUsesID;
/// RemoveRedundantDebugValues pass.
-LLVM_ABI extern char &RemoveRedundantDebugValuesID;
+LLVM_ABI extern const char &RemoveRedundantDebugValuesID;
/// MachineCFGPrinter pass.
-LLVM_ABI extern char &MachineCFGPrinterID;
+LLVM_ABI extern const char &MachineCFGPrinterID;
/// LiveDebugValues pass
-LLVM_ABI extern char &LiveDebugValuesID;
+LLVM_ABI extern const char &LiveDebugValuesID;
/// InterleavedAccess Pass - This pass identifies and matches interleaved
/// memory accesses to target specific intrinsics.
@@ -519,7 +519,7 @@ LLVM_ABI FunctionPass *createSafeStackPass();
/// This pass detects subregister lanes in a virtual register that are used
/// independently of other lanes and splits them into separate virtual
/// registers.
-LLVM_ABI extern char &RenameIndependentSubregsID;
+LLVM_ABI extern const char &RenameIndependentSubregsID;
/// This pass is executed POST-RA to collect which physical registers are
/// preserved by given machine function.
@@ -531,7 +531,7 @@ LLVM_ABI FunctionPass *createRegUsageInfoCollector();
LLVM_ABI FunctionPass *createRegUsageInfoPropPass();
/// This pass performs software pipelining on machine instructions.
-LLVM_ABI extern char &MachinePipelinerID;
+LLVM_ABI extern const char &MachinePipelinerID;
/// This pass frees the memory occupied by the MachineFunction.
LLVM_ABI FunctionPass *createFreeMachineFunctionPass();
@@ -610,7 +610,7 @@ LLVM_ABI ModulePass *createCheckDebugMachineModulePass();
/// The pass fixups statepoint machine instruction to replace usage of
/// caller saved registers with stack slots.
-LLVM_ABI extern char &FixupStatepointCallerSavedID;
+LLVM_ABI extern const char &FixupStatepointCallerSavedID;
/// When learning an eviction policy, extract score(reward) information,
/// otherwise this does nothing
diff --git a/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h b/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
index b6ca1d6e9b328..e37c8d1bf3b83 100644
--- a/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
+++ b/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
@@ -341,7 +341,7 @@ class ReachingDefInfoWrapperPass : public MachineFunctionPass {
ReachingDefInfo RDI;
public:
- static char ID;
+ static const char ID;
ReachingDefInfoWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h b/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
index 1020c5f97dd31..01e3537fe50af 100644
--- a/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
+++ b/llvm/include/llvm/CodeGen/RegAllocEvictionAdvisor.h
@@ -202,7 +202,7 @@ class RegAllocEvictionAdvisorAnalysisLegacy : public ImmutablePass {
RegAllocEvictionAdvisorAnalysisLegacy(AdvisorMode Mode)
: ImmutablePass(ID), Mode(Mode) {};
- static char ID;
+ static const char ID;
/// Get an advisor for the given context (i.e. machine function, etc)
RegAllocEvictionAdvisorProvider &getProvider() { return *Provider; }
diff --git a/llvm/include/llvm/CodeGen/RegAllocPriorityAdvisor.h b/llvm/include/llvm/CodeGen/RegAllocPriorityAdvisor.h
index b0355795370d8..10f5d5aba0dc4 100644
--- a/llvm/include/llvm/CodeGen/RegAllocPriorityAdvisor.h
+++ b/llvm/include/llvm/CodeGen/RegAllocPriorityAdvisor.h
@@ -129,7 +129,7 @@ class RegAllocPriorityAdvisorAnalysisLegacy : public ImmutablePass {
using AdvisorMode = RegAllocPriorityAdvisorProvider::AdvisorMode;
RegAllocPriorityAdvisorAnalysisLegacy(AdvisorMode Mode)
: ImmutablePass(ID), Mode(Mode) {};
- static char ID;
+ static const char ID;
/// Get an advisor for the given context (i.e. machine function, etc)
RegAllocPriorityAdvisorProvider &getProvider() { return *Provider; }
diff --git a/llvm/include/llvm/CodeGen/RegisterUsageInfo.h b/llvm/include/llvm/CodeGen/RegisterUsageInfo.h
index 9a1d9a4a47120..08fd7dcbfa4de 100644
--- a/llvm/include/llvm/CodeGen/RegisterUsageInfo.h
+++ b/llvm/include/llvm/CodeGen/RegisterUsageInfo.h
@@ -66,7 +66,7 @@ class PhysicalRegisterUsageInfoWrapperLegacy : public ImmutablePass {
std::unique_ptr<PhysicalRegisterUsageInfo> PRUI;
public:
- static char ID;
+ static const char ID;
PhysicalRegisterUsageInfoWrapperLegacy() : ImmutablePass(ID) {}
PhysicalRegisterUsageInfo &getPRUI() { return *PRUI; }
diff --git a/llvm/include/llvm/CodeGen/ReplaceWithVeclib.h b/llvm/include/llvm/CodeGen/ReplaceWithVeclib.h
index 785d298a8c5f1..f4ac15b6cdc49 100644
--- a/llvm/include/llvm/CodeGen/ReplaceWithVeclib.h
+++ b/llvm/include/llvm/CodeGen/ReplaceWithVeclib.h
@@ -27,7 +27,7 @@ struct ReplaceWithVeclib : public PassInfoMixin<ReplaceWithVeclib> {
// Legacy pass
struct LLVM_ABI ReplaceWithVeclibLegacy : public FunctionPass {
- static char ID;
+ static const char ID;
ReplaceWithVeclibLegacy() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/llvm/include/llvm/CodeGen/SelectionDAGISel.h
index 38a7d70ef6db0..9bc8f502d6575 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGISel.h
@@ -560,7 +560,7 @@ class SelectionDAGISelLegacy : public MachineFunctionPass {
std::unique_ptr<SelectionDAGISel> Selector;
public:
- SelectionDAGISelLegacy(char &ID, std::unique_ptr<SelectionDAGISel> S);
+ SelectionDAGISelLegacy(const char &ID, std::unique_ptr<SelectionDAGISel> S);
~SelectionDAGISelLegacy() override = default;
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 780bd82a4c624..705d3b77f8efc 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -676,7 +676,7 @@ class raw_ostream;
SlotIndexes SI;
public:
- static char ID;
+ static const char ID;
SlotIndexesWrapperPass();
diff --git a/llvm/include/llvm/CodeGen/SpillPlacement.h b/llvm/include/llvm/CodeGen/SpillPlacement.h
index 1ef37f2718a65..2f827a677d788 100644
--- a/llvm/include/llvm/CodeGen/SpillPlacement.h
+++ b/llvm/include/llvm/CodeGen/SpillPlacement.h
@@ -178,7 +178,7 @@ class SpillPlacement {
class SpillPlacementWrapperLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SpillPlacementWrapperLegacy() : MachineFunctionPass(ID) {}
SpillPlacement &getResult() { return Impl; }
diff --git a/llvm/include/llvm/CodeGen/StackProtector.h b/llvm/include/llvm/CodeGen/StackProtector.h
index fbe79353b9c33..f53cfa9681346 100644
--- a/llvm/include/llvm/CodeGen/StackProtector.h
+++ b/llvm/include/llvm/CodeGen/StackProtector.h
@@ -105,7 +105,7 @@ class StackProtector : public FunctionPass {
SSPLayoutInfo LayoutInfo;
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
StackProtector();
diff --git a/llvm/include/llvm/CodeGen/TargetPassConfig.h b/llvm/include/llvm/CodeGen/TargetPassConfig.h
index 5e0e641a981f9..c1b6f185023b0 100644
--- a/llvm/include/llvm/CodeGen/TargetPassConfig.h
+++ b/llvm/include/llvm/CodeGen/TargetPassConfig.h
@@ -153,7 +153,7 @@ class LLVM_ABI TargetPassConfig : public ImmutablePass {
~TargetPassConfig() override;
- static char ID;
+ static const char ID;
/// Get the right type of TargetMachine for this target.
template<typename TMC> TMC &getTM() const {
diff --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h
index 405ae3905ebe5..07f6eab0f56a6 100644
--- a/llvm/include/llvm/CodeGen/VirtRegMap.h
+++ b/llvm/include/llvm/CodeGen/VirtRegMap.h
@@ -195,7 +195,7 @@ class VirtRegMapWrapperLegacy : public MachineFunctionPass {
VirtRegMap VRM;
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
VirtRegMapWrapperLegacy() : MachineFunctionPass(ID) {}
diff --git a/llvm/include/llvm/DWP/DWPError.h b/llvm/include/llvm/DWP/DWPError.h
index e226e3d7b4054..7eca8c401a581 100644
--- a/llvm/include/llvm/DWP/DWPError.h
+++ b/llvm/include/llvm/DWP/DWPError.h
@@ -14,7 +14,7 @@ class DWPError : public ErrorInfo<DWPError> {
std::error_code convertToErrorCode() const override {
llvm_unreachable("Not implemented");
}
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
private:
std::string Info;
diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h b/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
index bb73a95f9eadd..493060552b7a1 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
+++ b/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h
@@ -44,7 +44,7 @@ class CodeViewError : public ErrorInfo<CodeViewError, StringError> {
using ErrorInfo<CodeViewError,
StringError>::ErrorInfo; // inherit constructors
CodeViewError(const Twine &S) : ErrorInfo(S, cv_error_code::unspecified) {}
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
};
} // namespace codeview
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
index 086e11a623e9e..792e78e3624e3 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
@@ -526,7 +526,7 @@ class LLVM_ABI DWARFDebugNames : public DWARFAcceleratorTable {
/// the entry list.
class LLVM_ABI SentinelError : public ErrorInfo<SentinelError> {
public:
- static char ID;
+ static const char ID;
void log(raw_ostream &OS) const override { OS << "Sentinel"; }
std::error_code convertToErrorCode() const override;
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
index 75ca297b24f20..0ee42369d7a46 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
@@ -147,7 +147,7 @@ class LLVM_ABI DWARFDebugLoclists final : public DWARFLocationTable {
class LLVM_ABI ResolverError : public ErrorInfo<ResolverError> {
public:
- static char ID;
+ static const char ID;
ResolverError(uint32_t Index, dwarf::LoclistEntries Kind) : Index(Index), Kind(Kind) {}
diff --git a/llvm/include/llvm/DebugInfo/MSF/MSFError.h b/llvm/include/llvm/DebugInfo/MSF/MSFError.h
index a64db999501ed..3d50e3b922320 100644
--- a/llvm/include/llvm/DebugInfo/MSF/MSFError.h
+++ b/llvm/include/llvm/DebugInfo/MSF/MSFError.h
@@ -68,7 +68,7 @@ class MSFError : public ErrorInfo<MSFError, StringError> {
llvm_unreachable("msf error code not implemented");
}
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
};
} // namespace msf
} // namespace llvm
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h
index 96d960599f7ef..87a51bd0490ec 100644
--- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h
@@ -43,7 +43,7 @@ class DIAError : public ErrorInfo<DIAError, StringError> {
public:
using ErrorInfo<DIAError, StringError>::ErrorInfo;
DIAError(const Twine &S) : ErrorInfo(S, dia_error_code::unspecified) {}
- static char ID;
+ static const char ID;
};
} // namespace pdb
} // namespace llvm
diff --git a/llvm/include/llvm/DebugInfo/PDB/GenericError.h b/llvm/include/llvm/DebugInfo/PDB/GenericError.h
index 31aaeb6343775..6002082fb029e 100644
--- a/llvm/include/llvm/DebugInfo/PDB/GenericError.h
+++ b/llvm/include/llvm/DebugInfo/PDB/GenericError.h
@@ -44,7 +44,7 @@ class PDBError : public ErrorInfo<PDBError, StringError> {
public:
using ErrorInfo<PDBError, StringError>::ErrorInfo; // inherit constructors
PDBError(const Twine &S) : ErrorInfo(S, pdb_error_code::unspecified) {}
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
};
} // namespace pdb
} // namespace llvm
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h b/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h
index 550f32421bde6..3517908d7f7bc 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/RawError.h
@@ -50,7 +50,7 @@ class RawError : public ErrorInfo<RawError, StringError> {
public:
using ErrorInfo<RawError, StringError>::ErrorInfo; // inherit constructors
RawError(const Twine &S) : ErrorInfo(S, raw_error_code::unspecified) {}
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
};
} // namespace pdb
} // namespace llvm
diff --git a/llvm/include/llvm/Debuginfod/HTTPServer.h b/llvm/include/llvm/Debuginfod/HTTPServer.h
index c200089200ab7..9b358edc54360 100644
--- a/llvm/include/llvm/Debuginfod/HTTPServer.h
+++ b/llvm/include/llvm/Debuginfod/HTTPServer.h
@@ -36,7 +36,7 @@ class HTTPServer;
class HTTPServerError : public ErrorInfo<HTTPServerError, ECError> {
public:
- static char ID;
+ static const char ID;
HTTPServerError(const Twine &Msg);
void log(raw_ostream &OS) const override;
diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h b/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
index cb5d27b39efb6..013228b41e3e1 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
@@ -52,7 +52,7 @@ class Section;
/// support.
class LLVM_ABI JITLinkError : public ErrorInfo<JITLinkError> {
public:
- static char ID;
+ static const char ID;
JITLinkError(Twine ErrMsg) : ErrMsg(ErrMsg.str()) {}
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Core.h b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index 5ca5d347b3088..21398e8667485 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@ -430,7 +430,7 @@ LLVM_ABI extern RegisterDependenciesFunction NoDependenciesToRegister;
class LLVM_ABI ResourceTrackerDefunct
: public ErrorInfo<ResourceTrackerDefunct> {
public:
- static char ID;
+ static const char ID;
ResourceTrackerDefunct(ResourceTrackerSP RT);
std::error_code convertToErrorCode() const override;
@@ -443,7 +443,7 @@ class LLVM_ABI ResourceTrackerDefunct
/// Returned by operations that fail because a JITDylib has been closed.
class LLVM_ABI JITDylibDefunct : public ErrorInfo<JITDylibDefunct> {
public:
- static char ID;
+ static const char ID;
JITDylibDefunct(JITDylibSP JD) : JD(std::move(JD)) {}
std::error_code convertToErrorCode() const override;
@@ -457,7 +457,7 @@ class LLVM_ABI JITDylibDefunct : public ErrorInfo<JITDylibDefunct> {
/// materialize.
class LLVM_ABI FailedToMaterialize : public ErrorInfo<FailedToMaterialize> {
public:
- static char ID;
+ static const char ID;
FailedToMaterialize(std::shared_ptr<SymbolStringPool> SSP,
std::shared_ptr<SymbolDependenceMap> Symbols);
@@ -475,7 +475,7 @@ class LLVM_ABI FailedToMaterialize : public ErrorInfo<FailedToMaterialize> {
class LLVM_ABI UnsatisfiedSymbolDependencies
: public ErrorInfo<UnsatisfiedSymbolDependencies> {
public:
- static char ID;
+ static const char ID;
UnsatisfiedSymbolDependencies(std::shared_ptr<SymbolStringPool> SSP,
JITDylibSP JD, SymbolNameSet FailedSymbols,
@@ -495,7 +495,7 @@ class LLVM_ABI UnsatisfiedSymbolDependencies
/// Used to notify clients when symbols can not be found during a lookup.
class LLVM_ABI SymbolsNotFound : public ErrorInfo<SymbolsNotFound> {
public:
- static char ID;
+ static const char ID;
SymbolsNotFound(std::shared_ptr<SymbolStringPool> SSP, SymbolNameSet Symbols);
SymbolsNotFound(std::shared_ptr<SymbolStringPool> SSP,
@@ -514,7 +514,7 @@ class LLVM_ABI SymbolsNotFound : public ErrorInfo<SymbolsNotFound> {
class LLVM_ABI SymbolsCouldNotBeRemoved
: public ErrorInfo<SymbolsCouldNotBeRemoved> {
public:
- static char ID;
+ static const char ID;
SymbolsCouldNotBeRemoved(std::shared_ptr<SymbolStringPool> SSP,
SymbolNameSet Symbols);
@@ -535,7 +535,7 @@ class LLVM_ABI SymbolsCouldNotBeRemoved
class LLVM_ABI MissingSymbolDefinitions
: public ErrorInfo<MissingSymbolDefinitions> {
public:
- static char ID;
+ static const char ID;
MissingSymbolDefinitions(std::shared_ptr<SymbolStringPool> SSP,
std::string ModuleName, SymbolNameVector Symbols)
@@ -559,7 +559,7 @@ class LLVM_ABI MissingSymbolDefinitions
class LLVM_ABI UnexpectedSymbolDefinitions
: public ErrorInfo<UnexpectedSymbolDefinitions> {
public:
- static char ID;
+ static const char ID;
UnexpectedSymbolDefinitions(std::shared_ptr<SymbolStringPool> SSP,
std::string ModuleName, SymbolNameVector Symbols)
@@ -1322,7 +1322,7 @@ class LLVM_ABI Platform {
class LLVM_ABI MaterializationTask
: public RTTIExtends<MaterializationTask, Task> {
public:
- static char ID;
+ static const char ID;
MaterializationTask(std::unique_ptr<MaterializationUnit> MU,
std::unique_ptr<MaterializationResponsibility> MR)
@@ -1341,7 +1341,7 @@ class LLVM_ABI MaterializationTask
/// state.
class LLVM_ABI LookupTask : public RTTIExtends<LookupTask, Task> {
public:
- static char ID;
+ static const char ID;
LookupTask(LookupState LS) : LS(std::move(LS)) {}
void printDescription(raw_ostream &OS) override;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Layer.h b/llvm/include/llvm/ExecutionEngine/Orc/Layer.h
index 25df380413d5b..bbf0907143d10 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Layer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Layer.h
@@ -133,7 +133,7 @@ class LLVM_ABI BasicIRLayerMaterializationUnit : public IRMaterializationUnit {
/// Interface for Layers that accept object files.
class LLVM_ABI ObjectLayer : public RTTIExtends<ObjectLayer, RTTIRoot> {
public:
- static char ID;
+ static const char ID;
ObjectLayer(ExecutionSession &ES);
~ObjectLayer() override;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/MaterializationUnit.h b/llvm/include/llvm/ExecutionEngine/Orc/MaterializationUnit.h
index f8ac76d889540..842f5e1607bb2 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/MaterializationUnit.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/MaterializationUnit.h
@@ -35,7 +35,7 @@ class LLVM_ABI MaterializationUnit {
friend class JITDylib;
public:
- static char ID;
+ static const char ID;
struct Interface {
Interface() = default;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
index 52361ec223873..4d37cd5125b37 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
@@ -46,7 +46,7 @@ class LLVM_ABI ObjectLinkingLayer
using BaseObjectLayer = RTTIExtends<ObjectLinkingLayer, ObjectLayer>;
public:
- static char ID;
+ static const char ID;
using ReturnObjectBufferFunction =
std::function<void(std::unique_ptr<MemoryBuffer>)>;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
index f1e3042873d6d..cf8531d6bf928 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
@@ -25,7 +25,7 @@ namespace orc {
class LLVM_ABI ObjectTransformLayer
: public RTTIExtends<ObjectTransformLayer, ObjectLayer> {
public:
- static char ID;
+ static const char ID;
using TransformFunction =
std::function<Expected<std::unique_ptr<MemoryBuffer>>(
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
index a0499f79704eb..669361ecc3fe4 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
@@ -37,7 +37,7 @@ class LLVM_ABI RTDyldObjectLinkingLayer
: public RTTIExtends<RTDyldObjectLinkingLayer, ObjectLayer>,
private ResourceManager {
public:
- static char ID;
+ static const char ID;
/// Functor for receiving object-loaded notifications.
using NotifyLoadedFunction = std::function<void(
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcError.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcError.h
index 8c8b9c7ccc38d..115efc41c3cbd 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcError.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcError.h
@@ -47,7 +47,7 @@ LLVM_ABI std::error_code orcError(OrcErrorCode ErrCode);
class LLVM_ABI DuplicateDefinition : public ErrorInfo<DuplicateDefinition> {
public:
- static char ID;
+ static const char ID;
DuplicateDefinition(std::string SymbolName,
std::optional<std::string> Context = {});
@@ -63,7 +63,7 @@ class LLVM_ABI DuplicateDefinition : public ErrorInfo<DuplicateDefinition> {
class LLVM_ABI JITSymbolNotFound : public ErrorInfo<JITSymbolNotFound> {
public:
- static char ID;
+ static const char ID;
JITSymbolNotFound(std::string SymbolName);
std::error_code convertToErrorCode() const override;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h b/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
index b73da194cd187..d9f9fb9581240 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
@@ -35,7 +35,7 @@ namespace orc {
/// Represents an abstract task for ORC to run.
class LLVM_ABI Task : public RTTIExtends<Task, RTTIRoot> {
public:
- static char ID;
+ static const char ID;
~Task() override = default;
@@ -52,7 +52,7 @@ class LLVM_ABI Task : public RTTIExtends<Task, RTTIRoot> {
/// Base class for generic tasks.
class GenericNamedTask : public RTTIExtends<GenericNamedTask, Task> {
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
LLVM_ABI static const char *DefaultDescription;
};
@@ -97,7 +97,7 @@ makeGenericNamedTask(FnT &&Fn, const char *Desc = nullptr) {
/// lookup.
class LLVM_ABI IdleTask : public RTTIExtends<IdleTask, Task> {
public:
- static char ID;
+ static const char ID;
private:
void anchor() override;
diff --git a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h b/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
index 57387f029b6cf..8b32b90b2a293 100644
--- a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
+++ b/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
@@ -42,7 +42,7 @@ template <typename T> class OwningBinary;
/// support.
class LLVM_ABI RuntimeDyldError : public ErrorInfo<RuntimeDyldError> {
public:
- static char ID;
+ static const char ID;
RuntimeDyldError(std::string ErrMsg) : ErrMsg(std::move(ErrMsg)) {}
diff --git a/llvm/include/llvm/Frontend/HLSL/RootSignatureMetadata.h b/llvm/include/llvm/Frontend/HLSL/RootSignatureMetadata.h
index 7ef6667a5437d..8fed66702e6c1 100644
--- a/llvm/include/llvm/Frontend/HLSL/RootSignatureMetadata.h
+++ b/llvm/include/llvm/Frontend/HLSL/RootSignatureMetadata.h
@@ -30,7 +30,7 @@ namespace rootsig {
class RootSignatureValidationError
: public ErrorInfo<RootSignatureValidationError> {
public:
- static char ID;
+ static const char ID;
std::string Msg;
RootSignatureValidationError(const Twine &Msg) : Msg(Msg.str()) {}
diff --git a/llvm/include/llvm/IR/Dominators.h b/llvm/include/llvm/IR/Dominators.h
index 1209def5ac0bd..a26f1db86a843 100644
--- a/llvm/include/llvm/IR/Dominators.h
+++ b/llvm/include/llvm/IR/Dominators.h
@@ -322,7 +322,7 @@ class LLVM_ABI DominatorTreeWrapperPass : public FunctionPass {
DominatorTree DT;
public:
- static char ID;
+ static const char ID;
DominatorTreeWrapperPass();
diff --git a/llvm/include/llvm/IR/LLVMRemarkStreamer.h b/llvm/include/llvm/IR/LLVMRemarkStreamer.h
index 96cccebf0d70e..1358b6dcc25b6 100644
--- a/llvm/include/llvm/IR/LLVMRemarkStreamer.h
+++ b/llvm/include/llvm/IR/LLVMRemarkStreamer.h
@@ -64,21 +64,21 @@ struct LLVMRemarkSetupErrorInfo : public ErrorInfo<ThisError> {
struct LLVMRemarkSetupFileError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupFileError> {
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
using LLVMRemarkSetupErrorInfo<
LLVMRemarkSetupFileError>::LLVMRemarkSetupErrorInfo;
};
struct LLVMRemarkSetupPatternError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupPatternError> {
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
using LLVMRemarkSetupErrorInfo<
LLVMRemarkSetupPatternError>::LLVMRemarkSetupErrorInfo;
};
struct LLVMRemarkSetupFormatError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupFormatError> {
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
using LLVMRemarkSetupErrorInfo<
LLVMRemarkSetupFormatError>::LLVMRemarkSetupErrorInfo;
};
diff --git a/llvm/include/llvm/IR/LegacyPassManagers.h b/llvm/include/llvm/IR/LegacyPassManagers.h
index d25bcafc9cc05..ec52ecc863e91 100644
--- a/llvm/include/llvm/IR/LegacyPassManagers.h
+++ b/llvm/include/llvm/IR/LegacyPassManagers.h
@@ -456,7 +456,7 @@ class LLVM_ABI PMDataManager {
/// function.
class LLVM_ABI FPPassManager : public ModulePass, public PMDataManager {
public:
- static char ID;
+ static const char ID;
explicit FPPassManager() : ModulePass(ID) {}
/// run - Execute all of the passes scheduled for execution. Keep track of
diff --git a/llvm/include/llvm/MCA/InstrBuilder.h b/llvm/include/llvm/MCA/InstrBuilder.h
index a5ce632b03634..07b737db02f04 100644
--- a/llvm/include/llvm/MCA/InstrBuilder.h
+++ b/llvm/include/llvm/MCA/InstrBuilder.h
@@ -33,7 +33,7 @@ class RecycledInstErr : public ErrorInfo<RecycledInstErr> {
Instruction *RecycledInst;
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
explicit RecycledInstErr(Instruction *Inst) : RecycledInst(Inst) {}
// Always need to carry an Instruction
diff --git a/llvm/include/llvm/MCA/Stages/Stage.h b/llvm/include/llvm/MCA/Stages/Stage.h
index 69a6b382032b6..4aa6b4585a291 100644
--- a/llvm/include/llvm/MCA/Stages/Stage.h
+++ b/llvm/include/llvm/MCA/Stages/Stage.h
@@ -89,7 +89,7 @@ class LLVM_ABI Stage {
/// This is actually not an error but a marker to indicate that
/// the instruction stream is paused.
struct InstStreamPause : public ErrorInfo<InstStreamPause> {
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
std::error_code convertToErrorCode() const override {
return llvm::inconvertibleErrorCode();
diff --git a/llvm/include/llvm/MCA/Support.h b/llvm/include/llvm/MCA/Support.h
index ce2ac9b4b6cd2..6b07159e27daf 100644
--- a/llvm/include/llvm/MCA/Support.h
+++ b/llvm/include/llvm/MCA/Support.h
@@ -27,7 +27,7 @@ namespace mca {
template <typename T>
class InstructionError : public ErrorInfo<InstructionError<T>> {
public:
- static char ID;
+ static const char ID;
std::string Message;
const T &Inst;
@@ -41,7 +41,7 @@ class InstructionError : public ErrorInfo<InstructionError<T>> {
}
};
-template <typename T> char InstructionError<T>::ID;
+template <typename T> const char InstructionError<T>::ID = 0;
/// This class represents the number of cycles per resource (fractions of
/// cycles). That quantity is managed here as a ratio, and accessed via the
diff --git a/llvm/include/llvm/Object/Error.h b/llvm/include/llvm/Object/Error.h
index 9c522f56b02b5..01694b2139c8c 100644
--- a/llvm/include/llvm/Object/Error.h
+++ b/llvm/include/llvm/Object/Error.h
@@ -53,7 +53,7 @@ inline std::error_code make_error_code(object_error e) {
class LLVM_ABI BinaryError : public ErrorInfo<BinaryError, ECError> {
void anchor() override;
public:
- static char ID;
+ static const char ID;
BinaryError() {
// Default to parse_failed, can be overridden with setErrorCode.
setErrorCode(make_error_code(object_error::parse_failed));
@@ -67,7 +67,7 @@ class LLVM_ABI BinaryError : public ErrorInfo<BinaryError, ECError> {
class LLVM_ABI GenericBinaryError
: public ErrorInfo<GenericBinaryError, BinaryError> {
public:
- static char ID;
+ static const char ID;
GenericBinaryError(const Twine &Msg);
GenericBinaryError(const Twine &Msg, object_error ECOverride);
const std::string &getMessage() const { return Msg; }
diff --git a/llvm/include/llvm/Pass.h b/llvm/include/llvm/Pass.h
index f3962c3556c95..5ed6087b9d75e 100644
--- a/llvm/include/llvm/Pass.h
+++ b/llvm/include/llvm/Pass.h
@@ -102,7 +102,7 @@ class LLVM_ABI Pass {
PassKind Kind;
public:
- explicit Pass(PassKind K, char &pid) : PassID(&pid), Kind(K) {}
+ explicit Pass(PassKind K, const char &pid) : PassID(&pid), Kind(K) {}
Pass(const Pass &) = delete;
Pass &operator=(const Pass &) = delete;
virtual ~Pass();
@@ -216,7 +216,7 @@ class LLVM_ABI Pass {
/// obviously cannot give you a properly typed instance of the class if you
/// don't have the class name available (use getAnalysisIfAvailable if you
/// do), but it can tell you if you need to preserve the pass at least.
- bool mustPreserveAnalysisID(char &AID) const;
+ bool mustPreserveAnalysisID(const char &AID) const;
/// getAnalysis<AnalysisType>() - This function is used by subclasses to get
/// to the analysis information that they claim to use by overriding the
@@ -254,7 +254,7 @@ class LLVM_ABI Pass {
///
class LLVM_ABI ModulePass : public Pass {
public:
- explicit ModulePass(char &pid) : Pass(PT_Module, pid) {}
+ explicit ModulePass(const char &pid) : Pass(PT_Module, pid) {}
// Force out-of-line virtual method.
~ModulePass() override;
@@ -284,7 +284,7 @@ class LLVM_ABI ModulePass : public Pass {
///
class LLVM_ABI ImmutablePass : public ModulePass {
public:
- explicit ImmutablePass(char &pid) : ModulePass(pid) {}
+ explicit ImmutablePass(const char &pid) : ModulePass(pid) {}
// Force out-of-line virtual method.
~ImmutablePass() override;
@@ -313,7 +313,7 @@ class LLVM_ABI ImmutablePass : public ModulePass {
///
class LLVM_ABI FunctionPass : public Pass {
public:
- explicit FunctionPass(char &pid) : Pass(PT_Function, pid) {}
+ explicit FunctionPass(const char &pid) : Pass(PT_Function, pid) {}
/// createPrinterPass - Get a function printer pass.
Pass *createPrinterPass(raw_ostream &OS,
diff --git a/llvm/include/llvm/PassAnalysisSupport.h b/llvm/include/llvm/PassAnalysisSupport.h
index e81c0c4642d20..e96b9747836fd 100644
--- a/llvm/include/llvm/PassAnalysisSupport.h
+++ b/llvm/include/llvm/PassAnalysisSupport.h
@@ -71,13 +71,13 @@ class AnalysisUsage {
///@{
/// Add the specified ID to the required set of the usage info for a pass.
LLVM_ABI AnalysisUsage &addRequiredID(const void *ID);
- LLVM_ABI AnalysisUsage &addRequiredID(char &ID);
+ LLVM_ABI AnalysisUsage &addRequiredID(const char &ID);
template<class PassClass>
AnalysisUsage &addRequired() {
return addRequiredID(PassClass::ID);
}
- LLVM_ABI AnalysisUsage &addRequiredTransitiveID(char &ID);
+ LLVM_ABI AnalysisUsage &addRequiredTransitiveID(const char &ID);
template<class PassClass>
AnalysisUsage &addRequiredTransitive() {
return addRequiredTransitiveID(PassClass::ID);
@@ -90,7 +90,7 @@ class AnalysisUsage {
pushUnique(Preserved, ID);
return *this;
}
- AnalysisUsage &addPreservedID(char &ID) {
+ AnalysisUsage &addPreservedID(const char &ID) {
pushUnique(Preserved, &ID);
return *this;
}
@@ -109,7 +109,7 @@ class AnalysisUsage {
pushUnique(Used, ID);
return *this;
}
- AnalysisUsage &addUsedIfAvailableID(char &ID) {
+ AnalysisUsage &addUsedIfAvailableID(const char &ID) {
pushUnique(Used, &ID);
return *this;
}
diff --git a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
index 8ab036195160e..e6624ae69417b 100644
--- a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
@@ -96,7 +96,7 @@ class LLVM_ABI CoverageMapError : public ErrorInfo<CoverageMapError> {
coveragemap_error get() const { return Err; }
const std::string &getMessage() const { return Msg; }
- static char ID;
+ static const char ID;
private:
coveragemap_error Err;
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index f742476ac854a..6f6c1f7560b19 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -478,7 +478,7 @@ class LLVM_ABI InstrProfError : public ErrorInfo<InstrProfError> {
return {Err, Msg};
}
- static char ID;
+ static const char ID;
private:
instrprof_error Err;
diff --git a/llvm/include/llvm/ProfileData/SymbolRemappingReader.h b/llvm/include/llvm/ProfileData/SymbolRemappingReader.h
index d81b643477456..58edee3f5bc55 100644
--- a/llvm/include/llvm/ProfileData/SymbolRemappingReader.h
+++ b/llvm/include/llvm/ProfileData/SymbolRemappingReader.h
@@ -84,7 +84,7 @@ class SymbolRemappingParseError : public ErrorInfo<SymbolRemappingParseError> {
int64_t getLineNum() const { return Line; }
StringRef getMessage() const { return Message; }
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
private:
std::string File;
diff --git a/llvm/include/llvm/Remarks/RemarkParser.h b/llvm/include/llvm/Remarks/RemarkParser.h
index e3df74436348e..7e1c0373d9f0a 100644
--- a/llvm/include/llvm/Remarks/RemarkParser.h
+++ b/llvm/include/llvm/Remarks/RemarkParser.h
@@ -27,7 +27,7 @@ struct Remark;
class EndOfFileError : public ErrorInfo<EndOfFileError> {
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
EndOfFileError() = default;
diff --git a/llvm/include/llvm/Support/BinaryStreamError.h b/llvm/include/llvm/Support/BinaryStreamError.h
index 8a45f7bbd52cc..782343390b9f0 100644
--- a/llvm/include/llvm/Support/BinaryStreamError.h
+++ b/llvm/include/llvm/Support/BinaryStreamError.h
@@ -27,7 +27,7 @@ enum class stream_error_code {
/// Base class for errors originating when parsing raw PDB files
class LLVM_ABI BinaryStreamError : public ErrorInfo<BinaryStreamError> {
public:
- static char ID;
+ static const char ID;
explicit BinaryStreamError(stream_error_code C);
explicit BinaryStreamError(StringRef Context);
BinaryStreamError(stream_error_code C, StringRef Context);
diff --git a/llvm/include/llvm/Support/Error.h b/llvm/include/llvm/Support/Error.h
index c9fd16fdb7c2b..1dda30bce91bc 100644
--- a/llvm/include/llvm/Support/Error.h
+++ b/llvm/include/llvm/Support/Error.h
@@ -82,7 +82,7 @@ class LLVM_ABI ErrorInfoBase {
private:
virtual void anchor();
- static char ID;
+ static const char ID;
};
/// Lightweight error class with error context and mandatory checking.
@@ -391,7 +391,7 @@ class LLVM_ABI ErrorList final : public ErrorInfo<ErrorList> {
std::error_code convertToErrorCode() const override;
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
private:
ErrorList(std::unique_ptr<ErrorInfoBase> Payload1,
@@ -1201,7 +1201,7 @@ class LLVM_ABI ECError : public ErrorInfo<ECError> {
void log(raw_ostream &OS) const override { OS << EC.message(); }
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
protected:
ECError() = default;
@@ -1281,7 +1281,7 @@ template <typename T> ErrorOr<T> expectedToErrorOr(Expected<T> &&E) {
///
class LLVM_ABI StringError : public ErrorInfo<StringError> {
public:
- static char ID;
+ static const char ID;
StringError(std::string &&S, std::error_code EC, bool PrintMsgOnly);
/// Prints EC + S and converts to EC.
@@ -1367,7 +1367,7 @@ class LLVM_ABI FileError final : public ErrorInfo<FileError> {
std::error_code convertToErrorCode() const override;
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
private:
FileError(const Twine &F, std::optional<size_t> LineNum,
diff --git a/llvm/include/llvm/Support/ExtensibleRTTI.h b/llvm/include/llvm/Support/ExtensibleRTTI.h
index 13c3f49859c7e..b48094548f76d 100644
--- a/llvm/include/llvm/Support/ExtensibleRTTI.h
+++ b/llvm/include/llvm/Support/ExtensibleRTTI.h
@@ -26,19 +26,19 @@
// @code{.cpp}
// class MyBaseClass : public RTTIExtends<MyBaseClass, RTTIRoot> {
// public:
-// static char ID;
+// static const char ID;
// virtual void foo() = 0;
// };
//
// class MyDerivedClass1 : public RTTIExtends<MyDerivedClass1, MyBaseClass> {
// public:
-// static char ID;
+// static const char ID;
// void foo() override {}
// };
//
// class MyDerivedClass2 : public RTTIExtends<MyDerivedClass2, MyBaseClass> {
// public:
-// static char ID;
+// static const char ID;
// void foo() override {}
// };
//
@@ -86,7 +86,7 @@ class LLVM_ABI RTTIRoot {
private:
virtual void anchor();
- static char ID;
+ static const char ID;
};
/// Inheritance utility for extensible RTTI.
@@ -102,24 +102,24 @@ class LLVM_ABI RTTIRoot {
/// @code{.cpp}
/// class MyType : public RTTIExtends<MyType, RTTIRoot> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
/// class MyDerivedType : public RTTIExtends<MyDerivedType, MyType> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
/// class MyOtherType : public RTTIExtends<MyOtherType, MyType> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
/// class MyMultipleInheritanceType
/// : public RTTIExtends<MyMultipleInheritanceType,
/// MyDerivedType, MyOtherType> {
/// public:
-/// static char ID;
+/// static const char ID;
/// };
///
/// @endcode
diff --git a/llvm/include/llvm/Support/JSON.h b/llvm/include/llvm/Support/JSON.h
index 72e5a65dfea12..9f7f084711183 100644
--- a/llvm/include/llvm/Support/JSON.h
+++ b/llvm/include/llvm/Support/JSON.h
@@ -915,7 +915,7 @@ class ParseError : public llvm::ErrorInfo<ParseError> {
unsigned Line, Column, Offset;
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
ParseError(const char *Msg, unsigned Line, unsigned Column, unsigned Offset)
: Msg(Msg), Line(Line), Column(Column), Offset(Offset) {}
void log(llvm::raw_ostream &OS) const override {
diff --git a/llvm/include/llvm/Support/LSP/Protocol.h b/llvm/include/llvm/Support/LSP/Protocol.h
index a75ac291d1bcc..d24c385bf768b 100644
--- a/llvm/include/llvm/Support/LSP/Protocol.h
+++ b/llvm/include/llvm/Support/LSP/Protocol.h
@@ -81,7 +81,7 @@ class LSPError : public llvm::ErrorInfo<LSPError> {
public:
std::string message;
ErrorCode code;
- LLVM_ABI_FOR_TEST static char ID;
+ LLVM_ABI_FOR_TEST static const char ID;
LSPError(std::string message, ErrorCode code)
: message(std::move(message)), code(code) {}
diff --git a/llvm/include/llvm/Support/VirtualOutputError.h b/llvm/include/llvm/Support/VirtualOutputError.h
index 44590a1fb5ed0..92fa91d823461 100644
--- a/llvm/include/llvm/Support/VirtualOutputError.h
+++ b/llvm/include/llvm/Support/VirtualOutputError.h
@@ -43,7 +43,7 @@ class OutputError : public ErrorInfo<OutputError, ECError> {
void log(raw_ostream &OS) const override;
// Used by ErrorInfo::classID.
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
OutputError(const Twine &OutputPath, std::error_code EC)
: ErrorInfo<OutputError, ECError>(EC), OutputPath(OutputPath.str()) {
@@ -78,7 +78,7 @@ class OutputConfigError : public ErrorInfo<OutputConfigError, OutputError> {
void log(raw_ostream &OS) const override;
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
OutputConfigError(OutputConfig Config, const Twine &OutputPath)
: ErrorInfo<OutputConfigError, OutputError>(
@@ -99,7 +99,7 @@ class TempFileOutputError : public ErrorInfo<TempFileOutputError, OutputError> {
void log(raw_ostream &OS) const override;
// Used by ErrorInfo::classID.
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
TempFileOutputError(const Twine &TempPath, const Twine &OutputPath,
std::error_code EC)
diff --git a/llvm/include/llvm/Support/VirtualOutputFile.h b/llvm/include/llvm/Support/VirtualOutputFile.h
index a4a9c9cc16598..9c134ae262302 100644
--- a/llvm/include/llvm/Support/VirtualOutputFile.h
+++ b/llvm/include/llvm/Support/VirtualOutputFile.h
@@ -30,7 +30,7 @@ class OutputFileImpl : public RTTIExtends<OutputFileImpl, RTTIRoot> {
LLVM_ABI void anchor() override;
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
~OutputFileImpl() override = default;
virtual Error keep() = 0;
@@ -43,7 +43,7 @@ class NullOutputFileImpl final
LLVM_ABI void anchor() override;
public:
- LLVM_ABI static char ID;
+ LLVM_ABI static const char ID;
Error keep() final { return Error::success(); }
Error discard() final { return Error::success(); }
raw_pwrite_stream &getOS() final { return OS; }
diff --git a/llvm/include/llvm/TextAPI/TextAPIError.h b/llvm/include/llvm/TextAPI/TextAPIError.h
index 7b2182edd6210..af62379bae6f4 100644
--- a/llvm/include/llvm/TextAPI/TextAPIError.h
+++ b/llvm/include/llvm/TextAPI/TextAPIError.h
@@ -28,7 +28,7 @@ enum class TextAPIErrorCode {
class LLVM_ABI TextAPIError : public llvm::ErrorInfo<TextAPIError> {
public:
- static char ID;
+ static const char ID;
TextAPIErrorCode EC;
std::string Msg;
diff --git a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
index 1f758b8015efc..3363c49a595b0 100644
--- a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
+++ b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
@@ -50,7 +50,7 @@ class InstCombinePass : public PassInfoMixin<InstCombinePass> {
private:
InstructionWorklist Worklist;
InstCombineOptions Options;
- static char ID;
+ static const char ID;
public:
LLVM_ABI explicit InstCombinePass(InstCombineOptions Opts = {});
@@ -69,7 +69,7 @@ class LLVM_ABI InstructionCombiningPass : public FunctionPass {
InstructionWorklist Worklist;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit InstructionCombiningPass();
diff --git a/llvm/include/llvm/Transforms/Utils.h b/llvm/include/llvm/Transforms/Utils.h
index 840e085379a1d..68921a395ce8f 100644
--- a/llvm/include/llvm/Transforms/Utils.h
+++ b/llvm/include/llvm/Transforms/Utils.h
@@ -28,7 +28,7 @@ class Pass;
// instructions.
//
LLVM_ABI FunctionPass *createLowerInvokePass();
-LLVM_ABI extern char &LowerInvokePassID;
+LLVM_ABI extern const char &LowerInvokePassID;
//===----------------------------------------------------------------------===//
//
@@ -36,7 +36,7 @@ LLVM_ABI extern char &LowerInvokePassID;
// chained binary branch instructions.
//
LLVM_ABI FunctionPass *createLowerSwitchPass();
-LLVM_ABI extern char &LowerSwitchID;
+LLVM_ABI extern const char &LowerSwitchID;
//===----------------------------------------------------------------------===//
//
@@ -59,7 +59,7 @@ LLVM_ABI FunctionPass *createPostInlineEntryExitInstrumenterPass();
// (set, immediate dominators, tree, and frontier) information.
//
LLVM_ABI FunctionPass *createBreakCriticalEdgesPass();
-LLVM_ABI extern char &BreakCriticalEdgesID;
+LLVM_ABI extern const char &BreakCriticalEdgesID;
//===----------------------------------------------------------------------===//
//
@@ -67,7 +67,7 @@ LLVM_ABI extern char &BreakCriticalEdgesID;
// optimizations.
//
LLVM_ABI Pass *createLCSSAPass();
-LLVM_ABI extern char &LCSSAID;
+LLVM_ABI extern const char &LCSSAID;
//===----------------------------------------------------------------------===//
//
@@ -100,7 +100,7 @@ LLVM_ABI FunctionPass *createRegToMemWrapperPass();
// AU.addRequiredID(LoopSimplifyID);
//
LLVM_ABI Pass *createLoopSimplifyPass();
-LLVM_ABI extern char &LoopSimplifyID;
+LLVM_ABI extern const char &LoopSimplifyID;
//===----------------------------------------------------------------------===//
//
diff --git a/llvm/include/llvm/WindowsManifest/WindowsManifestMerger.h b/llvm/include/llvm/WindowsManifest/WindowsManifestMerger.h
index 0c938aceeebb0..9478425de5e53 100644
--- a/llvm/include/llvm/WindowsManifest/WindowsManifestMerger.h
+++ b/llvm/include/llvm/WindowsManifest/WindowsManifestMerger.h
@@ -40,7 +40,7 @@ LLVM_ABI bool isAvailable();
class LLVM_ABI WindowsManifestError
: public ErrorInfo<WindowsManifestError, ECError> {
public:
- static char ID;
+ static const char ID;
WindowsManifestError(const Twine &Msg);
void log(raw_ostream &OS) const override;
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index 26a560252d9aa..b7923f37810c8 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -708,7 +708,7 @@ ExternalAAWrapperPass::ExternalAAWrapperPass() : ImmutablePass(ID) {}
ExternalAAWrapperPass::ExternalAAWrapperPass(CallbackT CB, bool RunEarly)
: ImmutablePass(ID), CB(std::move(CB)), RunEarly(RunEarly) {}
-char ExternalAAWrapperPass::ID = 0;
+const char ExternalAAWrapperPass::ID = 0;
INITIALIZE_PASS(ExternalAAWrapperPass, "external-aa", "External Alias Analysis",
false, true)
@@ -720,7 +720,7 @@ llvm::createExternalAAWrapperPass(ExternalAAWrapperPass::CallbackT Callback) {
AAResultsWrapperPass::AAResultsWrapperPass() : FunctionPass(ID) {}
-char AAResultsWrapperPass::ID = 0;
+const char AAResultsWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(AAResultsWrapperPass, "aa",
"Function Alias Analysis Results", false, true)
diff --git a/llvm/lib/Analysis/AssumptionCache.cpp b/llvm/lib/Analysis/AssumptionCache.cpp
index 7fe00c6e22c51..fdabc26bf5915 100644
--- a/llvm/lib/Analysis/AssumptionCache.cpp
+++ b/llvm/lib/Analysis/AssumptionCache.cpp
@@ -304,7 +304,7 @@ AssumptionCacheTracker::AssumptionCacheTracker() : ImmutablePass(ID) {}
AssumptionCacheTracker::~AssumptionCacheTracker() = default;
-char AssumptionCacheTracker::ID = 0;
+const char AssumptionCacheTracker::ID = 0;
INITIALIZE_PASS(AssumptionCacheTracker, "assumption-cache-tracker",
"Assumption Cache Tracker", false, true)
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 1d5f9ac465808..f07a82fdae833 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -2023,7 +2023,7 @@ BasicAAResult BasicAA::run(Function &F, FunctionAnalysisManager &AM) {
BasicAAWrapperPass::BasicAAWrapperPass() : FunctionPass(ID) {}
-char BasicAAWrapperPass::ID = 0;
+const char BasicAAWrapperPass::ID = 0;
void BasicAAWrapperPass::anchor() {}
diff --git a/llvm/lib/Analysis/BlockFrequencyInfo.cpp b/llvm/lib/Analysis/BlockFrequencyInfo.cpp
index df99ec299a409..1ca93028c7875 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfo.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfo.cpp
@@ -299,7 +299,7 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
INITIALIZE_PASS_END(BlockFrequencyInfoWrapperPass, "block-freq",
"Block Frequency Analysis", true, true)
-char BlockFrequencyInfoWrapperPass::ID = 0;
+const char BlockFrequencyInfoWrapperPass::ID = 0;
BlockFrequencyInfoWrapperPass::BlockFrequencyInfoWrapperPass()
: FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index 4a99a40e0d2cc..832a72f056267 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -71,7 +71,7 @@ INITIALIZE_PASS_END(BranchProbabilityInfoWrapperPass, "branch-prob",
BranchProbabilityInfoWrapperPass::BranchProbabilityInfoWrapperPass()
: FunctionPass(ID) {}
-char BranchProbabilityInfoWrapperPass::ID = 0;
+const char BranchProbabilityInfoWrapperPass::ID = 0;
// Weights are for internal use only. They are used by heuristics to help to
// estimate edges' probability. Example:
diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp
index dbdd420b776f2..3980298d25a13 100644
--- a/llvm/lib/Analysis/CallGraph.cpp
+++ b/llvm/lib/Analysis/CallGraph.cpp
@@ -311,7 +311,7 @@ bool CallGraphWrapperPass::runOnModule(Module &M) {
INITIALIZE_PASS(CallGraphWrapperPass, "basiccg", "CallGraph Construction",
false, true)
-char CallGraphWrapperPass::ID = 0;
+const char CallGraphWrapperPass::ID = 0;
void CallGraphWrapperPass::releaseMemory() { G.reset(); }
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 1228d5b4b78be..0ece09b16acb4 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -59,7 +59,7 @@ namespace {
class CGPassManager : public ModulePass, public PMDataManager {
public:
- static char ID;
+ static const char ID;
explicit CGPassManager() : ModulePass(ID) {}
@@ -117,7 +117,7 @@ class CGPassManager : public ModulePass, public PMDataManager {
} // end anonymous namespace.
-char CGPassManager::ID = 0;
+const char CGPassManager::ID = 0;
bool CGPassManager::RunPassOnSCC(Pass *P, CallGraphSCC &CurSCC,
CallGraph &CG, bool &CallGraphUpToDate,
@@ -665,7 +665,7 @@ namespace {
raw_ostream &OS; // raw_ostream to print on.
public:
- static char ID;
+ static const char ID;
PrintCallGraphPass(const std::string &B, raw_ostream &OS)
: CallGraphSCCPass(ID), Banner(B), OS(OS) {}
@@ -718,14 +718,14 @@ namespace {
} // end anonymous namespace.
-char PrintCallGraphPass::ID = 0;
+const char PrintCallGraphPass::ID = 0;
Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &OS,
const std::string &Banner) const {
return new PrintCallGraphPass(Banner, OS);
}
-char DummyCGSCCPass::ID = 0;
+const char DummyCGSCCPass::ID = 0;
INITIALIZE_PASS(DummyCGSCCPass, "DummyCGSCCPass", "DummyCGSCCPass", false,
false)
diff --git a/llvm/lib/Analysis/CallPrinter.cpp b/llvm/lib/Analysis/CallPrinter.cpp
index 69df122133b88..29e3d538fec69 100644
--- a/llvm/lib/Analysis/CallPrinter.cpp
+++ b/llvm/lib/Analysis/CallPrinter.cpp
@@ -286,7 +286,7 @@ namespace {
// Viewer
class CallGraphViewer : public ModulePass {
public:
- static char ID;
+ static const char ID;
CallGraphViewer() : ModulePass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -313,7 +313,7 @@ bool CallGraphViewer::runOnModule(Module &M) {
class CallGraphDOTPrinter : public ModulePass {
public:
- static char ID;
+ static const char ID;
CallGraphDOTPrinter() : ModulePass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -338,11 +338,11 @@ bool CallGraphDOTPrinter::runOnModule(Module &M) {
} // end anonymous namespace
-char CallGraphViewer::ID = 0;
+const char CallGraphViewer::ID = 0;
INITIALIZE_PASS(CallGraphViewer, "view-callgraph", "View call graph", false,
false)
-char CallGraphDOTPrinter::ID = 0;
+const char CallGraphDOTPrinter::ID = 0;
INITIALIZE_PASS(CallGraphDOTPrinter, "dot-callgraph",
"Print call graph to 'dot' file", false, false)
diff --git a/llvm/lib/Analysis/CycleAnalysis.cpp b/llvm/lib/Analysis/CycleAnalysis.cpp
index 1e7c5e966babb..f81e0062921eb 100644
--- a/llvm/lib/Analysis/CycleAnalysis.cpp
+++ b/llvm/lib/Analysis/CycleAnalysis.cpp
@@ -50,7 +50,7 @@ PreservedAnalyses CycleInfoVerifierPass::run(Function &F,
//
//===----------------------------------------------------------------------===//
-char CycleInfoWrapperPass::ID = 0;
+const char CycleInfoWrapperPass::ID = 0;
CycleInfoWrapperPass::CycleInfoWrapperPass() : FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/DXILMetadataAnalysis.cpp b/llvm/lib/Analysis/DXILMetadataAnalysis.cpp
index bd77cba385667..cfb8f41e411e4 100644
--- a/llvm/lib/Analysis/DXILMetadataAnalysis.cpp
+++ b/llvm/lib/Analysis/DXILMetadataAnalysis.cpp
@@ -157,4 +157,4 @@ void DXILMetadataAnalysisWrapperPass::dump() const { print(dbgs(), nullptr); }
INITIALIZE_PASS(DXILMetadataAnalysisWrapperPass, "dxil-metadata-analysis",
"DXIL Module Metadata analysis", false, true)
-char DXILMetadataAnalysisWrapperPass::ID = 0;
+const char DXILMetadataAnalysisWrapperPass::ID = 0;
diff --git a/llvm/lib/Analysis/DXILResource.cpp b/llvm/lib/Analysis/DXILResource.cpp
index 033f516abe017..0d78885555050 100644
--- a/llvm/lib/Analysis/DXILResource.cpp
+++ b/llvm/lib/Analysis/DXILResource.cpp
@@ -1130,7 +1130,7 @@ DXILResourceTypeWrapperPass::DXILResourceTypeWrapperPass()
INITIALIZE_PASS(DXILResourceTypeWrapperPass, "dxil-resource-type",
"DXIL Resource Type Analysis", false, true)
-char DXILResourceTypeWrapperPass::ID = 0;
+const char DXILResourceTypeWrapperPass::ID = 0;
ModulePass *llvm::createDXILResourceTypeWrapperPassPass() {
return new DXILResourceTypeWrapperPass();
@@ -1171,7 +1171,7 @@ void DXILResourceWrapperPass::dump() const { print(dbgs(), nullptr); }
INITIALIZE_PASS(DXILResourceWrapperPass, "dxil-resources",
"DXIL Resources Analysis", false, true)
-char DXILResourceWrapperPass::ID = 0;
+const char DXILResourceWrapperPass::ID = 0;
ModulePass *llvm::createDXILResourceWrapperPassPass() {
return new DXILResourceWrapperPass();
@@ -1201,7 +1201,7 @@ void DXILResourceBindingWrapperPass::releaseMemory() { BindingInfo.reset(); }
INITIALIZE_PASS(DXILResourceBindingWrapperPass, "dxil-resource-binding",
"DXIL Resource Binding Analysis", false, true)
-char DXILResourceBindingWrapperPass::ID = 0;
+const char DXILResourceBindingWrapperPass::ID = 0;
ModulePass *llvm::createDXILResourceBindingWrapperPassPass() {
return new DXILResourceWrapperPass();
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index 51d0c32149330..6af05e7017e43 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -188,7 +188,7 @@ INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
INITIALIZE_PASS_END(DependenceAnalysisWrapperPass, "da", "Dependence Analysis",
true, true)
-char DependenceAnalysisWrapperPass::ID = 0;
+const char DependenceAnalysisWrapperPass::ID = 0;
DependenceAnalysisWrapperPass::DependenceAnalysisWrapperPass()
: FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/DomPrinter.cpp b/llvm/lib/Analysis/DomPrinter.cpp
index 892f664a4e096..0d52f7d7ab7e4 100644
--- a/llvm/lib/Analysis/DomPrinter.cpp
+++ b/llvm/lib/Analysis/DomPrinter.cpp
@@ -52,7 +52,7 @@ struct DomViewerWrapperPass
: public DOTGraphTraitsViewerWrapperPass<
DominatorTreeWrapperPass, false, DominatorTree *,
LegacyDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
DomViewerWrapperPass()
: DOTGraphTraitsViewerWrapperPass<
DominatorTreeWrapperPass, false, DominatorTree *,
@@ -63,7 +63,7 @@ struct DomOnlyViewerWrapperPass
: public DOTGraphTraitsViewerWrapperPass<
DominatorTreeWrapperPass, true, DominatorTree *,
LegacyDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
DomOnlyViewerWrapperPass()
: DOTGraphTraitsViewerWrapperPass<
DominatorTreeWrapperPass, true, DominatorTree *,
@@ -80,7 +80,7 @@ struct PostDomViewerWrapperPass
: public DOTGraphTraitsViewerWrapperPass<
PostDominatorTreeWrapperPass, false, PostDominatorTree *,
LegacyPostDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
PostDomViewerWrapperPass()
: DOTGraphTraitsViewerWrapperPass<
PostDominatorTreeWrapperPass, false, PostDominatorTree *,
@@ -92,7 +92,7 @@ struct PostDomOnlyViewerWrapperPass
: public DOTGraphTraitsViewerWrapperPass<
PostDominatorTreeWrapperPass, true, PostDominatorTree *,
LegacyPostDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
PostDomOnlyViewerWrapperPass()
: DOTGraphTraitsViewerWrapperPass<
PostDominatorTreeWrapperPass, true, PostDominatorTree *,
@@ -101,20 +101,20 @@ struct PostDomOnlyViewerWrapperPass
};
} // end anonymous namespace
-char DomViewerWrapperPass::ID = 0;
+const char DomViewerWrapperPass::ID = 0;
INITIALIZE_PASS(DomViewerWrapperPass, "view-dom",
"View dominance tree of function", false, false)
-char DomOnlyViewerWrapperPass::ID = 0;
+const char DomOnlyViewerWrapperPass::ID = 0;
INITIALIZE_PASS(DomOnlyViewerWrapperPass, "view-dom-only",
"View dominance tree of function (with no function bodies)",
false, false)
-char PostDomViewerWrapperPass::ID = 0;
+const char PostDomViewerWrapperPass::ID = 0;
INITIALIZE_PASS(PostDomViewerWrapperPass, "view-postdom",
"View postdominance tree of function", false, false)
-char PostDomOnlyViewerWrapperPass::ID = 0;
+const char PostDomOnlyViewerWrapperPass::ID = 0;
INITIALIZE_PASS(PostDomOnlyViewerWrapperPass, "view-postdom-only",
"View postdominance tree of function "
"(with no function bodies)",
@@ -125,7 +125,7 @@ struct DomPrinterWrapperPass
: public DOTGraphTraitsPrinterWrapperPass<
DominatorTreeWrapperPass, false, DominatorTree *,
LegacyDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
DomPrinterWrapperPass()
: DOTGraphTraitsPrinterWrapperPass<
DominatorTreeWrapperPass, false, DominatorTree *,
@@ -136,7 +136,7 @@ struct DomOnlyPrinterWrapperPass
: public DOTGraphTraitsPrinterWrapperPass<
DominatorTreeWrapperPass, true, DominatorTree *,
LegacyDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
DomOnlyPrinterWrapperPass()
: DOTGraphTraitsPrinterWrapperPass<
DominatorTreeWrapperPass, true, DominatorTree *,
@@ -147,7 +147,7 @@ struct PostDomPrinterWrapperPass
: public DOTGraphTraitsPrinterWrapperPass<
PostDominatorTreeWrapperPass, false, PostDominatorTree *,
LegacyPostDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
PostDomPrinterWrapperPass()
: DOTGraphTraitsPrinterWrapperPass<
PostDominatorTreeWrapperPass, false, PostDominatorTree *,
@@ -159,7 +159,7 @@ struct PostDomOnlyPrinterWrapperPass
: public DOTGraphTraitsPrinterWrapperPass<
PostDominatorTreeWrapperPass, true, PostDominatorTree *,
LegacyPostDominatorTreeWrapperPassAnalysisGraphTraits> {
- static char ID;
+ static const char ID;
PostDomOnlyPrinterWrapperPass()
: DOTGraphTraitsPrinterWrapperPass<
PostDominatorTreeWrapperPass, true, PostDominatorTree *,
@@ -168,22 +168,22 @@ struct PostDomOnlyPrinterWrapperPass
};
} // end anonymous namespace
-char DomPrinterWrapperPass::ID = 0;
+const char DomPrinterWrapperPass::ID = 0;
INITIALIZE_PASS(DomPrinterWrapperPass, "dot-dom",
"Print dominance tree of function to 'dot' file", false, false)
-char DomOnlyPrinterWrapperPass::ID = 0;
+const char DomOnlyPrinterWrapperPass::ID = 0;
INITIALIZE_PASS(DomOnlyPrinterWrapperPass, "dot-dom-only",
"Print dominance tree of function to 'dot' file "
"(with no function bodies)",
false, false)
-char PostDomPrinterWrapperPass::ID = 0;
+const char PostDomPrinterWrapperPass::ID = 0;
INITIALIZE_PASS(PostDomPrinterWrapperPass, "dot-postdom",
"Print postdominance tree of function to 'dot' file", false,
false)
-char PostDomOnlyPrinterWrapperPass::ID = 0;
+const char PostDomOnlyPrinterWrapperPass::ID = 0;
INITIALIZE_PASS(PostDomOnlyPrinterWrapperPass, "dot-postdom-only",
"Print postdominance tree of function to 'dot' file "
"(with no function bodies)",
diff --git a/llvm/lib/Analysis/DominanceFrontier.cpp b/llvm/lib/Analysis/DominanceFrontier.cpp
index b7396a17f35d2..8f0ac693d63b7 100644
--- a/llvm/lib/Analysis/DominanceFrontier.cpp
+++ b/llvm/lib/Analysis/DominanceFrontier.cpp
@@ -27,7 +27,7 @@ template class ForwardDominanceFrontierBase<BasicBlock>;
} // end namespace llvm
-char DominanceFrontierWrapperPass::ID = 0;
+const char DominanceFrontierWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(DominanceFrontierWrapperPass, "domfrontier",
"Dominance Frontier Construction", true, true)
diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp
index 295e267848b23..569c27eb8bf71 100644
--- a/llvm/lib/Analysis/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/GlobalsModRef.cpp
@@ -1036,7 +1036,7 @@ PreservedAnalyses RecomputeGlobalsAAPass::run(Module &M,
return PreservedAnalyses::all();
}
-char GlobalsAAWrapperPass::ID = 0;
+const char GlobalsAAWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(GlobalsAAWrapperPass, "globals-aa",
"Globals Alias Analysis", false, true)
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
diff --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
index 930b2068b3b0f..73117a932af60 100644
--- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
+++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
@@ -1527,4 +1527,4 @@ IRSimilarityAnalysisPrinterPass::run(Module &M, ModuleAnalysisManager &AM) {
return PreservedAnalyses::all();
}
-char IRSimilarityIdentifierWrapperPass::ID = 0;
+const char IRSimilarityIdentifierWrapperPass::ID = 0;
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp
index fb7778e9ef153..778af69a4ae27 100644
--- a/llvm/lib/Analysis/IVUsers.cpp
+++ b/llvm/lib/Analysis/IVUsers.cpp
@@ -38,7 +38,7 @@ IVUsers IVUsersAnalysis::run(Loop &L, LoopAnalysisManager &AM,
return IVUsers(&L, &AR.AC, &AR.LI, &AR.DT, &AR.SE);
}
-char IVUsersWrapperPass::ID = 0;
+const char IVUsersWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(IVUsersWrapperPass, "iv-users",
"Induction Variable Users", false, true)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
diff --git a/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp b/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp
index ac1072843fd7f..eb820fac4f582 100644
--- a/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp
+++ b/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp
@@ -30,7 +30,7 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
INITIALIZE_PASS_END(LazyBlockFrequencyInfoPass, DEBUG_TYPE,
"Lazy Block Frequency Analysis", true, true)
-char LazyBlockFrequencyInfoPass::ID = 0;
+const char LazyBlockFrequencyInfoPass::ID = 0;
LazyBlockFrequencyInfoPass::LazyBlockFrequencyInfoPass() : FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp b/llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp
index 7297905a85f60..f5c37d6df9241 100644
--- a/llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp
@@ -30,7 +30,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
INITIALIZE_PASS_END(LazyBranchProbabilityInfoPass, DEBUG_TYPE,
"Lazy Branch Probability Analysis", true, true)
-char LazyBranchProbabilityInfoPass::ID = 0;
+const char LazyBranchProbabilityInfoPass::ID = 0;
LazyBranchProbabilityInfoPass::LazyBranchProbabilityInfoPass()
: FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index b4d64536a5aca..6c4c612ce9691 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -51,7 +51,7 @@ using namespace PatternMatch;
// answer for a given value.
static const unsigned MaxProcessedPerValue = 500;
-char LazyValueInfoWrapperPass::ID = 0;
+const char LazyValueInfoWrapperPass::ID = 0;
LazyValueInfoWrapperPass::LazyValueInfoWrapperPass() : FunctionPass(ID) {}
INITIALIZE_PASS_BEGIN(LazyValueInfoWrapperPass, "lazy-value-info",
"Lazy Value Information Analysis", false, true)
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index a364b21c64b01..4e1221262fe4e 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -1212,7 +1212,7 @@ MDNode *llvm::makePostTransformationMetadata(LLVMContext &Context,
LoopInfoWrapperPass::LoopInfoWrapperPass() : FunctionPass(ID) {}
-char LoopInfoWrapperPass::ID = 0;
+const char LoopInfoWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(LoopInfoWrapperPass, "loops", "Natural Loop Information",
true, true)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index d8680aac74b22..5972a3dabe78c 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -38,7 +38,7 @@ class PrintLoopPassWrapper : public LoopPass {
std::string Banner;
public:
- static char ID;
+ static const char ID;
PrintLoopPassWrapper() : LoopPass(ID), OS(dbgs()) {}
PrintLoopPassWrapper(raw_ostream &OS, const std::string &Banner)
: LoopPass(ID), OS(OS), Banner(Banner) {}
@@ -59,14 +59,14 @@ class PrintLoopPassWrapper : public LoopPass {
StringRef getPassName() const override { return "Print Loop IR"; }
};
-char PrintLoopPassWrapper::ID = 0;
+const char PrintLoopPassWrapper::ID = 0;
} // namespace
//===----------------------------------------------------------------------===//
// LPPassManager
//
-char LPPassManager::ID = 0;
+const char LPPassManager::ID = 0;
LPPassManager::LPPassManager() : FunctionPass(ID) {
LI = nullptr;
@@ -390,6 +390,6 @@ bool LoopPass::skipLoop(const Loop *L) const {
LCSSAVerificationPass::LCSSAVerificationPass() : FunctionPass(ID) {}
-char LCSSAVerificationPass::ID = 0;
+const char LCSSAVerificationPass::ID = 0;
INITIALIZE_PASS(LCSSAVerificationPass, "lcssa-verification", "LCSSA Verifier",
false, false)
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 9a022d9ed09ce..509ed9b45659d 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -1722,7 +1722,7 @@ MemoryDependenceAnalysis::run(Function &F, FunctionAnalysisManager &AM) {
return MemoryDependenceResults(AA, AC, TLI, DT, DefaultBlockScanLimit);
}
-char MemoryDependenceWrapperPass::ID = 0;
+const char MemoryDependenceWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(MemoryDependenceWrapperPass, "memdep",
"Memory Dependence Analysis", false, true)
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 0b2e3fcfd76df..71ab32e04b3ee 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -2412,7 +2412,7 @@ PreservedAnalyses MemorySSAVerifierPass::run(Function &F,
return PreservedAnalyses::all();
}
-char MemorySSAWrapperPass::ID = 0;
+const char MemorySSAWrapperPass::ID = 0;
MemorySSAWrapperPass::MemorySSAWrapperPass() : FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index 069f4ae1790b1..8b2099c7fc8cc 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -1169,7 +1169,7 @@ ModuleSummaryIndexAnalysis::run(Module &M, ModuleAnalysisManager &AM) {
});
}
-char ModuleSummaryIndexWrapperPass::ID = 0;
+const char ModuleSummaryIndexWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(ModuleSummaryIndexWrapperPass, "module-summary-analysis",
"Module Summary Analysis", false, true)
@@ -1218,7 +1218,7 @@ void ModuleSummaryIndexWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<StackSafetyInfoWrapperPass>();
}
-char ImmutableModuleSummaryIndexWrapperPass::ID = 0;
+const char ImmutableModuleSummaryIndexWrapperPass::ID = 0;
ImmutableModuleSummaryIndexWrapperPass::ImmutableModuleSummaryIndexWrapperPass(
const ModuleSummaryIndex *Index)
diff --git a/llvm/lib/Analysis/OptimizationRemarkEmitter.cpp b/llvm/lib/Analysis/OptimizationRemarkEmitter.cpp
index fbb5971e10750..25e73727fc54c 100644
--- a/llvm/lib/Analysis/OptimizationRemarkEmitter.cpp
+++ b/llvm/lib/Analysis/OptimizationRemarkEmitter.cpp
@@ -144,7 +144,7 @@ OptimizationRemarkEmitterAnalysis::run(Function &F,
return OptimizationRemarkEmitter(&F, BFI);
}
-char OptimizationRemarkEmitterWrapperPass::ID = 0;
+const char OptimizationRemarkEmitterWrapperPass::ID = 0;
static const char ore_name[] = "Optimization Remark Emitter";
#define ORE_NAME "opt-remark-emitter"
diff --git a/llvm/lib/Analysis/PhiValues.cpp b/llvm/lib/Analysis/PhiValues.cpp
index ee1363f485f6e..0d324793773ad 100644
--- a/llvm/lib/Analysis/PhiValues.cpp
+++ b/llvm/lib/Analysis/PhiValues.cpp
@@ -220,7 +220,7 @@ void PhiValuesWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
}
-char PhiValuesWrapperPass::ID = 0;
+const char PhiValuesWrapperPass::ID = 0;
INITIALIZE_PASS(PhiValuesWrapperPass, "phi-values", "Phi Values Analysis", false,
true)
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp
index c71eb418c0353..d52d1e2e22716 100644
--- a/llvm/lib/Analysis/PostDominators.cpp
+++ b/llvm/lib/Analysis/PostDominators.cpp
@@ -32,7 +32,7 @@ static constexpr bool ExpensiveChecksEnabled = false;
// PostDominatorTree Implementation
//===----------------------------------------------------------------------===//
-char PostDominatorTreeWrapperPass::ID = 0;
+const char PostDominatorTreeWrapperPass::ID = 0;
PostDominatorTreeWrapperPass::PostDominatorTreeWrapperPass()
: FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp
index 44d7a175cc7fe..c9ea11ac8ca5c 100644
--- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp
+++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp
@@ -276,4 +276,4 @@ PreservedAnalyses ProfileSummaryPrinterPass::run(Module &M,
return PreservedAnalyses::all();
}
-char ProfileSummaryInfoWrapperPass::ID = 0;
+const char ProfileSummaryInfoWrapperPass::ID = 0;
diff --git a/llvm/lib/Analysis/RegionInfo.cpp b/llvm/lib/Analysis/RegionInfo.cpp
index a0177b0c8810c..bebadc718277f 100644
--- a/llvm/lib/Analysis/RegionInfo.cpp
+++ b/llvm/lib/Analysis/RegionInfo.cpp
@@ -156,7 +156,7 @@ LLVM_DUMP_METHOD void RegionInfoPass::dump() const {
}
#endif
-char RegionInfoPass::ID = 0;
+const char RegionInfoPass::ID = 0;
INITIALIZE_PASS_BEGIN(RegionInfoPass, "regions",
"Detect single entry single exit regions", true, true)
diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp
index ae1d84659de86..6e22b83439fd4 100644
--- a/llvm/lib/Analysis/RegionPass.cpp
+++ b/llvm/lib/Analysis/RegionPass.cpp
@@ -30,7 +30,7 @@ using namespace llvm;
// RGPassManager
//
-char RGPassManager::ID = 0;
+const char RGPassManager::ID = 0;
RGPassManager::RGPassManager() : FunctionPass(ID) {
RI = nullptr;
@@ -180,7 +180,7 @@ class PrintRegionPass : public RegionPass {
raw_ostream &Out; // raw_ostream to print on.
public:
- static char ID;
+ static const char ID;
PrintRegionPass(const std::string &B, raw_ostream &o)
: RegionPass(ID), Banner(B), Out(o) {}
@@ -205,7 +205,7 @@ class PrintRegionPass : public RegionPass {
StringRef getPassName() const override { return "Print Region IR"; }
};
-char PrintRegionPass::ID = 0;
+const char PrintRegionPass::ID = 0;
} //end anonymous namespace
//===----------------------------------------------------------------------===//
diff --git a/llvm/lib/Analysis/RegionPrinter.cpp b/llvm/lib/Analysis/RegionPrinter.cpp
index 33e073b55d59c..04704b3298cf2 100644
--- a/llvm/lib/Analysis/RegionPrinter.cpp
+++ b/llvm/lib/Analysis/RegionPrinter.cpp
@@ -137,45 +137,45 @@ struct RegionInfoPassGraphTraits {
struct RegionPrinter
: public DOTGraphTraitsPrinterWrapperPass<
RegionInfoPass, false, RegionInfo *, RegionInfoPassGraphTraits> {
- static char ID;
+ static const char ID;
RegionPrinter()
: DOTGraphTraitsPrinterWrapperPass<RegionInfoPass, false, RegionInfo *,
RegionInfoPassGraphTraits>("reg", ID) {
}
};
-char RegionPrinter::ID = 0;
+const char RegionPrinter::ID = 0;
struct RegionOnlyPrinter
: public DOTGraphTraitsPrinterWrapperPass<
RegionInfoPass, true, RegionInfo *, RegionInfoPassGraphTraits> {
- static char ID;
+ static const char ID;
RegionOnlyPrinter()
: DOTGraphTraitsPrinterWrapperPass<RegionInfoPass, true, RegionInfo *,
RegionInfoPassGraphTraits>("reg", ID) {
}
};
-char RegionOnlyPrinter::ID = 0;
+const char RegionOnlyPrinter::ID = 0;
struct RegionViewer
: public DOTGraphTraitsViewerWrapperPass<
RegionInfoPass, false, RegionInfo *, RegionInfoPassGraphTraits> {
- static char ID;
+ static const char ID;
RegionViewer()
: DOTGraphTraitsViewerWrapperPass<RegionInfoPass, false, RegionInfo *,
RegionInfoPassGraphTraits>("reg", ID) {}
};
-char RegionViewer::ID = 0;
+const char RegionViewer::ID = 0;
struct RegionOnlyViewer
: public DOTGraphTraitsViewerWrapperPass<RegionInfoPass, true, RegionInfo *,
RegionInfoPassGraphTraits> {
- static char ID;
+ static const char ID;
RegionOnlyViewer()
: DOTGraphTraitsViewerWrapperPass<RegionInfoPass, true, RegionInfo *,
RegionInfoPassGraphTraits>("regonly",
ID) {}
};
-char RegionOnlyViewer::ID = 0;
+const char RegionOnlyViewer::ID = 0;
} //end anonymous namespace
diff --git a/llvm/lib/Analysis/RuntimeLibcallInfo.cpp b/llvm/lib/Analysis/RuntimeLibcallInfo.cpp
index 1c5a1cc75b7bd..89231fa4e149b 100644
--- a/llvm/lib/Analysis/RuntimeLibcallInfo.cpp
+++ b/llvm/lib/Analysis/RuntimeLibcallInfo.cpp
@@ -42,7 +42,7 @@ RuntimeLibraryInfoWrapper::RuntimeLibraryInfoWrapper(
: ImmutablePass(ID), RTLCI(std::in_place, TT, ExceptionModel, FloatABI,
EABIVersion, ABIName, VecLib) {}
-char RuntimeLibraryInfoWrapper::ID = 0;
+const char RuntimeLibraryInfoWrapper::ID = 0;
ModulePass *llvm::createRuntimeLibraryInfoWrapperPass() {
return new RuntimeLibraryInfoWrapper();
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 0603b9feaa860..dbb46d919b10d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -14859,7 +14859,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
INITIALIZE_PASS_END(ScalarEvolutionWrapperPass, "scalar-evolution",
"Scalar Evolution Analysis", false, true)
-char ScalarEvolutionWrapperPass::ID = 0;
+const char ScalarEvolutionWrapperPass::ID = 0;
ScalarEvolutionWrapperPass::ScalarEvolutionWrapperPass() : FunctionPass(ID) {}
diff --git a/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp b/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
index ee5480c460836..f175b3abb1ac7 100644
--- a/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
@@ -155,7 +155,7 @@ SCEVAAResult SCEVAA::run(Function &F, FunctionAnalysisManager &AM) {
return SCEVAAResult(AM.getResult<ScalarEvolutionAnalysis>(F));
}
-char SCEVAAWrapperPass::ID = 0;
+const char SCEVAAWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(SCEVAAWrapperPass, "scev-aa",
"ScalarEvolution-based Alias Analysis", false, true)
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
index d24ad0255256c..382e7d67bfd0e 100644
--- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp
+++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
@@ -161,7 +161,7 @@ ScopedNoAliasAAResult ScopedNoAliasAA::run(Function &F,
return ScopedNoAliasAAResult();
}
-char ScopedNoAliasAAWrapperPass::ID = 0;
+const char ScopedNoAliasAAWrapperPass::ID = 0;
INITIALIZE_PASS(ScopedNoAliasAAWrapperPass, "scoped-noalias-aa",
"Scoped NoAlias Alias Analysis", false, true)
diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index fbe74d21c7199..3ec59c76e9f0d 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -1045,7 +1045,7 @@ PreservedAnalyses StackSafetyPrinterPass::run(Function &F,
return PreservedAnalyses::all();
}
-char StackSafetyInfoWrapperPass::ID = 0;
+const char StackSafetyInfoWrapperPass::ID = 0;
StackSafetyInfoWrapperPass::StackSafetyInfoWrapperPass() : FunctionPass(ID) {}
@@ -1085,7 +1085,7 @@ PreservedAnalyses StackSafetyGlobalPrinterPass::run(Module &M,
return PreservedAnalyses::all();
}
-char StackSafetyGlobalInfoWrapperPass::ID = 0;
+const char StackSafetyGlobalInfoWrapperPass::ID = 0;
StackSafetyGlobalInfoWrapperPass::StackSafetyGlobalInfoWrapperPass()
: ModulePass(ID) {}
diff --git a/llvm/lib/Analysis/StaticDataProfileInfo.cpp b/llvm/lib/Analysis/StaticDataProfileInfo.cpp
index 61d49350c7702..dd7f68f3568d8 100644
--- a/llvm/lib/Analysis/StaticDataProfileInfo.cpp
+++ b/llvm/lib/Analysis/StaticDataProfileInfo.cpp
@@ -190,4 +190,4 @@ INITIALIZE_PASS(StaticDataProfileInfoWrapperPass, "static-data-profile-info",
StaticDataProfileInfoWrapperPass::StaticDataProfileInfoWrapperPass()
: ImmutablePass(ID) {}
-char StaticDataProfileInfoWrapperPass::ID = 0;
+const char StaticDataProfileInfoWrapperPass::ID = 0;
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 51b1f5874bcb6..e802577953186 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -1487,7 +1487,7 @@ AnalysisKey TargetLibraryAnalysis::Key;
// Register the basic pass.
INITIALIZE_PASS(TargetLibraryInfoWrapperPass, "targetlibinfo",
"Target Library Information", false, true)
-char TargetLibraryInfoWrapperPass::ID = 0;
+const char TargetLibraryInfoWrapperPass::ID = 0;
void TargetLibraryInfoWrapperPass::anchor() {}
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 19785204ed2b3..426b616d72e80 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -1561,7 +1561,7 @@ TargetIRAnalysis::Result TargetIRAnalysis::getDefaultTTI(const Function &F) {
// Register the basic pass.
INITIALIZE_PASS(TargetTransformInfoWrapperPass, "tti",
"Target Transform Information", false, true)
-char TargetTransformInfoWrapperPass::ID = 0;
+const char TargetTransformInfoWrapperPass::ID = 0;
void TargetTransformInfoWrapperPass::anchor() {}
diff --git a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
index c7d263a75b33a..7f61c445a69f0 100644
--- a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
@@ -739,7 +739,7 @@ TypeBasedAAResult TypeBasedAA::run(Function &F, FunctionAnalysisManager &AM) {
return TypeBasedAAResult(F.hasFnAttribute(Attribute::SanitizeType));
}
-char TypeBasedAAWrapperPass::ID = 0;
+const char TypeBasedAAWrapperPass::ID = 0;
INITIALIZE_PASS(TypeBasedAAWrapperPass, "tbaa", "Type-Based Alias Analysis",
false, true)
diff --git a/llvm/lib/Analysis/UniformityAnalysis.cpp b/llvm/lib/Analysis/UniformityAnalysis.cpp
index b56534935d7c2..0e6b350759f39 100644
--- a/llvm/lib/Analysis/UniformityAnalysis.cpp
+++ b/llvm/lib/Analysis/UniformityAnalysis.cpp
@@ -148,7 +148,7 @@ PreservedAnalyses UniformityInfoPrinterPass::run(Function &F,
// UniformityInfoWrapperPass Implementation
//===----------------------------------------------------------------------===//
-char UniformityInfoWrapperPass::ID = 0;
+const char UniformityInfoWrapperPass::ID = 0;
UniformityInfoWrapperPass::UniformityInfoWrapperPass() : FunctionPass(ID) {}
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
index e48f735ded831..8d51b4fd80407 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
@@ -35,7 +35,7 @@ namespace {
bool ShouldPreserveUseListOrder;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WriteBitcodePass() : ModulePass(ID), OS(dbgs()) {
initializeWriteBitcodePassPass(*PassRegistry::getPassRegistry());
}
@@ -62,7 +62,7 @@ namespace {
};
}
-char WriteBitcodePass::ID = 0;
+const char WriteBitcodePass::ID = 0;
INITIALIZE_PASS_BEGIN(WriteBitcodePass, "write-bitcode", "Write Bitcode", false,
true)
INITIALIZE_PASS_DEPENDENCY(ModuleSummaryIndexWrapperPass)
diff --git a/llvm/lib/CAS/CASNodeSchema.cpp b/llvm/lib/CAS/CASNodeSchema.cpp
index 16a3ea8af97d8..965b245d87dca 100644
--- a/llvm/lib/CAS/CASNodeSchema.cpp
+++ b/llvm/lib/CAS/CASNodeSchema.cpp
@@ -11,5 +11,5 @@
using namespace llvm;
using namespace llvm::cas;
-char NodeSchema::ID = 0;
+const char NodeSchema::ID = 0;
void NodeSchema::anchor() {}
diff --git a/llvm/lib/CAS/NamedValuesSchema.cpp b/llvm/lib/CAS/NamedValuesSchema.cpp
index 5c6886162c043..faa26b7b19658 100644
--- a/llvm/lib/CAS/NamedValuesSchema.cpp
+++ b/llvm/lib/CAS/NamedValuesSchema.cpp
@@ -14,7 +14,7 @@
using namespace llvm;
using namespace llvm::cas;
-char NamedValuesSchema::ID = 0;
+const char NamedValuesSchema::ID = 0;
constexpr StringLiteral NamedValuesSchema::SchemaName;
void NamedValuesSchema::anchor() {}
diff --git a/llvm/lib/CGData/CodeGenData.cpp b/llvm/lib/CGData/CodeGenData.cpp
index 7900dc7653c03..5c0b5affe46e8 100644
--- a/llvm/lib/CGData/CodeGenData.cpp
+++ b/llvm/lib/CGData/CodeGenData.cpp
@@ -100,7 +100,7 @@ std::string CGDataError::message() const {
return getCGDataErrString(Err, Msg);
}
-char CGDataError::ID = 0;
+const char CGDataError::ID = 0;
namespace {
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index d968ead83e5ed..b894a851e26de 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -201,7 +201,7 @@ extern cl::opt<bool> EmitBBHash;
STATISTIC(EmittedInsts, "Number of machine instrs printed");
-char AsmPrinter::ID = 0;
+const char AsmPrinter::ID = 0;
namespace {
class AddrLabelMapCallbackPtr final : CallbackVH {
@@ -406,7 +406,7 @@ Align AsmPrinter::getGVAlignment(const GlobalObject *GV, const DataLayout &DL,
}
AsmPrinter::AsmPrinter(TargetMachine &tm, std::unique_ptr<MCStreamer> Streamer,
- char &ID)
+ const char &ID)
: MachineFunctionPass(ID), TM(tm), MAI(tm.getMCAsmInfo()),
OutContext(Streamer->getContext()), OutStreamer(std::move(Streamer)),
SM(*this) {
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index 1ca3a2cc6850d..e381e5c87a88e 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -2810,7 +2810,7 @@ bool AssignmentTrackingAnalysis::runOnFunction(Function &F) {
AssignmentTrackingAnalysis::AssignmentTrackingAnalysis()
: FunctionPass(ID), Results(std::make_unique<FunctionVarLocs>()) {}
-char AssignmentTrackingAnalysis::ID = 0;
+const char AssignmentTrackingAnalysis::ID = 0;
INITIALIZE_PASS(AssignmentTrackingAnalysis, DEBUG_TYPE,
"Assignment Tracking Analysis", false, true)
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index 6182c3bbd6a73..9d2974be6abae 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -140,7 +140,7 @@ class AtomicExpandImpl {
class AtomicExpandLegacy : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
AtomicExpandLegacy() : FunctionPass(ID) {}
@@ -179,9 +179,9 @@ struct ReplacementIRBuilder
} // end anonymous namespace
-char AtomicExpandLegacy::ID = 0;
+const char AtomicExpandLegacy::ID = 0;
-char &llvm::AtomicExpandID = AtomicExpandLegacy::ID;
+const char &llvm::AtomicExpandID = AtomicExpandLegacy::ID;
INITIALIZE_PASS_BEGIN(AtomicExpandLegacy, DEBUG_TYPE,
"Expand Atomic instructions", false, false)
diff --git a/llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp b/llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp
index bba4c4a220d9e..af9487df423cc 100644
--- a/llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp
+++ b/llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp
@@ -82,7 +82,7 @@ INITIALIZE_PASS_DEPENDENCY(BasicBlockSectionsProfileReaderWrapperPass)
INITIALIZE_PASS_END(BasicBlockMatchingAndInference, "machine-block-match-infer",
"Machine Block Matching and Inference Analysis", true, true)
-char BasicBlockMatchingAndInference::ID = 0;
+const char BasicBlockMatchingAndInference::ID = 0;
BasicBlockMatchingAndInference::BasicBlockMatchingAndInference()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/BasicBlockPathCloning.cpp b/llvm/lib/CodeGen/BasicBlockPathCloning.cpp
index 6d0d232454994..bf58283a9f9c9 100644
--- a/llvm/lib/CodeGen/BasicBlockPathCloning.cpp
+++ b/llvm/lib/CodeGen/BasicBlockPathCloning.cpp
@@ -210,7 +210,7 @@ bool ApplyCloning(MachineFunction &MF,
class BasicBlockPathCloning : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
BasicBlockSectionsProfileReaderWrapperPass *BBSectionsProfileReader = nullptr;
@@ -227,7 +227,7 @@ class BasicBlockPathCloning : public MachineFunctionPass {
} // namespace
-char BasicBlockPathCloning::ID = 0;
+const char BasicBlockPathCloning::ID = 0;
INITIALIZE_PASS_BEGIN(
BasicBlockPathCloning, "bb-path-cloning",
"Applies path clonings for the -basic-block-sections=list option", false,
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp
index 583e755fc1e15..44d9e6a36e501 100644
--- a/llvm/lib/CodeGen/BasicBlockSections.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSections.cpp
@@ -106,7 +106,7 @@ namespace {
class BasicBlockSections : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
BasicBlockSectionsProfileReaderWrapperPass *BBSectionsProfileReader = nullptr;
@@ -129,7 +129,7 @@ class BasicBlockSections : public MachineFunctionPass {
} // end anonymous namespace
-char BasicBlockSections::ID = 0;
+const char BasicBlockSections::ID = 0;
INITIALIZE_PASS_BEGIN(
BasicBlockSections, "bbsections-prepare",
"Prepares for basic block sections, by splitting functions "
diff --git a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
index 693a9bdf74e60..000a4041378e2 100644
--- a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
@@ -31,7 +31,7 @@
using namespace llvm;
-char BasicBlockSectionsProfileReaderWrapperPass::ID = 0;
+const char BasicBlockSectionsProfileReaderWrapperPass::ID = 0;
INITIALIZE_PASS(BasicBlockSectionsProfileReaderWrapperPass,
"bbsections-profile-reader",
"Reads and parses a basic block sections profile.", false,
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 5a43f4e1ec993..3fb64fcfcd7b3 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -94,7 +94,7 @@ namespace {
/// BranchFolderPass - Wrap branch folder in a machine function pass.
class BranchFolderLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
explicit BranchFolderLegacy() : MachineFunctionPass(ID) {}
@@ -115,9 +115,9 @@ class BranchFolderLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char BranchFolderLegacy::ID = 0;
+const char BranchFolderLegacy::ID = 0;
-char &llvm::BranchFolderPassID = BranchFolderLegacy::ID;
+const char &llvm::BranchFolderPassID = BranchFolderLegacy::ID;
INITIALIZE_PASS(BranchFolderLegacy, DEBUG_TYPE, "Control Flow Optimizer", false,
false)
diff --git a/llvm/lib/CodeGen/BranchRelaxation.cpp b/llvm/lib/CodeGen/BranchRelaxation.cpp
index 455e81d81ade3..52287f2c7c9cc 100644
--- a/llvm/lib/CodeGen/BranchRelaxation.cpp
+++ b/llvm/lib/CodeGen/BranchRelaxation.cpp
@@ -124,7 +124,7 @@ class BranchRelaxation {
class BranchRelaxationLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
BranchRelaxationLegacy() : MachineFunctionPass(ID) {}
@@ -137,9 +137,9 @@ class BranchRelaxationLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char BranchRelaxationLegacy::ID = 0;
+const char BranchRelaxationLegacy::ID = 0;
-char &llvm::BranchRelaxationPassID = BranchRelaxationLegacy::ID;
+const char &llvm::BranchRelaxationPassID = BranchRelaxationLegacy::ID;
INITIALIZE_PASS(BranchRelaxationLegacy, DEBUG_TYPE, BRANCH_RELAX_NAME, false,
false)
diff --git a/llvm/lib/CodeGen/BreakFalseDeps.cpp b/llvm/lib/CodeGen/BreakFalseDeps.cpp
index 9e16897fe7768..bf038c7187ced 100644
--- a/llvm/lib/CodeGen/BreakFalseDeps.cpp
+++ b/llvm/lib/CodeGen/BreakFalseDeps.cpp
@@ -49,7 +49,7 @@ class BreakFalseDeps : public MachineFunctionPass {
ReachingDefInfo *RDI = nullptr;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
BreakFalseDeps() : MachineFunctionPass(ID) {}
@@ -97,7 +97,7 @@ class BreakFalseDeps : public MachineFunctionPass {
#define DEBUG_TYPE "break-false-deps"
-char BreakFalseDeps::ID = 0;
+const char BreakFalseDeps::ID = 0;
INITIALIZE_PASS_BEGIN(BreakFalseDeps, DEBUG_TYPE, "BreakFalseDeps", false, false)
INITIALIZE_PASS_DEPENDENCY(ReachingDefInfoWrapperPass)
INITIALIZE_PASS_END(BreakFalseDeps, DEBUG_TYPE, "BreakFalseDeps", false, false)
diff --git a/llvm/lib/CodeGen/CFGuardLongjmp.cpp b/llvm/lib/CodeGen/CFGuardLongjmp.cpp
index 76dd274b81857..dc2465355cee0 100644
--- a/llvm/lib/CodeGen/CFGuardLongjmp.cpp
+++ b/llvm/lib/CodeGen/CFGuardLongjmp.cpp
@@ -37,7 +37,7 @@ namespace {
/// this in the MachineFunction's LongjmpTargets vector.
class CFGuardLongjmp : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
CFGuardLongjmp() : MachineFunctionPass(ID) {}
@@ -50,7 +50,7 @@ class CFGuardLongjmp : public MachineFunctionPass {
} // end anonymous namespace
-char CFGuardLongjmp::ID = 0;
+const char CFGuardLongjmp::ID = 0;
INITIALIZE_PASS(CFGuardLongjmp, "CFGuardLongjmp",
"Insert symbols at valid longjmp targets for /guard:cf", false,
diff --git a/llvm/lib/CodeGen/CFIFixup.cpp b/llvm/lib/CodeGen/CFIFixup.cpp
index c538acb55049d..ecb1e085ac96b 100644
--- a/llvm/lib/CodeGen/CFIFixup.cpp
+++ b/llvm/lib/CodeGen/CFIFixup.cpp
@@ -88,7 +88,7 @@ using namespace llvm;
#define DEBUG_TYPE "cfi-fixup"
-char CFIFixup::ID = 0;
+const char CFIFixup::ID = 0;
INITIALIZE_PASS(CFIFixup, "cfi-fixup",
"Insert CFI remember/restore state instructions", false, false)
diff --git a/llvm/lib/CodeGen/CFIInstrInserter.cpp b/llvm/lib/CodeGen/CFIInstrInserter.cpp
index 63ecebdff331b..496c916c78201 100644
--- a/llvm/lib/CodeGen/CFIInstrInserter.cpp
+++ b/llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -37,13 +37,13 @@ static cl::opt<bool> VerifyCFI("verify-cfiinstrs",
namespace {
class CFIInstrInserter : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
- CFIInstrInserter() : MachineFunctionPass(ID) {}
+ CFIInstrInserter() : MachineFunctionPass(ID) {}
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.setPreservesAll();
- MachineFunctionPass::getAnalysisUsage(AU);
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.setPreservesAll();
+ MachineFunctionPass::getAnalysisUsage(AU);
}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -197,7 +197,7 @@ class CFIInstrInserter : public MachineFunctionPass {
};
} // namespace
-char CFIInstrInserter::ID = 0;
+const char CFIInstrInserter::ID = 0;
INITIALIZE_PASS(CFIInstrInserter, "cfi-instr-inserter",
"Check CFA info and insert CFI instructions if needed", false,
false)
diff --git a/llvm/lib/CodeGen/CallBrPrepare.cpp b/llvm/lib/CodeGen/CallBrPrepare.cpp
index 77a0d0b653871..f78b6a8bfd2a2 100644
--- a/llvm/lib/CodeGen/CallBrPrepare.cpp
+++ b/llvm/lib/CodeGen/CallBrPrepare.cpp
@@ -68,7 +68,7 @@ class CallBrPrepare : public FunctionPass {
CallBrPrepare() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
@@ -93,7 +93,7 @@ PreservedAnalyses CallBrPreparePass::run(Function &F,
return PA;
}
-char CallBrPrepare::ID = 0;
+const char CallBrPrepare::ID = 0;
INITIALIZE_PASS_BEGIN(CallBrPrepare, "callbrprepare", "Prepare callbr", false,
false)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index bf56ffd3b4b7b..adb189157e77a 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -483,7 +483,7 @@ class CodeGenPrepare {
class CodeGenPrepareLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
CodeGenPrepareLegacyPass() : FunctionPass(ID) {}
@@ -504,7 +504,7 @@ class CodeGenPrepareLegacyPass : public FunctionPass {
} // end anonymous namespace
-char CodeGenPrepareLegacyPass::ID = 0;
+const char CodeGenPrepareLegacyPass::ID = 0;
bool CodeGenPrepareLegacyPass::runOnFunction(Function &F) {
if (skipFunction(F))
diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
index a169eb5e58c02..4658dc5268a04 100644
--- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -155,7 +155,7 @@ std::optional<T> findCommonBetweenCollections(IterT A, IterT B) {
class ComplexDeinterleavingLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
ComplexDeinterleavingLegacyPass(const TargetMachine *TM = nullptr)
: FunctionPass(ID), TM(TM) {}
@@ -521,7 +521,7 @@ class ComplexDeinterleaving {
} // namespace
-char ComplexDeinterleavingLegacyPass::ID = 0;
+const char ComplexDeinterleavingLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ComplexDeinterleavingLegacyPass, DEBUG_TYPE,
"Complex Deinterleaving", false, false)
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
index 8783afadbf097..65c61c3de2de9 100644
--- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
+++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
@@ -43,7 +43,7 @@ class DeadMachineInstructionElimImpl {
class DeadMachineInstructionElim : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
DeadMachineInstructionElim() : MachineFunctionPass(ID) {}
@@ -70,8 +70,8 @@ DeadMachineInstructionElimPass::run(MachineFunction &MF,
return PA;
}
-char DeadMachineInstructionElim::ID = 0;
-char &llvm::DeadMachineInstructionElimID = DeadMachineInstructionElim::ID;
+const char DeadMachineInstructionElim::ID = 0;
+const char &llvm::DeadMachineInstructionElimID = DeadMachineInstructionElim::ID;
INITIALIZE_PASS(DeadMachineInstructionElim, DEBUG_TYPE,
"Remove dead machine instructions", false, false)
diff --git a/llvm/lib/CodeGen/DetectDeadLanes.cpp b/llvm/lib/CodeGen/DetectDeadLanes.cpp
index d2522fd5eb0e3..abfc530f24053 100644
--- a/llvm/lib/CodeGen/DetectDeadLanes.cpp
+++ b/llvm/lib/CodeGen/DetectDeadLanes.cpp
@@ -398,7 +398,7 @@ class DetectDeadLanes {
};
struct DetectDeadLanesLegacy : public MachineFunctionPass {
- static char ID;
+ static const char ID;
DetectDeadLanesLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "Detect Dead Lanes"; }
@@ -415,8 +415,8 @@ struct DetectDeadLanesLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char DetectDeadLanesLegacy::ID = 0;
-char &llvm::DetectDeadLanesID = DetectDeadLanesLegacy::ID;
+const char DetectDeadLanesLegacy::ID = 0;
+const char &llvm::DetectDeadLanesID = DetectDeadLanesLegacy::ID;
INITIALIZE_PASS(DetectDeadLanesLegacy, DEBUG_TYPE, "Detect Dead Lanes", false,
false)
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 8244435bd78d5..fedb90dce8d56 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -336,7 +336,7 @@ class DwarfEHPrepareLegacyPass : public FunctionPass {
CodeGenOptLevel OptLevel;
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
DwarfEHPrepareLegacyPass(CodeGenOptLevel OptLevel = CodeGenOptLevel::Default)
: FunctionPass(ID), OptLevel(OptLevel) {}
@@ -417,7 +417,7 @@ PreservedAnalyses DwarfEHPreparePass::run(Function &F,
return PA;
}
-char DwarfEHPrepareLegacyPass::ID = 0;
+const char DwarfEHPrepareLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(DwarfEHPrepareLegacyPass, DEBUG_TYPE,
"Prepare DWARF exceptions", false, false)
diff --git a/llvm/lib/CodeGen/EHContGuardTargets.cpp b/llvm/lib/CodeGen/EHContGuardTargets.cpp
index 9ad3f671798c9..575bb01cd589a 100644
--- a/llvm/lib/CodeGen/EHContGuardTargets.cpp
+++ b/llvm/lib/CodeGen/EHContGuardTargets.cpp
@@ -35,7 +35,7 @@ namespace {
/// and store these in the MachineFunction's CatchRetTargets vector.
class EHContGuardTargets : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
EHContGuardTargets() : MachineFunctionPass(ID) {}
@@ -48,7 +48,7 @@ class EHContGuardTargets : public MachineFunctionPass {
} // end anonymous namespace
-char EHContGuardTargets::ID = 0;
+const char EHContGuardTargets::ID = 0;
INITIALIZE_PASS(EHContGuardTargets, "EHContGuardTargets",
"Insert symbols at valid targets for /guard:ehcont", false,
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp
index 13f94b527012a..17f076a5365e4 100644
--- a/llvm/lib/CodeGen/EarlyIfConversion.cpp
+++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp
@@ -847,7 +847,7 @@ class EarlyIfConverter {
class EarlyIfConverterLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
EarlyIfConverterLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -855,8 +855,8 @@ class EarlyIfConverterLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char EarlyIfConverterLegacy::ID = 0;
-char &llvm::EarlyIfConverterLegacyID = EarlyIfConverterLegacy::ID;
+const char EarlyIfConverterLegacy::ID = 0;
+const char &llvm::EarlyIfConverterLegacyID = EarlyIfConverterLegacy::ID;
INITIALIZE_PASS_BEGIN(EarlyIfConverterLegacy, DEBUG_TYPE, "Early If Converter",
false, false)
@@ -1357,7 +1357,7 @@ class EarlyIfPredicator : public MachineFunctionPass {
SSAIfConv IfConv;
public:
- static char ID;
+ static const char ID;
EarlyIfPredicator() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -1372,8 +1372,8 @@ class EarlyIfPredicator : public MachineFunctionPass {
#undef DEBUG_TYPE
#define DEBUG_TYPE "early-if-predicator"
-char EarlyIfPredicator::ID = 0;
-char &llvm::EarlyIfPredicatorID = EarlyIfPredicator::ID;
+const char EarlyIfPredicator::ID = 0;
+const char &llvm::EarlyIfPredicatorID = EarlyIfPredicator::ID;
INITIALIZE_PASS_BEGIN(EarlyIfPredicator, DEBUG_TYPE, "Early If Predicator",
false, false)
diff --git a/llvm/lib/CodeGen/EdgeBundles.cpp b/llvm/lib/CodeGen/EdgeBundles.cpp
index 50dd66f256234..b916b8b41b983 100644
--- a/llvm/lib/CodeGen/EdgeBundles.cpp
+++ b/llvm/lib/CodeGen/EdgeBundles.cpp
@@ -26,13 +26,13 @@ static cl::opt<bool>
ViewEdgeBundles("view-edge-bundles", cl::Hidden,
cl::desc("Pop up a window to show edge bundle graphs"));
-char EdgeBundlesWrapperLegacy::ID = 0;
+const char EdgeBundlesWrapperLegacy::ID = 0;
INITIALIZE_PASS(EdgeBundlesWrapperLegacy, "edge-bundles",
"Bundle Machine CFG Edges",
/* cfg = */ true, /* is_analysis = */ true)
-char &llvm::EdgeBundlesWrapperLegacyID = EdgeBundlesWrapperLegacy::ID;
+const char &llvm::EdgeBundlesWrapperLegacyID = EdgeBundlesWrapperLegacy::ID;
void EdgeBundlesWrapperLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
diff --git a/llvm/lib/CodeGen/ExpandIRInsts.cpp b/llvm/lib/CodeGen/ExpandIRInsts.cpp
index af8dc03ff8037..98d92090aee9b 100644
--- a/llvm/lib/CodeGen/ExpandIRInsts.cpp
+++ b/llvm/lib/CodeGen/ExpandIRInsts.cpp
@@ -1143,7 +1143,7 @@ class ExpandIRInstsLegacyPass : public FunctionPass {
CodeGenOptLevel OptLevel;
public:
- static char ID;
+ static const char ID;
ExpandIRInstsLegacyPass(CodeGenOptLevel OptLevel)
: FunctionPass(ID), OptLevel(OptLevel) {}
@@ -1216,7 +1216,7 @@ PreservedAnalyses ExpandIRInstsPass::run(Function &F,
: PreservedAnalyses::all();
}
-char ExpandIRInstsLegacyPass::ID = 0;
+const char ExpandIRInstsLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ExpandIRInstsLegacyPass, "expand-ir-insts",
"Expand certain fp instructions", false, false)
INITIALIZE_PASS_DEPENDENCY(LibcallLoweringInfoWrapper)
diff --git a/llvm/lib/CodeGen/ExpandMemCmp.cpp b/llvm/lib/CodeGen/ExpandMemCmp.cpp
index 7ebfca4aa2b1d..070b0f2d6fc28 100644
--- a/llvm/lib/CodeGen/ExpandMemCmp.cpp
+++ b/llvm/lib/CodeGen/ExpandMemCmp.cpp
@@ -907,7 +907,7 @@ static PreservedAnalyses runImpl(Function &F, const TargetLibraryInfo *TLI,
class ExpandMemCmpLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
ExpandMemCmpLegacyPass() : FunctionPass(ID) {}
@@ -1013,7 +1013,7 @@ PreservedAnalyses ExpandMemCmpPass::run(Function &F,
return runImpl(F, &TLI, &TTI, TL, PSI, BFI, DT);
}
-char ExpandMemCmpLegacyPass::ID = 0;
+const char ExpandMemCmpLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ExpandMemCmpLegacyPass, DEBUG_TYPE,
"Expand memcmp() to load/stores", false, false)
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
diff --git a/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp b/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
index 94e7ee4fa0855..4c82e4e92cefa 100644
--- a/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
+++ b/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
@@ -40,7 +40,7 @@ struct ExpandPostRA {
};
struct ExpandPostRALegacy : public MachineFunctionPass {
- static char ID;
+ static const char ID;
ExpandPostRALegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -67,8 +67,8 @@ ExpandPostRAPseudosPass::run(MachineFunction &MF,
.preserve<MachineDominatorTreeAnalysis>();
}
-char ExpandPostRALegacy::ID = 0;
-char &llvm::ExpandPostRAPseudosID = ExpandPostRALegacy::ID;
+const char ExpandPostRALegacy::ID = 0;
+const char &llvm::ExpandPostRAPseudosID = ExpandPostRALegacy::ID;
INITIALIZE_PASS(ExpandPostRALegacy, DEBUG_TYPE,
"Post-RA pseudo instruction expansion pass", false, false)
diff --git a/llvm/lib/CodeGen/ExpandReductions.cpp b/llvm/lib/CodeGen/ExpandReductions.cpp
index f4a07e1988747..15b93600acab5 100644
--- a/llvm/lib/CodeGen/ExpandReductions.cpp
+++ b/llvm/lib/CodeGen/ExpandReductions.cpp
@@ -155,7 +155,7 @@ bool expandReductions(Function &F, const TargetTransformInfo *TTI) {
class ExpandReductions : public FunctionPass {
public:
- static char ID;
+ static const char ID;
ExpandReductions() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override {
@@ -170,7 +170,7 @@ class ExpandReductions : public FunctionPass {
};
}
-char ExpandReductions::ID;
+const char ExpandReductions::ID = 0;
INITIALIZE_PASS_BEGIN(ExpandReductions, "expand-reductions",
"Expand reduction intrinsics", false, false)
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
diff --git a/llvm/lib/CodeGen/FEntryInserter.cpp b/llvm/lib/CodeGen/FEntryInserter.cpp
index 80639b5f162e1..21763c1192ee2 100644
--- a/llvm/lib/CodeGen/FEntryInserter.cpp
+++ b/llvm/lib/CodeGen/FEntryInserter.cpp
@@ -28,7 +28,7 @@ struct FEntryInserter {
};
struct FEntryInserterLegacy : public MachineFunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
FEntryInserterLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override {
@@ -57,7 +57,7 @@ bool FEntryInserter::run(MachineFunction &MF) {
return true;
}
-char FEntryInserterLegacy::ID = 0;
-char &llvm::FEntryInserterID = FEntryInserterLegacy::ID;
+const char FEntryInserterLegacy::ID = 0;
+const char &llvm::FEntryInserterID = FEntryInserterLegacy::ID;
INITIALIZE_PASS(FEntryInserterLegacy, "fentry-insert", "Insert fentry calls",
false, false)
diff --git a/llvm/lib/CodeGen/FinalizeISel.cpp b/llvm/lib/CodeGen/FinalizeISel.cpp
index 7069a8862b7df..244868e89ddab 100644
--- a/llvm/lib/CodeGen/FinalizeISel.cpp
+++ b/llvm/lib/CodeGen/FinalizeISel.cpp
@@ -29,7 +29,7 @@ using namespace llvm;
namespace {
class FinalizeISel : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
FinalizeISel() : MachineFunctionPass(ID) {}
private:
@@ -79,8 +79,8 @@ static std::pair<bool, bool> runImpl(MachineFunction &MF) {
return {Changed, PreserveCFG};
}
-char FinalizeISel::ID = 0;
-char &llvm::FinalizeISelID = FinalizeISel::ID;
+const char FinalizeISel::ID = 0;
+const char &llvm::FinalizeISelID = FinalizeISel::ID;
INITIALIZE_PASS(FinalizeISel, DEBUG_TYPE,
"Finalize ISel and expand pseudo-instructions", false, false)
diff --git a/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp b/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
index 8d2f9bfb6c5cb..df9392d26646b 100644
--- a/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
+++ b/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
@@ -65,7 +65,7 @@ struct FixupStatepointCallerSavedImpl {
class FixupStatepointCallerSavedLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
FixupStatepointCallerSavedLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -82,8 +82,9 @@ class FixupStatepointCallerSavedLegacy : public MachineFunctionPass {
} // End anonymous namespace.
-char FixupStatepointCallerSavedLegacy::ID = 0;
-char &llvm::FixupStatepointCallerSavedID = FixupStatepointCallerSavedLegacy::ID;
+const char FixupStatepointCallerSavedLegacy::ID = 0;
+const char &llvm::FixupStatepointCallerSavedID =
+ FixupStatepointCallerSavedLegacy::ID;
INITIALIZE_PASS_BEGIN(FixupStatepointCallerSavedLegacy, DEBUG_TYPE,
"Fixup Statepoint Caller Saved", false, false)
diff --git a/llvm/lib/CodeGen/FuncletLayout.cpp b/llvm/lib/CodeGen/FuncletLayout.cpp
index 75839c2511adf..4e96af7d3aa04 100644
--- a/llvm/lib/CodeGen/FuncletLayout.cpp
+++ b/llvm/lib/CodeGen/FuncletLayout.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
namespace {
class FuncletLayout : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
FuncletLayout() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -32,8 +32,8 @@ class FuncletLayout : public MachineFunctionPass {
};
}
-char FuncletLayout::ID = 0;
-char &llvm::FuncletLayoutID = FuncletLayout::ID;
+const char FuncletLayout::ID = 0;
+const char &llvm::FuncletLayoutID = FuncletLayout::ID;
INITIALIZE_PASS(FuncletLayout, DEBUG_TYPE,
"Contiguously Lay Out Funclets", false, false)
diff --git a/llvm/lib/CodeGen/GCEmptyBasicBlocks.cpp b/llvm/lib/CodeGen/GCEmptyBasicBlocks.cpp
index 43d9c06e57939..9a8eb3edfaa23 100644
--- a/llvm/lib/CodeGen/GCEmptyBasicBlocks.cpp
+++ b/llvm/lib/CodeGen/GCEmptyBasicBlocks.cpp
@@ -40,7 +40,7 @@ GCEmptyBasicBlocksPass::run(MachineFunction &MF,
class GCEmptyBasicBlocksLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCEmptyBasicBlocksLegacy() : MachineFunctionPass(ID) {}
@@ -100,7 +100,7 @@ bool removeEmptyBlocks(MachineFunction &MF) {
return NumRemoved != 0;
}
-char GCEmptyBasicBlocksLegacy::ID = 0;
+const char GCEmptyBasicBlocksLegacy::ID = 0;
INITIALIZE_PASS(GCEmptyBasicBlocksLegacy, "gc-empty-basic-blocks",
"Removes empty basic blocks and redirects their uses to their "
"fallthrough blocks.",
diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp
index eb6faf0aa2d2e..68a3e59da56a5 100644
--- a/llvm/lib/CodeGen/GCMetadata.cpp
+++ b/llvm/lib/CodeGen/GCMetadata.cpp
@@ -86,7 +86,7 @@ bool GCFunctionInfo::invalidate(Function &F, const PreservedAnalyses &PA,
// -----------------------------------------------------------------------------
-char GCModuleInfo::ID = 0;
+const char GCModuleInfo::ID = 0;
GCModuleInfo::GCModuleInfo() : ImmutablePass(ID) {}
diff --git a/llvm/lib/CodeGen/GCRootLowering.cpp b/llvm/lib/CodeGen/GCRootLowering.cpp
index c919f3bbac8df..135781feb6570 100644
--- a/llvm/lib/CodeGen/GCRootLowering.cpp
+++ b/llvm/lib/CodeGen/GCRootLowering.cpp
@@ -44,7 +44,7 @@ namespace {
/// and custom intrinsic lowering.
class LowerIntrinsics : public FunctionPass {
public:
- static char ID;
+ static const char ID;
LowerIntrinsics();
StringRef getPassName() const override;
@@ -70,7 +70,7 @@ class GCMachineCodeAnalysis : public MachineFunctionPass {
void FindStackOffsets(MachineFunction &MF);
public:
- static char ID;
+ static const char ID;
GCMachineCodeAnalysis();
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -104,8 +104,8 @@ INITIALIZE_PASS_END(LowerIntrinsics, "gc-lowering", "GC Lowering", false, false)
FunctionPass *llvm::createGCLoweringPass() { return new LowerIntrinsics(); }
-char LowerIntrinsics::ID = 0;
-char &llvm::GCLoweringID = LowerIntrinsics::ID;
+const char LowerIntrinsics::ID = 0;
+const char &llvm::GCLoweringID = LowerIntrinsics::ID;
LowerIntrinsics::LowerIntrinsics() : FunctionPass(ID) {}
@@ -249,8 +249,8 @@ bool DoLowering(Function &F, GCStrategy &S) {
// -----------------------------------------------------------------------------
-char GCMachineCodeAnalysis::ID = 0;
-char &llvm::GCMachineCodeAnalysisID = GCMachineCodeAnalysis::ID;
+const char GCMachineCodeAnalysis::ID = 0;
+const char &llvm::GCMachineCodeAnalysisID = GCMachineCodeAnalysis::ID;
INITIALIZE_PASS(GCMachineCodeAnalysis, "gc-analysis",
"Analyze Machine Code For Garbage Collection", false, false)
diff --git a/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp b/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
index d8bb6700188d4..474e773fffdb5 100644
--- a/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
@@ -16,7 +16,7 @@
#define DEBUG_TYPE "cseinfo"
using namespace llvm;
-char llvm::GISelCSEAnalysisWrapperPass::ID = 0;
+const char llvm::GISelCSEAnalysisWrapperPass::ID = 0;
GISelCSEAnalysisWrapperPass::GISelCSEAnalysisWrapperPass()
: MachineFunctionPass(ID) {}
INITIALIZE_PASS(GISelCSEAnalysisWrapperPass, DEBUG_TYPE,
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
index 34692f0b4c4ee..3d0733d1fc27a 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
@@ -44,7 +44,7 @@
using namespace llvm;
using namespace MIPatternMatch;
-char llvm::GISelValueTrackingAnalysisLegacy::ID = 0;
+const char llvm::GISelValueTrackingAnalysisLegacy::ID = 0;
INITIALIZE_PASS(GISelValueTrackingAnalysisLegacy, DEBUG_TYPE,
"Analysis for ComputingKnownBits", false, true)
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 126199849b033..bf49bc558768e 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -98,7 +98,7 @@ static cl::opt<bool>
EnableCSEInIRTranslator("enable-cse-in-irtranslator",
cl::desc("Should enable CSE in irtranslator"),
cl::Optional, cl::init(false));
-char IRTranslator::ID = 0;
+const char IRTranslator::ID = 0;
INITIALIZE_PASS_BEGIN(IRTranslator, DEBUG_TYPE, "IRTranslator LLVM IR -> MI",
false, false)
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
index 5fb31a04e5fd0..0bb18a33468fb 100644
--- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
@@ -51,7 +51,7 @@ static cl::opt<std::string>
static const std::string CoveragePrefix;
#endif
-char InstructionSelect::ID = 0;
+const char InstructionSelect::ID = 0;
INITIALIZE_PASS_BEGIN(InstructionSelect, DEBUG_TYPE,
"Select target instructions out of generic instructions",
false, false)
@@ -63,7 +63,7 @@ INITIALIZE_PASS_END(InstructionSelect, DEBUG_TYPE,
"Select target instructions out of generic instructions",
false, false)
-InstructionSelect::InstructionSelect(CodeGenOptLevel OL, char &PassID)
+InstructionSelect::InstructionSelect(CodeGenOptLevel OL, const char &PassID)
: MachineFunctionPass(PassID), OptLevel(OL) {}
/// This class observes instruction insertions/removals.
diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
index 711f7a0b5c35b..979de029aca17 100644
--- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
@@ -69,7 +69,7 @@ static cl::opt<DebugLocVerifyLevel> VerifyDebugLocs(
static const DebugLocVerifyLevel VerifyDebugLocs = DebugLocVerifyLevel::None;
#endif
-char Legalizer::ID = 0;
+const char Legalizer::ID = 0;
INITIALIZE_PASS_BEGIN(Legalizer, DEBUG_TYPE,
"Legalize the Machine IR a function's Machine IR", false,
false)
diff --git a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
index 1dbba820b3dea..24b6a0dc60459 100644
--- a/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
@@ -47,7 +47,7 @@ STATISTIC(NumStoresMerged, "Number of stores merged");
const unsigned MaxStoreSizeToForm = 128;
-char LoadStoreOpt::ID = 0;
+const char LoadStoreOpt::ID = 0;
INITIALIZE_PASS_BEGIN(LoadStoreOpt, DEBUG_TYPE, "Generic memory optimizations",
false, false)
INITIALIZE_PASS_END(LoadStoreOpt, DEBUG_TYPE, "Generic memory optimizations",
diff --git a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp
index 77ca27bcc43e2..2e39364bc5599 100644
--- a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp
@@ -24,7 +24,7 @@
using namespace llvm;
-char Localizer::ID = 0;
+const char Localizer::ID = 0;
INITIALIZE_PASS_BEGIN(Localizer, DEBUG_TYPE,
"Move/duplicate certain instructions close to their use",
false, false)
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index 5db631be32acd..1419adb2cf21f 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -58,7 +58,7 @@ static cl::opt<RegBankSelect::Mode> RegBankSelectMode(
clEnumValN(RegBankSelect::Mode::Greedy, "regbankselect-greedy",
"Use the Greedy mode (best local mapping)")));
-char RegBankSelect::ID = 0;
+const char RegBankSelect::ID = 0;
INITIALIZE_PASS_BEGIN(RegBankSelect, DEBUG_TYPE,
"Assign register bank of generic virtual registers",
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 37f0bcdee10db..722226a6a8dc1 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/lib/CodeGen/GlobalMerge.cpp
@@ -194,7 +194,7 @@ class GlobalMerge : public FunctionPass {
GlobalMergeOptions Opt;
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
explicit GlobalMerge() : FunctionPass(ID) {
Opt.MaxOffset = GlobalMergeMaxOffset;
@@ -253,7 +253,7 @@ PreservedAnalyses GlobalMergePass::run(Module &M, ModuleAnalysisManager &) {
return PA;
}
-char GlobalMerge::ID = 0;
+const char GlobalMerge::ID = 0;
INITIALIZE_PASS(GlobalMerge, DEBUG_TYPE, "Merge global variables", false, false)
diff --git a/llvm/lib/CodeGen/GlobalMergeFunctions.cpp b/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
index 81ab317c15889..b5b7d6500213a 100644
--- a/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
+++ b/llvm/lib/CodeGen/GlobalMergeFunctions.cpp
@@ -569,7 +569,7 @@ namespace {
class GlobalMergeFuncPassWrapper : public ModulePass {
public:
- static char ID;
+ static const char ID;
GlobalMergeFuncPassWrapper();
@@ -586,7 +586,7 @@ class GlobalMergeFuncPassWrapper : public ModulePass {
} // namespace
-char GlobalMergeFuncPassWrapper::ID = 0;
+const char GlobalMergeFuncPassWrapper::ID = 0;
INITIALIZE_PASS(GlobalMergeFuncPassWrapper, "global-merge-func",
"Global merge function pass", false, false)
diff --git a/llvm/lib/CodeGen/HardwareLoops.cpp b/llvm/lib/CodeGen/HardwareLoops.cpp
index 5c0252614e281..17245c9bb5eef 100644
--- a/llvm/lib/CodeGen/HardwareLoops.cpp
+++ b/llvm/lib/CodeGen/HardwareLoops.cpp
@@ -118,7 +118,7 @@ namespace {
class HardwareLoopsLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
HardwareLoopsLegacy() : FunctionPass(ID) {}
@@ -218,7 +218,7 @@ namespace {
};
}
-char HardwareLoopsLegacy::ID = 0;
+const char HardwareLoopsLegacy::ID = 0;
bool HardwareLoopsLegacy::runOnFunction(Function &F) {
if (skipFunction(F))
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index 40d66f5fa4ec4..5d643aa293152 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -207,7 +207,7 @@ namespace {
std::function<bool(const MachineFunction &)> PredicateFtor;
public:
- static char ID;
+ static const char ID;
IfConverter(std::function<bool(const MachineFunction &)> Ftor = nullptr)
: MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {}
@@ -444,9 +444,9 @@ namespace {
} // end anonymous namespace
-char IfConverter::ID = 0;
+const char IfConverter::ID = 0;
-char &llvm::IfConverterID = IfConverter::ID;
+const char &llvm::IfConverterID = IfConverter::ID;
INITIALIZE_PASS_BEGIN(IfConverter, DEBUG_TYPE, "If Converter", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfoWrapperPass)
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index c0f5bc81c9cf0..df7bfedadbfab 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -212,7 +212,7 @@ class ImplicitNullChecks : public MachineFunctionPass {
MachineBasicBlock *NullSucc, MachineInstr *&Dependence);
public:
- static char ID;
+ static const char ID;
ImplicitNullChecks() : MachineFunctionPass(ID) {}
@@ -801,9 +801,9 @@ void ImplicitNullChecks::rewriteNullChecks(
}
}
-char ImplicitNullChecks::ID = 0;
+const char ImplicitNullChecks::ID = 0;
-char &llvm::ImplicitNullChecksID = ImplicitNullChecks::ID;
+const char &llvm::ImplicitNullChecksID = ImplicitNullChecks::ID;
INITIALIZE_PASS_BEGIN(ImplicitNullChecks, DEBUG_TYPE,
"Implicit null checks", false, false)
diff --git a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
index 0b625be36e776..ee8d8092b3a95 100644
--- a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
+++ b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
@@ -51,7 +51,7 @@ namespace {
class IndirectBrExpandLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
IndirectBrExpandLegacyPass() : FunctionPass(ID) {}
@@ -85,7 +85,7 @@ PreservedAnalyses IndirectBrExpandPass::run(Function &F,
return PA;
}
-char IndirectBrExpandLegacyPass::ID = 0;
+const char IndirectBrExpandLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(IndirectBrExpandLegacyPass, DEBUG_TYPE,
"Expand indirectbr instructions", false, false)
diff --git a/llvm/lib/CodeGen/InitUndef.cpp b/llvm/lib/CodeGen/InitUndef.cpp
index 12b36f56d4d9a..bc9439a721b7a 100644
--- a/llvm/lib/CodeGen/InitUndef.cpp
+++ b/llvm/lib/CodeGen/InitUndef.cpp
@@ -62,7 +62,7 @@ namespace {
class InitUndefLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
InitUndefLegacy() : MachineFunctionPass(ID) {}
@@ -100,9 +100,9 @@ class InitUndef {
} // end anonymous namespace
-char InitUndefLegacy::ID = 0;
+const char InitUndefLegacy::ID = 0;
INITIALIZE_PASS(InitUndefLegacy, DEBUG_TYPE, INIT_UNDEF_NAME, false, false)
-char &llvm::InitUndefID = InitUndefLegacy::ID;
+const char &llvm::InitUndefID = InitUndefLegacy::ID;
static bool isEarlyClobberMI(MachineInstr &MI) {
return llvm::any_of(MI.all_defs(), [](const MachineOperand &DefMO) {
diff --git a/llvm/lib/CodeGen/InsertCodePrefetch.cpp b/llvm/lib/CodeGen/InsertCodePrefetch.cpp
index 44864cbc99c52..4510f26873db6 100644
--- a/llvm/lib/CodeGen/InsertCodePrefetch.cpp
+++ b/llvm/lib/CodeGen/InsertCodePrefetch.cpp
@@ -34,7 +34,7 @@ using namespace llvm;
namespace {
class InsertCodePrefetch : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
InsertCodePrefetch() : MachineFunctionPass(ID) {
initializeInsertCodePrefetchPass(*PassRegistry::getPassRegistry());
@@ -56,7 +56,7 @@ class InsertCodePrefetch : public MachineFunctionPass {
// Implementation
//===----------------------------------------------------------------------===//
-char InsertCodePrefetch::ID = 0;
+const char InsertCodePrefetch::ID = 0;
INITIALIZE_PASS_BEGIN(InsertCodePrefetch, DEBUG_TYPE, "Code prefetch insertion",
true, false)
INITIALIZE_PASS_DEPENDENCY(BasicBlockSectionsProfileReaderWrapperPass)
diff --git a/llvm/lib/CodeGen/InterleavedAccessPass.cpp b/llvm/lib/CodeGen/InterleavedAccessPass.cpp
index 24394addfa44a..ffab8b7e59753 100644
--- a/llvm/lib/CodeGen/InterleavedAccessPass.cpp
+++ b/llvm/lib/CodeGen/InterleavedAccessPass.cpp
@@ -139,7 +139,7 @@ class InterleavedAccess : public FunctionPass {
InterleavedAccessImpl Impl;
public:
- static char ID;
+ static const char ID;
InterleavedAccess() : FunctionPass(ID) {}
@@ -170,7 +170,7 @@ PreservedAnalyses InterleavedAccessPass::run(Function &F,
return PA;
}
-char InterleavedAccess::ID = 0;
+const char InterleavedAccess::ID = 0;
bool InterleavedAccess::runOnFunction(Function &F) {
if (skipFunction(F))
diff --git a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
index aaba0d14994e5..085e5ab78b6ca 100644
--- a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@ -1304,7 +1304,7 @@ namespace {
/// This pass combines interleaved loads into a pattern detectable by
/// InterleavedAccessPass.
struct InterleavedLoadCombine : public FunctionPass {
- static char ID;
+ static const char ID;
InterleavedLoadCombine() : FunctionPass(ID) {}
@@ -1352,7 +1352,7 @@ InterleavedLoadCombinePass::run(Function &F, FunctionAnalysisManager &FAM) {
return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
}
-char InterleavedLoadCombine::ID = 0;
+const char InterleavedLoadCombine::ID = 0;
INITIALIZE_PASS_BEGIN(
InterleavedLoadCombine, DEBUG_TYPE,
diff --git a/llvm/lib/CodeGen/JMCInstrumenter.cpp b/llvm/lib/CodeGen/JMCInstrumenter.cpp
index 2ff0fdfdc55e3..ea66f10c95b50 100644
--- a/llvm/lib/CodeGen/JMCInstrumenter.cpp
+++ b/llvm/lib/CodeGen/JMCInstrumenter.cpp
@@ -45,11 +45,11 @@ using namespace llvm;
static bool runImpl(Module &M);
namespace {
struct JMCInstrumenter : public ModulePass {
- static char ID;
+ static const char ID;
JMCInstrumenter() : ModulePass(ID) {}
bool runOnModule(Module &M) override { return runImpl(M); }
};
-char JMCInstrumenter::ID = 0;
+const char JMCInstrumenter::ID = 0;
} // namespace
PreservedAnalyses JMCInstrumenterPass::run(Module &M, ModuleAnalysisManager &) {
diff --git a/llvm/lib/CodeGen/KCFI.cpp b/llvm/lib/CodeGen/KCFI.cpp
index d03eb8dec0858..94888c24db09e 100644
--- a/llvm/lib/CodeGen/KCFI.cpp
+++ b/llvm/lib/CodeGen/KCFI.cpp
@@ -33,7 +33,7 @@ STATISTIC(NumKCFIChecksAdded, "Number of indirect call checks added");
namespace {
class KCFI : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
KCFI() : MachineFunctionPass(ID) {}
@@ -53,7 +53,7 @@ class KCFI : public MachineFunctionPass {
MachineBasicBlock::instr_iterator I) const;
};
-char KCFI::ID = 0;
+const char KCFI::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(KCFI, DEBUG_TYPE, KCFI_PASS_NAME, false, false)
diff --git a/llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
index 64e906ad8198c..4c2d6cd40fdf8 100644
--- a/llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
+++ b/llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
@@ -28,7 +28,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
INITIALIZE_PASS_END(LazyMachineBlockFrequencyInfoPass, DEBUG_TYPE,
"Lazy Machine Block Frequency Analysis", true, true)
-char LazyMachineBlockFrequencyInfoPass::ID = 0;
+const char LazyMachineBlockFrequencyInfoPass::ID = 0;
LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/LibcallLoweringInfo.cpp b/llvm/lib/CodeGen/LibcallLoweringInfo.cpp
index 388d2b009a9ef..0d1e0b1bf4452 100644
--- a/llvm/lib/CodeGen/LibcallLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/LibcallLoweringInfo.cpp
@@ -55,7 +55,7 @@ INITIALIZE_PASS_DEPENDENCY(RuntimeLibraryInfoWrapper)
INITIALIZE_PASS_END(LibcallLoweringInfoWrapper, "libcall-lowering-info",
"Library Function Lowering Analysis", false, true)
-char LibcallLoweringInfoWrapper::ID = 0;
+const char LibcallLoweringInfoWrapper::ID = 0;
LibcallLoweringInfoWrapper::LibcallLoweringInfoWrapper() : ImmutablePass(ID) {}
diff --git a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
index 27fbed36cf1de..7e45e3a5bc947 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
@@ -66,7 +66,7 @@ namespace {
/// base class.
class LiveDebugValuesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
LiveDebugValuesLegacy();
~LiveDebugValuesLegacy() override = default;
@@ -93,9 +93,9 @@ struct LiveDebugValues {
};
} // namespace
-char LiveDebugValuesLegacy::ID = 0;
+const char LiveDebugValuesLegacy::ID = 0;
-char &llvm::LiveDebugValuesID = LiveDebugValuesLegacy::ID;
+const char &llvm::LiveDebugValuesID = LiveDebugValuesLegacy::ID;
INITIALIZE_PASS(LiveDebugValuesLegacy, DEBUG_TYPE, "Live DEBUG_VALUE analysis",
false, false)
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp
index fb90032131491..ef609450b7e8d 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.cpp
+++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp
@@ -75,7 +75,7 @@ EnableLDV("live-debug-variables", cl::init(true),
STATISTIC(NumInsertedDebugValues, "Number of DBG_VALUEs inserted");
STATISTIC(NumInsertedDebugLabels, "Number of DBG_LABELs inserted");
-char LiveDebugVariablesWrapperLegacy::ID = 0;
+const char LiveDebugVariablesWrapperLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(LiveDebugVariablesWrapperLegacy, DEBUG_TYPE,
"Debug Variable Analysis", false, false)
diff --git a/llvm/lib/CodeGen/LiveIntervals.cpp b/llvm/lib/CodeGen/LiveIntervals.cpp
index 6ed379418abef..340c3c72a2911 100644
--- a/llvm/lib/CodeGen/LiveIntervals.cpp
+++ b/llvm/lib/CodeGen/LiveIntervals.cpp
@@ -79,8 +79,8 @@ LiveIntervalsPrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char LiveIntervalsWrapperPass::ID = 0;
-char &llvm::LiveIntervalsID = LiveIntervalsWrapperPass::ID;
+const char LiveIntervalsWrapperPass::ID = 0;
+const char &llvm::LiveIntervalsID = LiveIntervalsWrapperPass::ID;
INITIALIZE_PASS_BEGIN(LiveIntervalsWrapperPass, "liveintervals",
"Live Interval Analysis", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
diff --git a/llvm/lib/CodeGen/LiveRangeShrink.cpp b/llvm/lib/CodeGen/LiveRangeShrink.cpp
index 3e4725eb0dbe6..72ea4814ced84 100644
--- a/llvm/lib/CodeGen/LiveRangeShrink.cpp
+++ b/llvm/lib/CodeGen/LiveRangeShrink.cpp
@@ -42,7 +42,7 @@ namespace {
class LiveRangeShrink : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
LiveRangeShrink() : MachineFunctionPass(ID) {}
@@ -58,9 +58,9 @@ class LiveRangeShrink : public MachineFunctionPass {
} // end anonymous namespace
-char LiveRangeShrink::ID = 0;
+const char LiveRangeShrink::ID = 0;
-char &llvm::LiveRangeShrinkID = LiveRangeShrink::ID;
+const char &llvm::LiveRangeShrinkID = LiveRangeShrink::ID;
INITIALIZE_PASS(LiveRangeShrink, "lrshrink", "Live Range Shrink Pass", false,
false)
diff --git a/llvm/lib/CodeGen/LiveRegMatrix.cpp b/llvm/lib/CodeGen/LiveRegMatrix.cpp
index 67076959b2bce..a56bf0e8f3715 100644
--- a/llvm/lib/CodeGen/LiveRegMatrix.cpp
+++ b/llvm/lib/CodeGen/LiveRegMatrix.cpp
@@ -37,7 +37,7 @@ using namespace llvm;
STATISTIC(NumAssigned , "Number of registers assigned");
STATISTIC(NumUnassigned , "Number of registers unassigned");
-char LiveRegMatrixWrapperLegacy::ID = 0;
+const char LiveRegMatrixWrapperLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(LiveRegMatrixWrapperLegacy, "liveregmatrix",
"Live Register Matrix", false, false)
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
diff --git a/llvm/lib/CodeGen/LiveStacks.cpp b/llvm/lib/CodeGen/LiveStacks.cpp
index c07d985a09d1f..abc7527de396c 100644
--- a/llvm/lib/CodeGen/LiveStacks.cpp
+++ b/llvm/lib/CodeGen/LiveStacks.cpp
@@ -20,14 +20,14 @@ using namespace llvm;
#define DEBUG_TYPE "livestacks"
-char LiveStacksWrapperLegacy::ID = 0;
+const char LiveStacksWrapperLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(LiveStacksWrapperLegacy, DEBUG_TYPE,
"Live Stack Slot Analysis", false, false)
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
INITIALIZE_PASS_END(LiveStacksWrapperLegacy, DEBUG_TYPE,
"Live Stack Slot Analysis", false, true)
-char &llvm::LiveStacksID = LiveStacksWrapperLegacy::ID;
+const char &llvm::LiveStacksID = LiveStacksWrapperLegacy::ID;
void LiveStacksWrapperLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 246d538332af7..96df7df040fdc 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -57,8 +57,8 @@ LiveVariablesPrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char LiveVariablesWrapperPass::ID = 0;
-char &llvm::LiveVariablesID = LiveVariablesWrapperPass::ID;
+const char LiveVariablesWrapperPass::ID = 0;
+const char &llvm::LiveVariablesID = LiveVariablesWrapperPass::ID;
INITIALIZE_PASS_BEGIN(LiveVariablesWrapperPass, "livevars",
"Live Variable Analysis", false, false)
INITIALIZE_PASS_DEPENDENCY(UnreachableMachineBlockElimLegacy)
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
index e77bae11dea46..0b970b87ee1c2 100644
--- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -98,7 +98,7 @@ namespace {
class LocalStackSlotPass : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit LocalStackSlotPass() : MachineFunctionPass(ID) {}
@@ -125,9 +125,9 @@ LocalStackSlotAllocationPass::run(MachineFunction &MF,
return PA;
}
-char LocalStackSlotPass::ID = 0;
+const char LocalStackSlotPass::ID = 0;
-char &llvm::LocalStackSlotAllocationID = LocalStackSlotPass::ID;
+const char &llvm::LocalStackSlotAllocationID = LocalStackSlotPass::ID;
INITIALIZE_PASS(LocalStackSlotPass, DEBUG_TYPE,
"Local Stack Slot Allocation", false, false)
diff --git a/llvm/lib/CodeGen/LowerEmuTLS.cpp b/llvm/lib/CodeGen/LowerEmuTLS.cpp
index 3bcf1fad53a42..579ed5e14fd3d 100644
--- a/llvm/lib/CodeGen/LowerEmuTLS.cpp
+++ b/llvm/lib/CodeGen/LowerEmuTLS.cpp
@@ -34,7 +34,7 @@ namespace {
class LowerEmuTLS : public ModulePass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LowerEmuTLS() : ModulePass(ID) {}
bool runOnModule(Module &M) override;
@@ -73,7 +73,7 @@ PreservedAnalyses LowerEmuTLSPass::run(Module &M, ModuleAnalysisManager &MAM) {
return PA;
}
-char LowerEmuTLS::ID = 0;
+const char LowerEmuTLS::ID = 0;
INITIALIZE_PASS(LowerEmuTLS, DEBUG_TYPE,
"Add __emutls_[vt]. variables for emultated TLS model", false,
diff --git a/llvm/lib/CodeGen/MIR2Vec.cpp b/llvm/lib/CodeGen/MIR2Vec.cpp
index 42e299834b77b..f8edf8fedaf52 100644
--- a/llvm/lib/CodeGen/MIR2Vec.cpp
+++ b/llvm/lib/CodeGen/MIR2Vec.cpp
@@ -503,7 +503,7 @@ Error MIR2VecVocabProvider::readVocabulary(VocabMap &OpcodeVocab,
return Error::success();
}
-char MIR2VecVocabLegacyAnalysis::ID = 0;
+const char MIR2VecVocabLegacyAnalysis::ID = 0;
INITIALIZE_PASS_BEGIN(MIR2VecVocabLegacyAnalysis, "mir2vec-vocab-analysis",
"MIR2Vec Vocabulary Analysis", false, true)
INITIALIZE_PASS_DEPENDENCY(MachineModuleInfoWrapperPass)
@@ -589,7 +589,7 @@ Embedding SymbolicMIREmbedder::computeEmbeddings(const MachineInstr &MI) const {
// Printer Passes
//===----------------------------------------------------------------------===//
-char MIR2VecVocabPrinterLegacyPass::ID = 0;
+const char MIR2VecVocabPrinterLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(MIR2VecVocabPrinterLegacyPass, "print-mir2vec-vocab",
"MIR2Vec Vocabulary Printer Pass", false, true)
INITIALIZE_PASS_DEPENDENCY(MIR2VecVocabLegacyAnalysis)
@@ -631,7 +631,7 @@ llvm::createMIR2VecVocabPrinterLegacyPass(raw_ostream &OS) {
return new MIR2VecVocabPrinterLegacyPass(OS);
}
-char MIR2VecPrinterLegacyPass::ID = 0;
+const char MIR2VecPrinterLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(MIR2VecPrinterLegacyPass, "print-mir2vec",
"MIR2Vec Embedder Printer Pass", false, true)
INITIALIZE_PASS_DEPENDENCY(MIR2VecVocabLegacyAnalysis)
diff --git a/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp b/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
index 3f954da8ef319..e9f6385a1e83a 100644
--- a/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
+++ b/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
@@ -46,7 +46,7 @@ namespace {
class MIRCanonicalizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MIRCanonicalizer() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -63,9 +63,9 @@ class MIRCanonicalizer : public MachineFunctionPass {
} // end anonymous namespace
-char MIRCanonicalizer::ID;
+const char MIRCanonicalizer::ID = 0;
-char &llvm::MIRCanonicalizerID = MIRCanonicalizer::ID;
+const char &llvm::MIRCanonicalizerID = MIRCanonicalizer::ID;
INITIALIZE_PASS_BEGIN(MIRCanonicalizer, "mir-canonicalizer",
"Rename Register Operands Canonically", false, false)
diff --git a/llvm/lib/CodeGen/MIRFSDiscriminator.cpp b/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
index e37f78454cd9b..5c2ddc0e429aa 100644
--- a/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
+++ b/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
@@ -40,13 +40,13 @@ cl::opt<bool> llvm::ImprovedFSDiscriminator(
"improved-fs-discriminator", cl::Hidden, cl::init(false),
cl::desc("New FS discriminators encoding (incompatible with the original "
"encoding)"));
-char MIRAddFSDiscriminators::ID = 0;
+const char MIRAddFSDiscriminators::ID = 0;
INITIALIZE_PASS(MIRAddFSDiscriminators, DEBUG_TYPE,
"Add MIR Flow Sensitive Discriminators",
/* cfg = */ false, /* is_analysis = */ false)
-char &llvm::MIRAddFSDiscriminatorsID = MIRAddFSDiscriminators::ID;
+const char &llvm::MIRAddFSDiscriminatorsID = MIRAddFSDiscriminators::ID;
FunctionPass *llvm::createMIRAddFSDiscriminatorsPass(FSDiscriminatorPass P) {
return new MIRAddFSDiscriminators(P);
diff --git a/llvm/lib/CodeGen/MIRNamerPass.cpp b/llvm/lib/CodeGen/MIRNamerPass.cpp
index cbf8867d569cb..e21dd4612e9b1 100644
--- a/llvm/lib/CodeGen/MIRNamerPass.cpp
+++ b/llvm/lib/CodeGen/MIRNamerPass.cpp
@@ -29,7 +29,7 @@ namespace {
class MIRNamer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MIRNamer() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -59,6 +59,6 @@ class MIRNamer : public MachineFunctionPass {
} // end anonymous namespace
-char MIRNamer::ID;
+const char MIRNamer::ID = 0;
INITIALIZE_PASS(MIRNamer, "mir-namer", "Rename Register Operands", false, false)
diff --git a/llvm/lib/CodeGen/MIRPrintingPass.cpp b/llvm/lib/CodeGen/MIRPrintingPass.cpp
index a6fdaa6ab9c50..0e2e4c1068655 100644
--- a/llvm/lib/CodeGen/MIRPrintingPass.cpp
+++ b/llvm/lib/CodeGen/MIRPrintingPass.cpp
@@ -39,7 +39,7 @@ namespace {
/// This pass prints out the LLVM IR to an output stream using the MIR
/// serialization format.
struct MIRPrintingPass : public MachineFunctionPass {
- static char ID;
+ static const char ID;
raw_ostream &OS;
std::string MachineFunctions;
@@ -72,11 +72,11 @@ struct MIRPrintingPass : public MachineFunctionPass {
}
};
-char MIRPrintingPass::ID = 0;
+const char MIRPrintingPass::ID = 0;
} // end anonymous namespace
-char &llvm::MIRPrintingPassID = MIRPrintingPass::ID;
+const char &llvm::MIRPrintingPassID = MIRPrintingPass::ID;
INITIALIZE_PASS(MIRPrintingPass, "mir-printer", "MIR Printer", false, false)
MachineFunctionPass *llvm::createPrintMIRPass(raw_ostream &OS) {
diff --git a/llvm/lib/CodeGen/MIRSampleProfile.cpp b/llvm/lib/CodeGen/MIRSampleProfile.cpp
index d44f577558619..f11862bb1b17c 100644
--- a/llvm/lib/CodeGen/MIRSampleProfile.cpp
+++ b/llvm/lib/CodeGen/MIRSampleProfile.cpp
@@ -63,7 +63,7 @@ static cl::opt<bool> ViewBFIAfter("fs-viewbfi-after", cl::Hidden,
cl::init(false),
cl::desc("View BFI after MIR loader"));
-char MIRProfileLoaderPass::ID = 0;
+const char MIRProfileLoaderPass::ID = 0;
INITIALIZE_PASS_BEGIN(MIRProfileLoaderPass, DEBUG_TYPE,
"Load MIR Sample Profile",
@@ -76,7 +76,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineOptimizationRemarkEmitterPass)
INITIALIZE_PASS_END(MIRProfileLoaderPass, DEBUG_TYPE, "Load MIR Sample Profile",
/* cfg = */ false, /* is_analysis = */ false)
-char &llvm::MIRProfileLoaderPassID = MIRProfileLoaderPass::ID;
+const char &llvm::MIRProfileLoaderPassID = MIRProfileLoaderPass::ID;
FunctionPass *
llvm::createMIRProfileLoaderPass(std::string File, std::string RemappingFile,
diff --git a/llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp b/llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp
index 2f2ee6f535f40..ad41adb55baf9 100644
--- a/llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp
+++ b/llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp
@@ -95,7 +95,7 @@ extern cl::opt<unsigned> EvictInterferenceCutoff;
namespace {
class RegAllocScoring : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RegAllocScoring() : MachineFunctionPass(ID) {}
@@ -119,7 +119,7 @@ class RegAllocScoring : public MachineFunctionPass {
};
} // namespace
-char RegAllocScoring::ID = 0;
+const char RegAllocScoring::ID = 0;
FunctionPass *llvm::createRegAllocScoringPass() {
return new RegAllocScoring();
}
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
index 968e0e26b9213..1f49ee4653973 100644
--- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -184,7 +184,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
INITIALIZE_PASS_END(MachineBlockFrequencyInfoWrapperPass, DEBUG_TYPE,
"Machine Block Frequency Analysis", true, true)
-char MachineBlockFrequencyInfoWrapperPass::ID = 0;
+const char MachineBlockFrequencyInfoWrapperPass::ID = 0;
MachineBlockFrequencyInfoWrapperPass::MachineBlockFrequencyInfoWrapperPass()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/MachineBlockHashInfo.cpp b/llvm/lib/CodeGen/MachineBlockHashInfo.cpp
index 73dfc7c62a95c..bcb7d222931f7 100644
--- a/llvm/lib/CodeGen/MachineBlockHashInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBlockHashInfo.cpp
@@ -45,7 +45,7 @@ uint16_t fold_64_to_16(const uint64_t Value) {
INITIALIZE_PASS(MachineBlockHashInfo, "machine-block-hash",
"Machine Block Hash Analysis", true, true)
-char MachineBlockHashInfo::ID = 0;
+const char MachineBlockHashInfo::ID = 0;
MachineBlockHashInfo::MachineBlockHashInfo() : MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index 625fba36b3d3a..2d412b020ea29 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -636,7 +636,7 @@ class MachineBlockPlacement {
class MachineBlockPlacementLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
MachineBlockPlacementLegacy() : MachineFunctionPass(ID) {}
@@ -675,9 +675,9 @@ class MachineBlockPlacementLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char MachineBlockPlacementLegacy::ID = 0;
+const char MachineBlockPlacementLegacy::ID = 0;
-char &llvm::MachineBlockPlacementID = MachineBlockPlacementLegacy::ID;
+const char &llvm::MachineBlockPlacementID = MachineBlockPlacementLegacy::ID;
INITIALIZE_PASS_BEGIN(MachineBlockPlacementLegacy, DEBUG_TYPE,
"Branch Probability Basic Block Placement", false, false)
@@ -3867,7 +3867,7 @@ class MachineBlockPlacementStats {
class MachineBlockPlacementStatsLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
MachineBlockPlacementStatsLegacy() : MachineFunctionPass(ID) {}
@@ -3888,9 +3888,10 @@ class MachineBlockPlacementStatsLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char MachineBlockPlacementStatsLegacy::ID = 0;
+const char MachineBlockPlacementStatsLegacy::ID = 0;
-char &llvm::MachineBlockPlacementStatsID = MachineBlockPlacementStatsLegacy::ID;
+const char &llvm::MachineBlockPlacementStatsID =
+ MachineBlockPlacementStatsLegacy::ID;
INITIALIZE_PASS_BEGIN(MachineBlockPlacementStatsLegacy, "block-placement-stats",
"Basic Block Placement Stats", false, false)
diff --git a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
index f447f4a3699a6..e243fa02559b7 100644
--- a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp
@@ -54,7 +54,7 @@ MachineBranchProbabilityPrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineBranchProbabilityInfoWrapperPass::ID = 0;
+const char MachineBranchProbabilityInfoWrapperPass::ID = 0;
MachineBranchProbabilityInfoWrapperPass::
MachineBranchProbabilityInfoWrapperPass()
diff --git a/llvm/lib/CodeGen/MachineCFGPrinter.cpp b/llvm/lib/CodeGen/MachineCFGPrinter.cpp
index 19f9297600e34..a39191b0a1d4b 100644
--- a/llvm/lib/CodeGen/MachineCFGPrinter.cpp
+++ b/llvm/lib/CodeGen/MachineCFGPrinter.cpp
@@ -58,7 +58,7 @@ namespace {
class MachineCFGPrinter : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineCFGPrinter();
@@ -72,9 +72,9 @@ class MachineCFGPrinter : public MachineFunctionPass {
} // namespace
-char MachineCFGPrinter::ID = 0;
+const char MachineCFGPrinter::ID = 0;
-char &llvm::MachineCFGPrinterID = MachineCFGPrinter::ID;
+const char &llvm::MachineCFGPrinterID = MachineCFGPrinter::ID;
INITIALIZE_PASS(MachineCFGPrinter, DEBUG_TYPE, "Machine CFG Printer Pass",
false, true)
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp
index 67ecb80bc3ee0..77d378f99c877 100644
--- a/llvm/lib/CodeGen/MachineCSE.cpp
+++ b/llvm/lib/CodeGen/MachineCSE.cpp
@@ -134,7 +134,7 @@ class MachineCSEImpl {
class MachineCSELegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
MachineCSELegacy() : MachineFunctionPass(ID) {}
@@ -156,9 +156,9 @@ class MachineCSELegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char MachineCSELegacy::ID = 0;
+const char MachineCSELegacy::ID = 0;
-char &llvm::MachineCSELegacyID = MachineCSELegacy::ID;
+const char &llvm::MachineCSELegacyID = MachineCSELegacy::ID;
INITIALIZE_PASS_BEGIN(MachineCSELegacy, DEBUG_TYPE,
"Machine Common Subexpression Elimination", false, false)
diff --git a/llvm/lib/CodeGen/MachineCheckDebugify.cpp b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
index 9b703d5401cb9..2f3f46a489ac9 100644
--- a/llvm/lib/CodeGen/MachineCheckDebugify.cpp
+++ b/llvm/lib/CodeGen/MachineCheckDebugify.cpp
@@ -112,9 +112,9 @@ struct CheckDebugMachineModule : public ModulePass {
AU.setPreservesAll();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char CheckDebugMachineModule::ID = 0;
+const char CheckDebugMachineModule::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index b86e70f265786..cd0b724a0a8df 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -78,7 +78,7 @@ class MachineCombiner : public MachineFunctionPass {
TargetSchedModel TSchedModel;
public:
- static char ID;
+ static const char ID;
MachineCombiner() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -120,8 +120,8 @@ class MachineCombiner : public MachineFunctionPass {
};
}
-char MachineCombiner::ID = 0;
-char &llvm::MachineCombinerID = MachineCombiner::ID;
+const char MachineCombiner::ID = 0;
+const char &llvm::MachineCombinerID = MachineCombiner::ID;
INITIALIZE_PASS_BEGIN(MachineCombiner, DEBUG_TYPE,
"Machine InstCombiner", false, false)
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
index 2a344b40c30c1..fcf57474326ba 100644
--- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp
+++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
@@ -501,7 +501,7 @@ class MachineCopyPropagationLegacy : public MachineFunctionPass {
bool UseCopyInstr;
public:
- static char ID; // pass identification
+ static const char ID; // pass identification
MachineCopyPropagationLegacy(bool UseCopyInstr = false)
: MachineFunctionPass(ID), UseCopyInstr(UseCopyInstr) {}
@@ -520,9 +520,9 @@ class MachineCopyPropagationLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char MachineCopyPropagationLegacy::ID = 0;
+const char MachineCopyPropagationLegacy::ID = 0;
-char &llvm::MachineCopyPropagationID = MachineCopyPropagationLegacy::ID;
+const char &llvm::MachineCopyPropagationID = MachineCopyPropagationLegacy::ID;
INITIALIZE_PASS(MachineCopyPropagationLegacy, DEBUG_TYPE,
"Machine Copy Propagation Pass", false, false)
diff --git a/llvm/lib/CodeGen/MachineCycleAnalysis.cpp b/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
index 218833ae94bb8..36eb7771b62ac 100644
--- a/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
+++ b/llvm/lib/CodeGen/MachineCycleAnalysis.cpp
@@ -19,7 +19,7 @@ using namespace llvm;
template class llvm::GenericCycleInfo<llvm::MachineSSAContext>;
template class llvm::GenericCycle<llvm::MachineSSAContext>;
-char MachineCycleInfoWrapperPass::ID = 0;
+const char MachineCycleInfoWrapperPass::ID = 0;
MachineCycleInfoWrapperPass::MachineCycleInfoWrapperPass()
: MachineFunctionPass(ID) {}
@@ -65,7 +65,7 @@ MachineCycleAnalysis::run(MachineFunction &MF,
namespace {
class MachineCycleInfoPrinterLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineCycleInfoPrinterLegacy();
@@ -74,7 +74,7 @@ class MachineCycleInfoPrinterLegacy : public MachineFunctionPass {
};
} // namespace
-char MachineCycleInfoPrinterLegacy::ID = 0;
+const char MachineCycleInfoPrinterLegacy::ID = 0;
MachineCycleInfoPrinterLegacy::MachineCycleInfoPrinterLegacy()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/MachineDebugify.cpp b/llvm/lib/CodeGen/MachineDebugify.cpp
index c3d436ded60a8..4fd45c604a40b 100644
--- a/llvm/lib/CodeGen/MachineDebugify.cpp
+++ b/llvm/lib/CodeGen/MachineDebugify.cpp
@@ -194,9 +194,9 @@ struct DebugifyMachineModule : public ModulePass {
AU.setPreservesCFG();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char DebugifyMachineModule::ID = 0;
+const char DebugifyMachineModule::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/CodeGen/MachineDominanceFrontier.cpp b/llvm/lib/CodeGen/MachineDominanceFrontier.cpp
index 356123776bf2a..bc2f83ca0988e 100644
--- a/llvm/lib/CodeGen/MachineDominanceFrontier.cpp
+++ b/llvm/lib/CodeGen/MachineDominanceFrontier.cpp
@@ -21,7 +21,7 @@ template class DominanceFrontierBase<MachineBasicBlock, true>;
template class ForwardDominanceFrontierBase<MachineBasicBlock>;
}
-char MachineDominanceFrontierWrapperPass::ID = 0;
+const char MachineDominanceFrontierWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(MachineDominanceFrontierWrapperPass,
"machine-domfrontier",
@@ -33,7 +33,7 @@ INITIALIZE_PASS_END(MachineDominanceFrontierWrapperPass, "machine-domfrontier",
MachineDominanceFrontierWrapperPass::MachineDominanceFrontierWrapperPass()
: MachineFunctionPass(ID) {}
-char &llvm::MachineDominanceFrontierID =
+const char &llvm::MachineDominanceFrontierID =
MachineDominanceFrontierWrapperPass::ID;
bool MachineDominanceFrontier::invalidate(
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp
index bc4d1b359a261..3736e1b1d1528 100644
--- a/llvm/lib/CodeGen/MachineDominators.cpp
+++ b/llvm/lib/CodeGen/MachineDominators.cpp
@@ -88,7 +88,7 @@ MachineDominatorTreePrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineDominatorTreeWrapperPass::ID = 0;
+const char MachineDominatorTreeWrapperPass::ID = 0;
INITIALIZE_PASS(MachineDominatorTreeWrapperPass, "machinedomtree",
"MachineDominator Tree Construction", true, true)
@@ -96,7 +96,7 @@ INITIALIZE_PASS(MachineDominatorTreeWrapperPass, "machinedomtree",
MachineDominatorTreeWrapperPass::MachineDominatorTreeWrapperPass()
: MachineFunctionPass(ID) {}
-char &llvm::MachineDominatorsID = MachineDominatorTreeWrapperPass::ID;
+const char &llvm::MachineDominatorsID = MachineDominatorTreeWrapperPass::ID;
bool MachineDominatorTreeWrapperPass::runOnMachineFunction(MachineFunction &F) {
if (F.empty()) {
diff --git a/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp b/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
index 5111322023d04..701213fd23e72 100644
--- a/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
@@ -26,7 +26,7 @@ namespace {
/// MachineFunction.
///
struct MachineFunctionPrinterPass : public MachineFunctionPass {
- static char ID;
+ static const char ID;
raw_ostream &OS;
const std::string Banner;
@@ -53,10 +53,10 @@ struct MachineFunctionPrinterPass : public MachineFunctionPass {
}
};
-char MachineFunctionPrinterPass::ID = 0;
+const char MachineFunctionPrinterPass::ID = 0;
}
-char &llvm::MachineFunctionPrinterPassID = MachineFunctionPrinterPass::ID;
+const char &llvm::MachineFunctionPrinterPassID = MachineFunctionPrinterPass::ID;
INITIALIZE_PASS(MachineFunctionPrinterPass, "machineinstr-printer",
"Machine Function Printer", false, false)
diff --git a/llvm/lib/CodeGen/MachineFunctionSplitter.cpp b/llvm/lib/CodeGen/MachineFunctionSplitter.cpp
index 6adda8a345cf4..10d40cdd0e5e5 100644
--- a/llvm/lib/CodeGen/MachineFunctionSplitter.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionSplitter.cpp
@@ -71,7 +71,7 @@ namespace {
class MachineFunctionSplitter : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineFunctionSplitter() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -217,7 +217,7 @@ void MachineFunctionSplitter::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addUsedIfAvailable<BasicBlockSectionsProfileReaderWrapperPass>();
}
-char MachineFunctionSplitter::ID = 0;
+const char MachineFunctionSplitter::ID = 0;
INITIALIZE_PASS(MachineFunctionSplitter, "machine-function-splitter",
"Split machine functions using profile information", false,
false)
diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp
index c9f01e30483bf..4cd00e25a855d 100644
--- a/llvm/lib/CodeGen/MachineInstrBundle.cpp
+++ b/llvm/lib/CodeGen/MachineInstrBundle.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
namespace {
class UnpackMachineBundles : public MachineFunctionPass {
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
UnpackMachineBundles(
std::function<bool(const MachineFunction &)> Ftor = nullptr)
: MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {}
@@ -37,8 +37,8 @@ namespace {
};
} // end anonymous namespace
-char UnpackMachineBundles::ID = 0;
-char &llvm::UnpackMachineBundlesID = UnpackMachineBundles::ID;
+const char UnpackMachineBundles::ID = 0;
+const char &llvm::UnpackMachineBundlesID = UnpackMachineBundles::ID;
INITIALIZE_PASS(UnpackMachineBundles, "unpack-mi-bundles",
"Unpack machine instruction bundles", false, false)
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 53fbd3bec76cd..95c7bcc873f53 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -291,7 +291,7 @@ namespace {
bool PreRegAlloc;
public:
- MachineLICMBase(char &ID, bool PreRegAlloc)
+ MachineLICMBase(const char &ID, bool PreRegAlloc)
: MachineFunctionPass(ID), PreRegAlloc(PreRegAlloc) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -309,23 +309,23 @@ namespace {
class MachineLICM : public MachineLICMBase {
public:
- static char ID;
+ static const char ID;
MachineLICM() : MachineLICMBase(ID, false) {}
};
class EarlyMachineLICM : public MachineLICMBase {
public:
- static char ID;
+ static const char ID;
EarlyMachineLICM() : MachineLICMBase(ID, true) {}
};
} // end anonymous namespace
-char MachineLICM::ID;
-char EarlyMachineLICM::ID;
+const char MachineLICM::ID = 0;
+const char EarlyMachineLICM::ID = 0;
-char &llvm::MachineLICMID = MachineLICM::ID;
-char &llvm::EarlyMachineLICMID = EarlyMachineLICM::ID;
+const char &llvm::MachineLICMID = MachineLICM::ID;
+const char &llvm::EarlyMachineLICMID = EarlyMachineLICM::ID;
INITIALIZE_PASS_BEGIN(MachineLICM, DEBUG_TYPE,
"Machine Loop Invariant Code Motion", false, false)
diff --git a/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp b/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
index 4f281fa1361ca..88dea23924823 100644
--- a/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
+++ b/llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp
@@ -66,7 +66,7 @@ class MachineLateInstrsCleanup {
class MachineLateInstrsCleanupLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
MachineLateInstrsCleanupLegacy() : MachineFunctionPass(ID) {}
@@ -84,9 +84,10 @@ class MachineLateInstrsCleanupLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char MachineLateInstrsCleanupLegacy::ID = 0;
+const char MachineLateInstrsCleanupLegacy::ID = 0;
-char &llvm::MachineLateInstrsCleanupID = MachineLateInstrsCleanupLegacy::ID;
+const char &llvm::MachineLateInstrsCleanupID =
+ MachineLateInstrsCleanupLegacy::ID;
INITIALIZE_PASS(MachineLateInstrsCleanupLegacy, DEBUG_TYPE,
"Machine Late Instructions Cleanup Pass", false, false)
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp
index 9479b41f57b17..c15ce9f4692cd 100644
--- a/llvm/lib/CodeGen/MachineLoopInfo.cpp
+++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp
@@ -48,7 +48,7 @@ MachineLoopPrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineLoopInfoWrapperPass::ID = 0;
+const char MachineLoopInfoWrapperPass::ID = 0;
MachineLoopInfoWrapperPass::MachineLoopInfoWrapperPass()
: MachineFunctionPass(ID) {}
INITIALIZE_PASS_BEGIN(MachineLoopInfoWrapperPass, "machine-loops",
@@ -57,7 +57,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(MachineLoopInfoWrapperPass, "machine-loops",
"Machine Natural Loop Construction", true, true)
-char &llvm::MachineLoopInfoID = MachineLoopInfoWrapperPass::ID;
+const char &llvm::MachineLoopInfoID = MachineLoopInfoWrapperPass::ID;
bool MachineLoopInfoWrapperPass::runOnMachineFunction(MachineFunction &) {
LI.calculate(getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree());
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index b3d0c0ea1b9e2..1d26fc80350ec 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -121,7 +121,7 @@ namespace {
/// This pass frees the MachineFunction object associated with a Function.
class FreeMachineFunction : public FunctionPass {
public:
- static char ID;
+ static const char ID;
FreeMachineFunction() : FunctionPass(ID) {}
@@ -144,7 +144,7 @@ class FreeMachineFunction : public FunctionPass {
} // end anonymous namespace
-char FreeMachineFunction::ID;
+const char FreeMachineFunction::ID = 0;
FunctionPass *llvm::createFreeMachineFunctionPass() {
return new FreeMachineFunction();
@@ -161,7 +161,7 @@ MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass(
// Handle the Pass registration stuff necessary to use DataLayout's.
INITIALIZE_PASS(MachineModuleInfoWrapperPass, "machinemoduleinfo",
"Machine Module Information", false, false)
-char MachineModuleInfoWrapperPass::ID = 0;
+const char MachineModuleInfoWrapperPass::ID = 0;
static uint64_t getLocCookie(const SMDiagnostic &SMD, const SourceMgr &SrcMgr,
std::vector<const MDNode *> &LocInfos) {
diff --git a/llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp b/llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp
index f51f70a8cac23..55b4169e71b70 100644
--- a/llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp
+++ b/llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp
@@ -103,7 +103,7 @@ MachineOptimizationRemarkEmitterAnalysis::run(
return Result(MF, MBFI);
}
-char MachineOptimizationRemarkEmitterPass::ID = 0;
+const char MachineOptimizationRemarkEmitterPass::ID = 0;
static const char ore_name[] = "Machine Optimization Remark Emitter";
#define ORE_NAME "machine-opt-remark-emitter"
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 245f97a17ea8d..212ae21fbc482 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -438,7 +438,7 @@ struct InstructionMapper {
/// function.
struct MachineOutliner : public ModulePass {
- static char ID;
+ static const char ID;
MachineModuleInfo *MMI = nullptr;
const TargetMachine *TM = nullptr;
@@ -589,7 +589,7 @@ struct MachineOutliner : public ModulePass {
};
} // Anonymous namespace.
-char MachineOutliner::ID = 0;
+const char MachineOutliner::ID = 0;
ModulePass *llvm::createMachineOutlinerPass(RunOutliner RunOutlinerMode) {
MachineOutliner *OL = new MachineOutliner();
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index 43bb19bf4f181..81cd3d35919f9 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -227,11 +227,11 @@ static cl::opt<WindowSchedulingFlag> WindowSchedulingOption(
"Use window algorithm instead of SMS algorithm.")));
unsigned SwingSchedulerDAG::Circuits::MaxPaths = 5;
-char MachinePipeliner::ID = 0;
+const char MachinePipeliner::ID = 0;
#ifndef NDEBUG
int MachinePipeliner::NumTries = 0;
#endif
-char &llvm::MachinePipelinerID = MachinePipeliner::ID;
+const char &llvm::MachinePipelinerID = MachinePipeliner::ID;
INITIALIZE_PASS_BEGIN(MachinePipeliner, DEBUG_TYPE,
"Modulo Software Pipelining", false, false)
diff --git a/llvm/lib/CodeGen/MachinePostDominators.cpp b/llvm/lib/CodeGen/MachinePostDominators.cpp
index 383a46c9cae7c..0cdf2acb9ed05 100644
--- a/llvm/lib/CodeGen/MachinePostDominators.cpp
+++ b/llvm/lib/CodeGen/MachinePostDominators.cpp
@@ -59,7 +59,7 @@ MachinePostDominatorTreePrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachinePostDominatorTreeWrapperPass::ID = 0;
+const char MachinePostDominatorTreeWrapperPass::ID = 0;
//declare initializeMachinePostDominatorTreePass
INITIALIZE_PASS(MachinePostDominatorTreeWrapperPass, "machinepostdomtree",
diff --git a/llvm/lib/CodeGen/MachineRegionInfo.cpp b/llvm/lib/CodeGen/MachineRegionInfo.cpp
index 9f90bfe15ecd8..b917f58c5dfa8 100644
--- a/llvm/lib/CodeGen/MachineRegionInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegionInfo.cpp
@@ -125,8 +125,8 @@ LLVM_DUMP_METHOD void MachineRegionInfoPass::dump() const {
}
#endif
-char MachineRegionInfoPass::ID = 0;
-char &llvm::MachineRegionInfoPassID = MachineRegionInfoPass::ID;
+const char MachineRegionInfoPass::ID = 0;
+const char &llvm::MachineRegionInfoPassID = MachineRegionInfoPass::ID;
INITIALIZE_PASS_BEGIN(MachineRegionInfoPass, DEBUG_TYPE,
"Detect single entry single exit regions", true, true)
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 05df5ea59d7a3..2fb0bc44c0cb2 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -388,7 +388,7 @@ class MachineSchedulerLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction&) override;
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
};
/// PostMachineScheduler runs after shortly before code emission.
@@ -400,14 +400,14 @@ class PostMachineSchedulerLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &) override;
- static char ID; // Class identification, replacement for typeinfo
+ static const char ID; // Class identification, replacement for typeinfo
};
} // end anonymous namespace
-char MachineSchedulerLegacy::ID = 0;
+const char MachineSchedulerLegacy::ID = 0;
-char &llvm::MachineSchedulerID = MachineSchedulerLegacy::ID;
+const char &llvm::MachineSchedulerID = MachineSchedulerLegacy::ID;
INITIALIZE_PASS_BEGIN(MachineSchedulerLegacy, DEBUG_TYPE,
"Machine Instruction Scheduler", false, false)
@@ -436,9 +436,9 @@ void MachineSchedulerLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
MachineFunctionPass::getAnalysisUsage(AU);
}
-char PostMachineSchedulerLegacy::ID = 0;
+const char PostMachineSchedulerLegacy::ID = 0;
-char &llvm::PostMachineSchedulerID = PostMachineSchedulerLegacy::ID;
+const char &llvm::PostMachineSchedulerID = PostMachineSchedulerLegacy::ID;
INITIALIZE_PASS_BEGIN(PostMachineSchedulerLegacy, "postmisched",
"PostRA Machine Instruction Scheduler", false, false)
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index ffb2c507e2294..638c013fb8cbd 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -291,7 +291,7 @@ class MachineSinking {
class MachineSinkingLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineSinkingLegacy() : MachineFunctionPass(ID) {}
@@ -317,9 +317,9 @@ class MachineSinkingLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char MachineSinkingLegacy::ID = 0;
+const char MachineSinkingLegacy::ID = 0;
-char &llvm::MachineSinkingLegacyID = MachineSinkingLegacy::ID;
+const char &llvm::MachineSinkingLegacyID = MachineSinkingLegacy::ID;
INITIALIZE_PASS_BEGIN(MachineSinkingLegacy, DEBUG_TYPE, "Machine code sinking",
false, false)
@@ -2094,7 +2094,7 @@ class PostRAMachineSinkingLegacy : public MachineFunctionPass {
public:
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
PostRAMachineSinkingLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "PostRA Machine Sink"; }
@@ -2110,8 +2110,8 @@ class PostRAMachineSinkingLegacy : public MachineFunctionPass {
} // namespace
-char PostRAMachineSinkingLegacy::ID = 0;
-char &llvm::PostRAMachineSinkingID = PostRAMachineSinkingLegacy::ID;
+const char PostRAMachineSinkingLegacy::ID = 0;
+const char &llvm::PostRAMachineSinkingID = PostRAMachineSinkingLegacy::ID;
INITIALIZE_PASS(PostRAMachineSinkingLegacy, "postra-machine-sink",
"PostRA Machine Sink", false, false)
diff --git a/llvm/lib/CodeGen/MachineStripDebug.cpp b/llvm/lib/CodeGen/MachineStripDebug.cpp
index d54fe023a4a7e..9efb517ede850 100644
--- a/llvm/lib/CodeGen/MachineStripDebug.cpp
+++ b/llvm/lib/CodeGen/MachineStripDebug.cpp
@@ -89,12 +89,12 @@ struct StripDebugMachineModule : public ModulePass {
AU.setPreservesCFG();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
protected:
bool OnlyDebugified;
};
-char StripDebugMachineModule::ID = 0;
+const char StripDebugMachineModule::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/CodeGen/MachineTraceMetrics.cpp b/llvm/lib/CodeGen/MachineTraceMetrics.cpp
index 81dd68a519e76..9d6416825c624 100644
--- a/llvm/lib/CodeGen/MachineTraceMetrics.cpp
+++ b/llvm/lib/CodeGen/MachineTraceMetrics.cpp
@@ -51,9 +51,9 @@ MachineTraceMetricsVerifierPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineTraceMetricsWrapperPass::ID = 0;
+const char MachineTraceMetricsWrapperPass::ID = 0;
-char &llvm::MachineTraceMetricsID = MachineTraceMetricsWrapperPass::ID;
+const char &llvm::MachineTraceMetricsID = MachineTraceMetricsWrapperPass::ID;
INITIALIZE_PASS_BEGIN(MachineTraceMetricsWrapperPass, DEBUG_TYPE,
"Machine Trace Metrics", false, true)
diff --git a/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp b/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp
index dbadb67e1e6d2..c768b07e8b42d 100644
--- a/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp
+++ b/llvm/lib/CodeGen/MachineUniformityAnalysis.cpp
@@ -171,7 +171,7 @@ namespace {
class MachineUniformityInfoPrinterPass : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineUniformityInfoPrinterPass();
@@ -207,7 +207,7 @@ MachineUniformityPrinterPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineUniformityAnalysisPass::ID = 0;
+const char MachineUniformityAnalysisPass::ID = 0;
MachineUniformityAnalysisPass::MachineUniformityAnalysisPass()
: MachineFunctionPass(ID) {}
@@ -243,7 +243,7 @@ void MachineUniformityAnalysisPass::print(raw_ostream &OS,
UI.print(OS);
}
-char MachineUniformityInfoPrinterPass::ID = 0;
+const char MachineUniformityInfoPrinterPass::ID = 0;
MachineUniformityInfoPrinterPass::MachineUniformityInfoPrinterPass()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 919d451e25e54..a56a412f3c4d1 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -361,7 +361,7 @@ struct MachineVerifier {
};
struct MachineVerifierLegacyPass : public MachineFunctionPass {
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
const std::string Banner;
@@ -403,7 +403,7 @@ MachineVerifierPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char MachineVerifierLegacyPass::ID = 0;
+const char MachineVerifierLegacyPass::ID = 0;
INITIALIZE_PASS(MachineVerifierLegacyPass, "machineverifier",
"Verify generated machine code", false, false)
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp
index 36db54cc516e7..16aab90dfaeeb 100644
--- a/llvm/lib/CodeGen/ModuloSchedule.cpp
+++ b/llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -2777,7 +2777,7 @@ bool ModuloScheduleExpanderMVE::canApply(MachineLoop &L) {
namespace {
class ModuloScheduleTest : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ModuloScheduleTest() : MachineFunctionPass(ID) {}
@@ -2792,7 +2792,7 @@ class ModuloScheduleTest : public MachineFunctionPass {
};
} // namespace
-char ModuloScheduleTest::ID = 0;
+const char ModuloScheduleTest::ID = 0;
INITIALIZE_PASS_BEGIN(ModuloScheduleTest, "modulo-schedule-test",
"Modulo Schedule test pass", false, false)
diff --git a/llvm/lib/CodeGen/OptimizePHIs.cpp b/llvm/lib/CodeGen/OptimizePHIs.cpp
index c27f2c4cc577c..e52f5f10b2e42 100644
--- a/llvm/lib/CodeGen/OptimizePHIs.cpp
+++ b/llvm/lib/CodeGen/OptimizePHIs.cpp
@@ -52,7 +52,7 @@ class OptimizePHIs {
class OptimizePHIsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
OptimizePHIsLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -69,9 +69,9 @@ class OptimizePHIsLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char OptimizePHIsLegacy::ID = 0;
+const char OptimizePHIsLegacy::ID = 0;
-char &llvm::OptimizePHIsLegacyID = OptimizePHIsLegacy::ID;
+const char &llvm::OptimizePHIsLegacyID = OptimizePHIsLegacy::ID;
INITIALIZE_PASS(OptimizePHIsLegacy, DEBUG_TYPE,
"Optimize machine instruction PHIs", false, false)
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index 1b44cee10af99..8842a2f4969e1 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/lib/CodeGen/PHIElimination.cpp
@@ -161,7 +161,7 @@ class PHIEliminationImpl {
class PHIElimination : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
PHIElimination() : MachineFunctionPass(ID) {}
@@ -201,9 +201,9 @@ STATISTIC(NumLowered, "Number of phis lowered");
STATISTIC(NumCriticalEdgesSplit, "Number of critical edges split");
STATISTIC(NumReused, "Number of reused lowered phis");
-char PHIElimination::ID = 0;
+const char PHIElimination::ID = 0;
-char &llvm::PHIEliminationID = PHIElimination::ID;
+const char &llvm::PHIEliminationID = PHIElimination::ID;
INITIALIZE_PASS_BEGIN(PHIElimination, DEBUG_TYPE,
"Eliminate PHI nodes for register allocation", false,
diff --git a/llvm/lib/CodeGen/PatchableFunction.cpp b/llvm/lib/CodeGen/PatchableFunction.cpp
index 7c997676e21e5..2d6a3ccce0673 100644
--- a/llvm/lib/CodeGen/PatchableFunction.cpp
+++ b/llvm/lib/CodeGen/PatchableFunction.cpp
@@ -29,7 +29,7 @@ struct PatchableFunction {
};
struct PatchableFunctionLegacy : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PatchableFunctionLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override {
return PatchableFunction().run(F);
@@ -76,7 +76,7 @@ bool PatchableFunction::run(MachineFunction &MF) {
return false;
}
-char PatchableFunctionLegacy::ID = 0;
-char &llvm::PatchableFunctionID = PatchableFunctionLegacy::ID;
+const char PatchableFunctionLegacy::ID = 0;
+const char &llvm::PatchableFunctionID = PatchableFunctionLegacy::ID;
INITIALIZE_PASS(PatchableFunctionLegacy, "patchable-function",
"Implement the 'patchable-function' attribute", false, false)
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
index 6cb59717c4997..b3fa8d0e9af5a 100644
--- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -556,7 +556,7 @@ class PeepholeOptimizer : private MachineFunction::Delegate {
class PeepholeOptimizerLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
PeepholeOptimizerLegacy() : MachineFunctionPass(ID) {}
@@ -753,9 +753,9 @@ class ValueTracker {
} // end anonymous namespace
-char PeepholeOptimizerLegacy::ID = 0;
+const char PeepholeOptimizerLegacy::ID = 0;
-char &llvm::PeepholeOptimizerLegacyID = PeepholeOptimizerLegacy::ID;
+const char &llvm::PeepholeOptimizerLegacyID = PeepholeOptimizerLegacy::ID;
INITIALIZE_PASS_BEGIN(PeepholeOptimizerLegacy, DEBUG_TYPE,
"Peephole Optimizations", false, false)
diff --git a/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp b/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
index 29cfc06d90b29..7eb48b32c7468 100644
--- a/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
+++ b/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp
@@ -48,7 +48,7 @@ struct PostRAHazardRecognizer {
class PostRAHazardRecognizerLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PostRAHazardRecognizerLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -60,11 +60,11 @@ class PostRAHazardRecognizerLegacy : public MachineFunctionPass {
return PostRAHazardRecognizer().run(Fn);
}
};
-char PostRAHazardRecognizerLegacy::ID = 0;
+const char PostRAHazardRecognizerLegacy::ID = 0;
} // namespace
-char &llvm::PostRAHazardRecognizerID = PostRAHazardRecognizerLegacy::ID;
+const char &llvm::PostRAHazardRecognizerID = PostRAHazardRecognizerLegacy::ID;
INITIALIZE_PASS(PostRAHazardRecognizerLegacy, DEBUG_TYPE,
"Post RA hazard recognizer", false, false)
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp
index 06e5b18c19301..524af39a5f985 100644
--- a/llvm/lib/CodeGen/PostRASchedulerList.cpp
+++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp
@@ -91,7 +91,7 @@ class PostRAScheduler {
class PostRASchedulerLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PostRASchedulerLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -111,7 +111,7 @@ class PostRASchedulerLegacy : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &Fn) override;
};
-char PostRASchedulerLegacy::ID = 0;
+const char PostRASchedulerLegacy::ID = 0;
class SchedulePostRATDList : public ScheduleDAGInstrs {
/// AvailableQueue - The priority queue to use for the available SUnits.
@@ -199,7 +199,7 @@ class SchedulePostRATDList : public ScheduleDAGInstrs {
};
} // namespace
-char &llvm::PostRASchedulerID = PostRASchedulerLegacy::ID;
+const char &llvm::PostRASchedulerID = PostRASchedulerLegacy::ID;
INITIALIZE_PASS(PostRASchedulerLegacy, DEBUG_TYPE,
"Post RA top-down list latency scheduler", false, false)
diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index 201a7c0f37653..38bf2f5d92367 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -767,7 +767,7 @@ namespace {
class PreISelIntrinsicLoweringLegacyPass : public ModulePass {
public:
- static char ID;
+ static const char ID;
PreISelIntrinsicLoweringLegacyPass() : ModulePass(ID) {}
@@ -797,7 +797,7 @@ class PreISelIntrinsicLoweringLegacyPass : public ModulePass {
} // end anonymous namespace
-char PreISelIntrinsicLoweringLegacyPass::ID;
+const char PreISelIntrinsicLoweringLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(PreISelIntrinsicLoweringLegacyPass,
"pre-isel-intrinsic-lowering",
diff --git a/llvm/lib/CodeGen/ProcessImplicitDefs.cpp b/llvm/lib/CodeGen/ProcessImplicitDefs.cpp
index 6b58b6574f5bd..582a97766ae12 100644
--- a/llvm/lib/CodeGen/ProcessImplicitDefs.cpp
+++ b/llvm/lib/CodeGen/ProcessImplicitDefs.cpp
@@ -29,7 +29,7 @@ namespace {
/// for each use. Add isUndef marker to implicit_def defs and their uses.
class ProcessImplicitDefsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ProcessImplicitDefsLegacy() : MachineFunctionPass(ID) {}
@@ -57,8 +57,8 @@ class ProcessImplicitDefs {
};
} // end anonymous namespace
-char ProcessImplicitDefsLegacy::ID = 0;
-char &llvm::ProcessImplicitDefsID = ProcessImplicitDefsLegacy::ID;
+const char ProcessImplicitDefsLegacy::ID = 0;
+const char &llvm::ProcessImplicitDefsID = ProcessImplicitDefsLegacy::ID;
INITIALIZE_PASS(ProcessImplicitDefsLegacy, DEBUG_TYPE,
"Process Implicit Definitions", false, false)
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 68fd54cf00146..0ad3b826151a3 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -126,7 +126,7 @@ class PEIImpl {
class PEILegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PEILegacy() : MachineFunctionPass(ID) {}
@@ -139,9 +139,9 @@ class PEILegacy : public MachineFunctionPass {
} // end anonymous namespace
-char PEILegacy::ID = 0;
+const char PEILegacy::ID = 0;
-char &llvm::PrologEpilogCodeInserterID = PEILegacy::ID;
+const char &llvm::PrologEpilogCodeInserterID = PEILegacy::ID;
INITIALIZE_PASS_BEGIN(PEILegacy, DEBUG_TYPE, "Prologue/Epilogue Insertion",
false, false)
diff --git a/llvm/lib/CodeGen/PseudoProbeInserter.cpp b/llvm/lib/CodeGen/PseudoProbeInserter.cpp
index 521792a591a86..332dadadfd189 100644
--- a/llvm/lib/CodeGen/PseudoProbeInserter.cpp
+++ b/llvm/lib/CodeGen/PseudoProbeInserter.cpp
@@ -30,7 +30,7 @@ using namespace llvm;
namespace {
class PseudoProbeInserter : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PseudoProbeInserter() : MachineFunctionPass(ID) {}
@@ -139,7 +139,7 @@ class PseudoProbeInserter : public MachineFunctionPass {
};
} // namespace
-char PseudoProbeInserter::ID = 0;
+const char PseudoProbeInserter::ID = 0;
INITIALIZE_PASS_BEGIN(PseudoProbeInserter, DEBUG_TYPE,
"Insert pseudo probe annotations for value profiling",
false, false)
diff --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
index 3dd58963a1a68..b8917018c4d80 100644
--- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -45,7 +45,7 @@ ReachingDefPrinterPass::run(MachineFunction &MF,
INITIALIZE_PASS(ReachingDefInfoWrapperPass, DEBUG_TYPE,
"Reaching Definitions Analysis", false, true)
-char ReachingDefInfoWrapperPass::ID = 0;
+const char ReachingDefInfoWrapperPass::ID = 0;
ReachingDefInfoWrapperPass::ReachingDefInfoWrapperPass()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index 0b2a73b3c7e0f..4942f7b732daa 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -38,9 +38,9 @@ using namespace llvm;
static RegisterRegAlloc basicRegAlloc("basic", "basic register allocator",
createBasicRegisterAllocator);
-char RABasic::ID = 0;
+const char RABasic::ID = 0;
-char &llvm::RABasicID = RABasic::ID;
+const char &llvm::RABasicID = RABasic::ID;
INITIALIZE_PASS_BEGIN(RABasic, "regallocbasic", "Basic Register Allocator",
false, false)
diff --git a/llvm/lib/CodeGen/RegAllocBasic.h b/llvm/lib/CodeGen/RegAllocBasic.h
index a296c90ef78f8..e4be01e760db0 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.h
+++ b/llvm/lib/CodeGen/RegAllocBasic.h
@@ -102,7 +102,7 @@ class LLVM_LIBRARY_VISIBILITY RABasic : public MachineFunctionPass,
bool spillInterferences(const LiveInterval &VirtReg, MCRegister PhysReg,
SmallVectorImpl<Register> &SplitVRegs);
- static char ID;
+ static const char ID;
};
} // namespace llvm
#endif
diff --git a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
index f2c2f74755ace..b65823bec5266 100644
--- a/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
+++ b/llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
@@ -61,7 +61,7 @@ cl::opt<unsigned> EvictInterferenceCutoff(
#define LLVM_HAVE_TF_AOT
#endif
-char RegAllocEvictionAdvisorAnalysisLegacy::ID = 0;
+const char RegAllocEvictionAdvisorAnalysisLegacy::ID = 0;
INITIALIZE_PASS(RegAllocEvictionAdvisorAnalysisLegacy, "regalloc-evict",
"Regalloc eviction policy", false, true)
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index 7998b87a59c96..eae9bb1d5e3d7 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -405,7 +405,7 @@ class RegAllocFast : public MachineFunctionPass {
RegAllocFastImpl Impl;
public:
- static char ID;
+ static const char ID;
RegAllocFast(const RegAllocFilterFunc F = nullptr, bool ClearVirtRegs_ = true)
: MachineFunctionPass(ID), Impl(F, ClearVirtRegs_) {}
@@ -440,7 +440,7 @@ class RegAllocFast : public MachineFunctionPass {
} // end anonymous namespace
-char RegAllocFast::ID = 0;
+const char RegAllocFast::ID = 0;
INITIALIZE_PASS(RegAllocFast, "regallocfast", "Fast Register Allocator", false,
false)
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 8565a7233d32c..0808b0a91796c 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -154,7 +154,7 @@ class RAGreedyLegacy : public MachineFunctionPass {
public:
RAGreedyLegacy(const RegAllocFilterFunc F = nullptr);
- static char ID;
+ static const char ID;
/// Return the pass name.
StringRef getPassName() const override { return "Greedy Register Allocator"; }
@@ -292,8 +292,8 @@ bool RAGreedyLegacy::runOnMachineFunction(MachineFunction &MF) {
return Impl.run(MF);
}
-char RAGreedyLegacy::ID = 0;
-char &llvm::RAGreedyLegacyID = RAGreedyLegacy::ID;
+const char RAGreedyLegacy::ID = 0;
+const char &llvm::RAGreedyLegacyID = RAGreedyLegacy::ID;
INITIALIZE_PASS_BEGIN(RAGreedyLegacy, "greedy", "Greedy Register Allocator",
false, false)
diff --git a/llvm/lib/CodeGen/RegAllocPBQP.cpp b/llvm/lib/CodeGen/RegAllocPBQP.cpp
index 12bc63d172d0f..6a3217b6dbdfb 100644
--- a/llvm/lib/CodeGen/RegAllocPBQP.cpp
+++ b/llvm/lib/CodeGen/RegAllocPBQP.cpp
@@ -114,7 +114,7 @@ namespace {
/// Programming problems.
class RegAllocPBQP : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
/// Construct a PBQP register allocator.
RegAllocPBQP(char *cPassID = nullptr)
@@ -176,7 +176,7 @@ class RegAllocPBQP : public MachineFunctionPass {
void postOptimization(Spiller &VRegSpiller, LiveIntervals &LIS);
};
-char RegAllocPBQP::ID = 0;
+const char RegAllocPBQP::ID = 0;
/// Set spill costs for each node in the PBQP reg-alloc graph.
class SpillCosts : public PBQPRAConstraint {
diff --git a/llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp b/llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp
index 544ff72a04efd..9d1b9228a522b 100644
--- a/llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp
+++ b/llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp
@@ -35,7 +35,7 @@ static cl::opt<RegAllocPriorityAdvisorProvider::AdvisorMode> Mode(
RegAllocPriorityAdvisorProvider::AdvisorMode::Dummy, "dummy",
"prioritize low virtual register numbers for test and debug")));
-char RegAllocPriorityAdvisorAnalysisLegacy::ID = 0;
+const char RegAllocPriorityAdvisorAnalysisLegacy::ID = 0;
INITIALIZE_PASS(RegAllocPriorityAdvisorAnalysisLegacy, "regalloc-priority",
"Regalloc priority policy", false, true)
diff --git a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
index 291edf28c4bbb..2cd4d53c8af91 100644
--- a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
+++ b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp
@@ -53,7 +53,7 @@ class RegUsageInfoCollector {
class RegUsageInfoCollectorLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RegUsageInfoCollectorLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -70,7 +70,7 @@ class RegUsageInfoCollectorLegacy : public MachineFunctionPass {
};
} // end of anonymous namespace
-char RegUsageInfoCollectorLegacy::ID = 0;
+const char RegUsageInfoCollectorLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(RegUsageInfoCollectorLegacy, "RegUsageInfoCollector",
"Register Usage Information Collector", false, false)
diff --git a/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp b/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp
index 0e7757e843666..0d131d1956dbd 100644
--- a/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp
+++ b/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp
@@ -66,7 +66,7 @@ class RegUsageInfoPropagation {
class RegUsageInfoPropagationLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RegUsageInfoPropagationLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return RUIP_NAME; }
@@ -88,7 +88,7 @@ INITIALIZE_PASS_DEPENDENCY(PhysicalRegisterUsageInfoWrapperLegacy)
INITIALIZE_PASS_END(RegUsageInfoPropagationLegacy, "reg-usage-propagation",
RUIP_NAME, false, false)
-char RegUsageInfoPropagationLegacy::ID = 0;
+const char RegUsageInfoPropagationLegacy::ID = 0;
// Assumes call instructions have a single reference to a function.
static const Function *findCalledFunction(const Module &M,
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 586c27b7e3baf..53ba71ad1b291 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -390,7 +390,7 @@ class RegisterCoalescer : private LiveRangeEdit::Delegate {
class RegisterCoalescerLegacy : public MachineFunctionPass {
public:
- static char ID; ///< Class identification, replacement for typeinfo
+ static const char ID; ///< Class identification, replacement for typeinfo
RegisterCoalescerLegacy() : MachineFunctionPass(ID) {}
@@ -406,9 +406,9 @@ class RegisterCoalescerLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char RegisterCoalescerLegacy::ID = 0;
+const char RegisterCoalescerLegacy::ID = 0;
-char &llvm::RegisterCoalescerID = RegisterCoalescerLegacy::ID;
+const char &llvm::RegisterCoalescerID = RegisterCoalescerLegacy::ID;
INITIALIZE_PASS_BEGIN(RegisterCoalescerLegacy, "register-coalescer",
"Register Coalescer", false, false)
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index bcac08ba322a8..dd0471f7be11c 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/lib/CodeGen/RegisterScavenging.cpp
@@ -497,7 +497,7 @@ namespace {
/// This is used in for testing.
class ScavengerTest : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ScavengerTest() : MachineFunctionPass(ID) {}
@@ -521,7 +521,7 @@ class ScavengerTest : public MachineFunctionPass {
} // end anonymous namespace
-char ScavengerTest::ID;
+const char ScavengerTest::ID = 0;
INITIALIZE_PASS(ScavengerTest, "scavenger-test",
"Scavenge virtual registers inside basic blocks", false, false)
diff --git a/llvm/lib/CodeGen/RegisterUsageInfo.cpp b/llvm/lib/CodeGen/RegisterUsageInfo.cpp
index 38e4c30ceb634..815f3460c1f4e 100644
--- a/llvm/lib/CodeGen/RegisterUsageInfo.cpp
+++ b/llvm/lib/CodeGen/RegisterUsageInfo.cpp
@@ -37,7 +37,7 @@ extern cl::opt<bool> PrintRegUsage;
INITIALIZE_PASS(PhysicalRegisterUsageInfoWrapperLegacy, "reg-usage-info",
"Register Usage Information Storage", false, true)
-char PhysicalRegisterUsageInfoWrapperLegacy::ID = 0;
+const char PhysicalRegisterUsageInfoWrapperLegacy::ID = 0;
void PhysicalRegisterUsageInfo::setTargetMachine(const TargetMachine &TM) {
this->TM = &TM;
diff --git a/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp b/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp
index 98d531c9982a0..90c26962021b7 100644
--- a/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp
+++ b/llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp
@@ -45,7 +45,7 @@ STATISTIC(NumFakeUsesDeleted, "Number of FAKE_USE instructions deleted");
class RemoveLoadsIntoFakeUsesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RemoveLoadsIntoFakeUsesLegacy() : MachineFunctionPass(ID) {}
@@ -69,8 +69,8 @@ struct RemoveLoadsIntoFakeUses {
bool run(MachineFunction &MF);
};
-char RemoveLoadsIntoFakeUsesLegacy::ID = 0;
-char &llvm::RemoveLoadsIntoFakeUsesID = RemoveLoadsIntoFakeUsesLegacy::ID;
+const char RemoveLoadsIntoFakeUsesLegacy::ID = 0;
+const char &llvm::RemoveLoadsIntoFakeUsesID = RemoveLoadsIntoFakeUsesLegacy::ID;
INITIALIZE_PASS_BEGIN(RemoveLoadsIntoFakeUsesLegacy, DEBUG_TYPE,
"Remove Loads Into Fake Uses", false, false)
diff --git a/llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp b/llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp
index 11468245f8400..95b87492fa5e2 100644
--- a/llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp
+++ b/llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp
@@ -40,7 +40,7 @@ struct RemoveRedundantDebugValuesImpl {
class RemoveRedundantDebugValuesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RemoveRedundantDebugValuesLegacy();
/// Remove redundant debug value MIs for the given machine function.
@@ -58,9 +58,10 @@ class RemoveRedundantDebugValuesLegacy : public MachineFunctionPass {
// Implementation
//===----------------------------------------------------------------------===//
-char RemoveRedundantDebugValuesLegacy::ID = 0;
+const char RemoveRedundantDebugValuesLegacy::ID = 0;
-char &llvm::RemoveRedundantDebugValuesID = RemoveRedundantDebugValuesLegacy::ID;
+const char &llvm::RemoveRedundantDebugValuesID =
+ RemoveRedundantDebugValuesLegacy::ID;
INITIALIZE_PASS(RemoveRedundantDebugValuesLegacy, DEBUG_TYPE,
"Remove Redundant DEBUG_VALUE analysis", false, false)
diff --git a/llvm/lib/CodeGen/RenameIndependentSubregs.cpp b/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
index 2482a0da1e0fe..8351d342f81ab 100644
--- a/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
+++ b/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
@@ -95,7 +95,7 @@ class RenameIndependentSubregs {
class RenameIndependentSubregsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RenameIndependentSubregsLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
StringRef getPassName() const override {
@@ -114,9 +114,10 @@ class RenameIndependentSubregsLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char RenameIndependentSubregsLegacy::ID;
+const char RenameIndependentSubregsLegacy::ID = 0;
-char &llvm::RenameIndependentSubregsID = RenameIndependentSubregsLegacy::ID;
+const char &llvm::RenameIndependentSubregsID =
+ RenameIndependentSubregsLegacy::ID;
INITIALIZE_PASS_BEGIN(RenameIndependentSubregsLegacy, DEBUG_TYPE,
"Rename Independent Subregisters", false, false)
diff --git a/llvm/lib/CodeGen/ReplaceWithVeclib.cpp b/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
index 38c7cf93451cf..aa50ed836b6f2 100644
--- a/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
+++ b/llvm/lib/CodeGen/ReplaceWithVeclib.cpp
@@ -271,7 +271,7 @@ void ReplaceWithVeclibLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
////////////////////////////////////////////////////////////////////////////////
// Legacy Pass manager initialization
////////////////////////////////////////////////////////////////////////////////
-char ReplaceWithVeclibLegacy::ID = 0;
+const char ReplaceWithVeclibLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(ReplaceWithVeclibLegacy, DEBUG_TYPE,
"Replace intrinsics with calls to vector library", false,
diff --git a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
index 14c3cc2ebe354..92a150bbe8c6b 100644
--- a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
@@ -39,7 +39,7 @@ namespace {
bool AbortOnFailedISel;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
ResetMachineFunction(bool EmitFallbackDiag = false,
bool AbortOnFailedISel = false)
: MachineFunctionPass(ID), EmitFallbackDiag(EmitFallbackDiag),
@@ -95,7 +95,7 @@ namespace {
};
} // end anonymous namespace
-char ResetMachineFunction::ID = 0;
+const char ResetMachineFunction::ID = 0;
INITIALIZE_PASS(ResetMachineFunction, DEBUG_TYPE,
"Reset machine function if ISel failed", false, false)
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp
index a6e3d231b6fc7..c4bff97a85b6a 100644
--- a/llvm/lib/CodeGen/SafeStack.cpp
+++ b/llvm/lib/CodeGen/SafeStack.cpp
@@ -860,7 +860,7 @@ class SafeStackLegacyPass : public FunctionPass {
const TargetMachine *TM = nullptr;
public:
- static char ID; // Pass identification, replacement for typeid..
+ static const char ID; // Pass identification, replacement for typeid..
SafeStackLegacyPass() : FunctionPass(ID) {}
@@ -986,7 +986,7 @@ PreservedAnalyses SafeStackPass::run(Function &F,
return PA;
}
-char SafeStackLegacyPass::ID = 0;
+const char SafeStackLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(SafeStackLegacyPass, DEBUG_TYPE,
"Safe Stack instrumentation pass", false, false)
diff --git a/llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp b/llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp
index 7acc3203d7224..2caea66080801 100644
--- a/llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp
+++ b/llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp
@@ -31,7 +31,7 @@ namespace {
// MachineFunctionPass. It should probably be moved to a FunctionPass.
class MachineSanitizerBinaryMetadataLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MachineSanitizerBinaryMetadataLegacy();
bool runOnMachineFunction(MachineFunction &F) override;
@@ -46,8 +46,8 @@ struct MachineSanitizerBinaryMetadata {
INITIALIZE_PASS(MachineSanitizerBinaryMetadataLegacy, "machine-sanmd",
"Machine Sanitizer Binary Metadata", false, false)
-char MachineSanitizerBinaryMetadataLegacy::ID = 0;
-char &llvm::MachineSanitizerBinaryMetadataID =
+const char MachineSanitizerBinaryMetadataLegacy::ID = 0;
+const char &llvm::MachineSanitizerBinaryMetadataID =
MachineSanitizerBinaryMetadataLegacy::ID;
MachineSanitizerBinaryMetadataLegacy::MachineSanitizerBinaryMetadataLegacy()
diff --git a/llvm/lib/CodeGen/SelectOptimize.cpp b/llvm/lib/CodeGen/SelectOptimize.cpp
index 714100f8f3c67..b07f9aa22bae5 100644
--- a/llvm/lib/CodeGen/SelectOptimize.cpp
+++ b/llvm/lib/CodeGen/SelectOptimize.cpp
@@ -306,7 +306,7 @@ class SelectOptimize : public FunctionPass {
SelectOptimizeImpl Impl;
public:
- static char ID;
+ static const char ID;
SelectOptimize() : FunctionPass(ID) {}
@@ -335,7 +335,7 @@ PreservedAnalyses SelectOptimizePass::run(Function &F,
return Impl.run(F, FAM);
}
-char SelectOptimize::ID = 0;
+const char SelectOptimize::ID = 0;
INITIALIZE_PASS_BEGIN(SelectOptimize, DEBUG_TYPE, "Optimize selects", false,
false)
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index ab70b200d2965..a02f49c82a64e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -362,7 +362,7 @@ void TargetLowering::AdjustInstrPostInstrSelection(MachineInstr &MI,
//===----------------------------------------------------------------------===//
SelectionDAGISelLegacy::SelectionDAGISelLegacy(
- char &ID, std::unique_ptr<SelectionDAGISel> S)
+ const char &ID, std::unique_ptr<SelectionDAGISel> S)
: MachineFunctionPass(ID), Selector(std::move(S)) {
initializeBranchProbabilityInfoWrapperPassPass(
*PassRegistry::getPassRegistry());
diff --git a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
index 6097468626e0a..e0098c94b378f 100644
--- a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
@@ -88,7 +88,7 @@ class ShadowStackGCLowering : public FunctionPass {
ShadowStackGCLoweringImpl Impl;
public:
- static char ID;
+ static const char ID;
ShadowStackGCLowering();
@@ -129,8 +129,8 @@ PreservedAnalyses ShadowStackGCLoweringPass::run(Module &M,
return PA;
}
-char ShadowStackGCLowering::ID = 0;
-char &llvm::ShadowStackGCLoweringID = ShadowStackGCLowering::ID;
+const char ShadowStackGCLowering::ID = 0;
+const char &llvm::ShadowStackGCLoweringID = ShadowStackGCLowering::ID;
INITIALIZE_PASS_BEGIN(ShadowStackGCLowering, DEBUG_TYPE,
"Shadow Stack GC Lowering", false, false)
diff --git a/llvm/lib/CodeGen/ShrinkWrap.cpp b/llvm/lib/CodeGen/ShrinkWrap.cpp
index b27139ca7ac18..d2b708c66644e 100644
--- a/llvm/lib/CodeGen/ShrinkWrap.cpp
+++ b/llvm/lib/CodeGen/ShrinkWrap.cpp
@@ -258,7 +258,7 @@ class ShrinkWrapImpl {
class ShrinkWrapLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ShrinkWrapLegacy() : MachineFunctionPass(ID) {}
@@ -285,9 +285,9 @@ class ShrinkWrapLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char ShrinkWrapLegacy::ID = 0;
+const char ShrinkWrapLegacy::ID = 0;
-char &llvm::ShrinkWrapID = ShrinkWrapLegacy::ID;
+const char &llvm::ShrinkWrapID = ShrinkWrapLegacy::ID;
INITIALIZE_PASS_BEGIN(ShrinkWrapLegacy, DEBUG_TYPE, "Shrink Wrap Pass", false,
false)
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index 5856efcd549a8..ab6934eca600a 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -73,7 +73,7 @@ class SjLjEHPrepare : public FunctionPass {
SjLjEHPrepareImpl Impl;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit SjLjEHPrepare(const TargetMachine *TM = nullptr)
: FunctionPass(ID), Impl(TM) {}
bool doInitialization(Module &M) override { return Impl.doInitialization(M); }
@@ -94,7 +94,7 @@ PreservedAnalyses SjLjEHPreparePass::run(Function &F,
return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
}
-char SjLjEHPrepare::ID = 0;
+const char SjLjEHPrepare::ID = 0;
INITIALIZE_PASS(SjLjEHPrepare, DEBUG_TYPE, "Prepare SjLj exceptions",
false, false)
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp
index 62e7f86a846ac..c1f054efc4c93 100644
--- a/llvm/lib/CodeGen/SlotIndexes.cpp
+++ b/llvm/lib/CodeGen/SlotIndexes.cpp
@@ -33,7 +33,7 @@ SlotIndexesPrinterPass::run(MachineFunction &MF,
MFAM.getResult<SlotIndexesAnalysis>(MF).print(OS);
return PreservedAnalyses::all();
}
-char SlotIndexesWrapperPass::ID = 0;
+const char SlotIndexesWrapperPass::ID = 0;
SlotIndexesWrapperPass::SlotIndexesWrapperPass() : MachineFunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/SpillPlacement.cpp b/llvm/lib/CodeGen/SpillPlacement.cpp
index 55a96a22a00ec..dbaad9b8680a6 100644
--- a/llvm/lib/CodeGen/SpillPlacement.cpp
+++ b/llvm/lib/CodeGen/SpillPlacement.cpp
@@ -44,9 +44,9 @@ using namespace llvm;
#define DEBUG_TYPE "spill-code-placement"
-char SpillPlacementWrapperLegacy::ID = 0;
+const char SpillPlacementWrapperLegacy::ID = 0;
-char &llvm::SpillPlacementID = SpillPlacementWrapperLegacy::ID;
+const char &llvm::SpillPlacementID = SpillPlacementWrapperLegacy::ID;
INITIALIZE_PASS_BEGIN(SpillPlacementWrapperLegacy, DEBUG_TYPE,
"Spill Code Placement Analysis", true, true)
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp
index 65f9ae5433195..258d96b99049d 100644
--- a/llvm/lib/CodeGen/StackColoring.cpp
+++ b/llvm/lib/CodeGen/StackColoring.cpp
@@ -506,7 +506,7 @@ class StackColoring {
class StackColoringLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
StackColoringLegacy() : MachineFunctionPass(ID) {}
@@ -516,9 +516,9 @@ class StackColoringLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char StackColoringLegacy::ID = 0;
+const char StackColoringLegacy::ID = 0;
-char &llvm::StackColoringLegacyID = StackColoringLegacy::ID;
+const char &llvm::StackColoringLegacyID = StackColoringLegacy::ID;
INITIALIZE_PASS_BEGIN(StackColoringLegacy, DEBUG_TYPE,
"Merge disjoint stack slots", false, false)
diff --git a/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp b/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
index 95a9c3f781d1b..e04cfc50bd388 100644
--- a/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
+++ b/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
@@ -271,7 +271,7 @@ struct StackFrameLayoutAnalysis {
class StackFrameLayoutAnalysisLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
StackFrameLayoutAnalysisLegacy() : MachineFunctionPass(ID) {}
@@ -291,7 +291,7 @@ class StackFrameLayoutAnalysisLegacy : public MachineFunctionPass {
}
};
-char StackFrameLayoutAnalysisLegacy::ID = 0;
+const char StackFrameLayoutAnalysisLegacy::ID = 0;
} // namespace
PreservedAnalyses
@@ -302,7 +302,8 @@ llvm::StackFrameLayoutAnalysisPass::run(MachineFunction &MF,
return PreservedAnalyses::all();
}
-char &llvm::StackFrameLayoutAnalysisPassID = StackFrameLayoutAnalysisLegacy::ID;
+const char &llvm::StackFrameLayoutAnalysisPassID =
+ StackFrameLayoutAnalysisLegacy::ID;
INITIALIZE_PASS(StackFrameLayoutAnalysisLegacy, "stack-frame-layout",
"Stack Frame Layout", false, false)
diff --git a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
index 8f5aa280e60f9..1ba7864401e9f 100644
--- a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
+++ b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
@@ -52,7 +52,7 @@ class StackMapLiveness : public MachineFunctionPass {
LivePhysRegs LiveRegs;
public:
- static char ID;
+ static const char ID;
/// Default construct and initialize the pass.
StackMapLiveness();
@@ -81,8 +81,8 @@ class StackMapLiveness : public MachineFunctionPass {
};
} // namespace
-char StackMapLiveness::ID = 0;
-char &llvm::StackMapLivenessID = StackMapLiveness::ID;
+const char StackMapLiveness::ID = 0;
+const char &llvm::StackMapLivenessID = StackMapLiveness::ID;
INITIALIZE_PASS(StackMapLiveness, "stackmap-liveness",
"StackMap Liveness Analysis", false, false)
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp
index cf6ed09e54851..f4fdfb8195357 100644
--- a/llvm/lib/CodeGen/StackProtector.cpp
+++ b/llvm/lib/CodeGen/StackProtector.cpp
@@ -165,7 +165,7 @@ PreservedAnalyses StackProtectorPass::run(Function &F,
return PA;
}
-char StackProtector::ID = 0;
+const char StackProtector::ID = 0;
StackProtector::StackProtector() : FunctionPass(ID) {}
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp
index dfe613fb42ad6..6fc3a0982e67a 100644
--- a/llvm/lib/CodeGen/StackSlotColoring.cpp
+++ b/llvm/lib/CodeGen/StackSlotColoring.cpp
@@ -159,7 +159,7 @@ class StackSlotColoring {
class StackSlotColoringLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
StackSlotColoringLegacy() : MachineFunctionPass(ID) {}
@@ -187,9 +187,9 @@ class StackSlotColoringLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char StackSlotColoringLegacy::ID = 0;
+const char StackSlotColoringLegacy::ID = 0;
-char &llvm::StackSlotColoringID = StackSlotColoringLegacy::ID;
+const char &llvm::StackSlotColoringID = StackSlotColoringLegacy::ID;
INITIALIZE_PASS_BEGIN(StackSlotColoringLegacy, DEBUG_TYPE,
"Stack Slot Coloring", false, false)
diff --git a/llvm/lib/CodeGen/StaticDataAnnotator.cpp b/llvm/lib/CodeGen/StaticDataAnnotator.cpp
index 196963ffa2b41..24bb8e593cbdc 100644
--- a/llvm/lib/CodeGen/StaticDataAnnotator.cpp
+++ b/llvm/lib/CodeGen/StaticDataAnnotator.cpp
@@ -44,7 +44,7 @@ using namespace llvm;
/// their section prefixes based on profile-driven analysis.
class StaticDataAnnotator : public ModulePass {
public:
- static char ID;
+ static const char ID;
StaticDataProfileInfo *SDPI = nullptr;
const ProfileSummaryInfo *PSI = nullptr;
@@ -84,7 +84,7 @@ bool StaticDataAnnotator::runOnModule(Module &M) {
return Changed;
}
-char StaticDataAnnotator::ID = 0;
+const char StaticDataAnnotator::ID = 0;
INITIALIZE_PASS(StaticDataAnnotator, DEBUG_TYPE, "Static Data Annotator", false,
false)
diff --git a/llvm/lib/CodeGen/StaticDataSplitter.cpp b/llvm/lib/CodeGen/StaticDataSplitter.cpp
index 7e87ec248e781..fa58dbd3df440 100644
--- a/llvm/lib/CodeGen/StaticDataSplitter.cpp
+++ b/llvm/lib/CodeGen/StaticDataSplitter.cpp
@@ -73,7 +73,7 @@ class StaticDataSplitter : public MachineFunctionPass {
void annotateStaticDataWithoutProfiles(const MachineFunction &MF);
public:
- static char ID;
+ static const char ID;
StaticDataSplitter() : MachineFunctionPass(ID) {}
@@ -253,7 +253,7 @@ void StaticDataSplitter::updateStatsWithoutProfiles(const MachineFunction &MF) {
}
}
-char StaticDataSplitter::ID = 0;
+const char StaticDataSplitter::ID = 0;
INITIALIZE_PASS_BEGIN(StaticDataSplitter, DEBUG_TYPE, "Split static data",
false, false)
diff --git a/llvm/lib/CodeGen/TailDuplication.cpp b/llvm/lib/CodeGen/TailDuplication.cpp
index 20eee9847110c..0a3d0d33367c6 100644
--- a/llvm/lib/CodeGen/TailDuplication.cpp
+++ b/llvm/lib/CodeGen/TailDuplication.cpp
@@ -36,7 +36,7 @@ class TailDuplicateBaseLegacy : public MachineFunctionPass {
std::unique_ptr<MBFIWrapper> MBFIW;
bool PreRegAlloc;
public:
- TailDuplicateBaseLegacy(char &PassID, bool PreRegAlloc)
+ TailDuplicateBaseLegacy(const char &PassID, bool PreRegAlloc)
: MachineFunctionPass(PassID), PreRegAlloc(PreRegAlloc) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -51,13 +51,13 @@ class TailDuplicateBaseLegacy : public MachineFunctionPass {
class TailDuplicateLegacy : public TailDuplicateBaseLegacy {
public:
- static char ID;
+ static const char ID;
TailDuplicateLegacy() : TailDuplicateBaseLegacy(ID, false) {}
};
class EarlyTailDuplicateLegacy : public TailDuplicateBaseLegacy {
public:
- static char ID;
+ static const char ID;
EarlyTailDuplicateLegacy() : TailDuplicateBaseLegacy(ID, true) {}
MachineFunctionProperties getClearedProperties() const override {
@@ -67,11 +67,11 @@ class EarlyTailDuplicateLegacy : public TailDuplicateBaseLegacy {
} // end anonymous namespace
-char TailDuplicateLegacy::ID;
-char EarlyTailDuplicateLegacy::ID;
+const char TailDuplicateLegacy::ID = 0;
+const char EarlyTailDuplicateLegacy::ID = 0;
-char &llvm::TailDuplicateLegacyID = TailDuplicateLegacy::ID;
-char &llvm::EarlyTailDuplicateLegacyID = EarlyTailDuplicateLegacy::ID;
+const char &llvm::TailDuplicateLegacyID = TailDuplicateLegacy::ID;
+const char &llvm::EarlyTailDuplicateLegacyID = EarlyTailDuplicateLegacy::ID;
INITIALIZE_PASS(TailDuplicateLegacy, DEBUG_TYPE, "Tail Duplication", false,
false)
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 17536319a69e7..fa022a2326f34 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -386,7 +386,7 @@ static std::string getFSRemappingFile(const TargetMachine *TM) {
INITIALIZE_PASS(TargetPassConfig, "targetpassconfig",
"Target Pass Configuration", false, false)
-char TargetPassConfig::ID = 0;
+const char TargetPassConfig::ID = 0;
namespace {
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index fe67e434a4de3..47776e542d3d1 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -199,7 +199,7 @@ class TwoAddressInstructionImpl {
class TwoAddressInstructionLegacyPass : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
TwoAddressInstructionLegacyPass() : MachineFunctionPass(ID) {}
@@ -257,9 +257,10 @@ TwoAddressInstructionPass::run(MachineFunction &MF,
return PA;
}
-char TwoAddressInstructionLegacyPass::ID = 0;
+const char TwoAddressInstructionLegacyPass::ID = 0;
-char &llvm::TwoAddressInstructionPassID = TwoAddressInstructionLegacyPass::ID;
+const char &llvm::TwoAddressInstructionPassID =
+ TwoAddressInstructionLegacyPass::ID;
INITIALIZE_PASS(TwoAddressInstructionLegacyPass, DEBUG_TYPE,
"Two-Address instruction pass", false, false)
diff --git a/llvm/lib/CodeGen/TypePromotion.cpp b/llvm/lib/CodeGen/TypePromotion.cpp
index 0865597dadcd6..9698de9d807b5 100644
--- a/llvm/lib/CodeGen/TypePromotion.cpp
+++ b/llvm/lib/CodeGen/TypePromotion.cpp
@@ -179,7 +179,7 @@ class TypePromotionImpl {
class TypePromotionLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
TypePromotionLegacy() : FunctionPass(ID) {}
@@ -1027,7 +1027,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
INITIALIZE_PASS_END(TypePromotionLegacy, DEBUG_TYPE, PASS_NAME, false, false)
-char TypePromotionLegacy::ID = 0;
+const char TypePromotionLegacy::ID = 0;
bool TypePromotionLegacy::runOnFunction(Function &F) {
if (skipFunction(F))
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
index 98ddcc011fdb9..2685e77a21fe4 100644
--- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp
+++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
@@ -45,7 +45,7 @@ class UnreachableBlockElimLegacyPass : public FunctionPass {
}
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
UnreachableBlockElimLegacyPass() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -54,7 +54,7 @@ class UnreachableBlockElimLegacyPass : public FunctionPass {
}
};
}
-char UnreachableBlockElimLegacyPass::ID = 0;
+const char UnreachableBlockElimLegacyPass::ID = 0;
INITIALIZE_PASS(UnreachableBlockElimLegacyPass, "unreachableblockelim",
"Remove unreachable blocks from the CFG", false, false)
@@ -92,18 +92,18 @@ class UnreachableMachineBlockElimLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
UnreachableMachineBlockElimLegacy() : MachineFunctionPass(ID) {}
};
} // namespace
-char UnreachableMachineBlockElimLegacy::ID = 0;
+const char UnreachableMachineBlockElimLegacy::ID = 0;
INITIALIZE_PASS(UnreachableMachineBlockElimLegacy,
"unreachable-mbb-elimination",
"Remove unreachable machine basic blocks", false, false)
-char &llvm::UnreachableMachineBlockElimID =
+const char &llvm::UnreachableMachineBlockElimID =
UnreachableMachineBlockElimLegacy::ID;
void UnreachableMachineBlockElimLegacy::getAnalysisUsage(
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 972bd8f550e8b..4fc6fefd90244 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -57,7 +57,7 @@ STATISTIC(NumIdCopies, "Number of identity moves eliminated after rewriting");
// VirtRegMap implementation
//===----------------------------------------------------------------------===//
-char VirtRegMapWrapperLegacy::ID = 0;
+const char VirtRegMapWrapperLegacy::ID = 0;
INITIALIZE_PASS(VirtRegMapWrapperLegacy, "virtregmap", "Virtual Register Map",
false, true)
@@ -233,7 +233,7 @@ class VirtRegRewriter {
class VirtRegRewriterLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
bool ClearVirtRegs;
VirtRegRewriterLegacy(bool ClearVirtRegs = true)
: MachineFunctionPass(ID), ClearVirtRegs(ClearVirtRegs) {}
@@ -253,9 +253,9 @@ class VirtRegRewriterLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char VirtRegRewriterLegacy::ID = 0;
+const char VirtRegRewriterLegacy::ID = 0;
-char &llvm::VirtRegRewriterID = VirtRegRewriterLegacy::ID;
+const char &llvm::VirtRegRewriterID = VirtRegRewriterLegacy::ID;
INITIALIZE_PASS_BEGIN(VirtRegRewriterLegacy, "virtregrewriter",
"Virtual Register Rewriter", false, false)
diff --git a/llvm/lib/CodeGen/WasmEHPrepare.cpp b/llvm/lib/CodeGen/WasmEHPrepare.cpp
index 2f54578da5113..15259870cd9af 100644
--- a/llvm/lib/CodeGen/WasmEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WasmEHPrepare.cpp
@@ -128,7 +128,7 @@ class WasmEHPrepare : public FunctionPass {
WasmEHPrepareImpl P;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WasmEHPrepare() : FunctionPass(ID) {}
bool doInitialization(Module &M) override;
@@ -153,7 +153,7 @@ PreservedAnalyses WasmEHPreparePass::run(Function &F,
return Changed ? PreservedAnalyses::none() : PreservedAnalyses ::all();
}
-char WasmEHPrepare::ID = 0;
+const char WasmEHPrepare::ID = 0;
INITIALIZE_PASS_BEGIN(WasmEHPrepare, DEBUG_TYPE,
"Prepare WebAssembly exceptions", false, false)
INITIALIZE_PASS_END(WasmEHPrepare, DEBUG_TYPE, "Prepare WebAssembly exceptions",
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index 372fc50eb546e..cacb7bfa71f9a 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -98,7 +98,7 @@ class WinEHPrepare : public FunctionPass {
bool DemoteCatchSwitchPHIOnly;
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
WinEHPrepare(bool DemoteCatchSwitchPHIOnly = false)
: FunctionPass(ID), DemoteCatchSwitchPHIOnly(DemoteCatchSwitchPHIOnly) {}
@@ -120,7 +120,7 @@ PreservedAnalyses WinEHPreparePass::run(Function &F,
return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
}
-char WinEHPrepare::ID = 0;
+const char WinEHPrepare::ID = 0;
INITIALIZE_PASS(WinEHPrepare, DEBUG_TYPE, "Prepare Windows exceptions", false,
false)
diff --git a/llvm/lib/CodeGen/WindowsSecureHotPatching.cpp b/llvm/lib/CodeGen/WindowsSecureHotPatching.cpp
index 4a4d911844584..76528c5bb00be 100644
--- a/llvm/lib/CodeGen/WindowsSecureHotPatching.cpp
+++ b/llvm/lib/CodeGen/WindowsSecureHotPatching.cpp
@@ -175,7 +175,7 @@ struct GlobalVariableUse {
class WindowsSecureHotPatching : public ModulePass {
public:
- static char ID;
+ static const char ID;
WindowsSecureHotPatching() : ModulePass(ID) {}
@@ -194,7 +194,7 @@ class WindowsSecureHotPatching : public ModulePass {
} // end anonymous namespace
-char WindowsSecureHotPatching::ID = 0;
+const char WindowsSecureHotPatching::ID = 0;
INITIALIZE_PASS(WindowsSecureHotPatching, "windows-secure-hot-patch",
"Mark functions for Windows hot patch support", false, false)
diff --git a/llvm/lib/CodeGen/XRayInstrumentation.cpp b/llvm/lib/CodeGen/XRayInstrumentation.cpp
index 55ce7c831ab68..7db095b0a893f 100644
--- a/llvm/lib/CodeGen/XRayInstrumentation.cpp
+++ b/llvm/lib/CodeGen/XRayInstrumentation.cpp
@@ -48,7 +48,7 @@ struct InstrumentationOptions {
};
struct XRayInstrumentationLegacy : public MachineFunctionPass {
- static char ID;
+ static const char ID;
XRayInstrumentationLegacy() : MachineFunctionPass(ID) {}
@@ -324,8 +324,8 @@ bool XRayInstrumentation::run(MachineFunction &MF) {
return true;
}
-char XRayInstrumentationLegacy::ID = 0;
-char &llvm::XRayInstrumentationID = XRayInstrumentationLegacy::ID;
+const char XRayInstrumentationLegacy::ID = 0;
+const char &llvm::XRayInstrumentationID = XRayInstrumentationLegacy::ID;
INITIALIZE_PASS_BEGIN(XRayInstrumentationLegacy, "xray-instrumentation",
"Insert XRay ops", false, false)
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
diff --git a/llvm/lib/DWP/DWPError.cpp b/llvm/lib/DWP/DWPError.cpp
index 55ef46e22d46d..ca020638a41fa 100644
--- a/llvm/lib/DWP/DWPError.cpp
+++ b/llvm/lib/DWP/DWPError.cpp
@@ -1,3 +1,3 @@
#include "llvm/DWP/DWPError.h"
using namespace llvm;
-char DWPError::ID;
+const char DWPError::ID = 0;
diff --git a/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp b/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
index 74803a3e495a9..c85368c58ded3 100644
--- a/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
+++ b/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp
@@ -46,4 +46,4 @@ const std::error_category &llvm::codeview::CVErrorCategory() {
return CodeViewErrCategory;
}
-char CodeViewError::ID;
+const char CodeViewError::ID = 0;
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
index e442b5182f6a4..d05bb88028c65 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
@@ -748,7 +748,7 @@ void DWARFDebugNames::Entry::dump(ScopedPrinter &W) const {
}
}
-char DWARFDebugNames::SentinelError::ID;
+const char DWARFDebugNames::SentinelError::ID = 0;
std::error_code DWARFDebugNames::SentinelError::convertToErrorCode() const {
return inconvertibleErrorCode();
}
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index 5bd2427da7d73..e1de26916cd01 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -410,4 +410,4 @@ void llvm::ResolverError::log(raw_ostream &OS) const {
dwarf::LocListEncodingString(Kind).data());
}
-char llvm::ResolverError::ID;
+const char llvm::ResolverError::ID = 0;
diff --git a/llvm/lib/DebugInfo/MSF/MSFError.cpp b/llvm/lib/DebugInfo/MSF/MSFError.cpp
index dbd8648c4d41d..b2324929a5a72 100644
--- a/llvm/lib/DebugInfo/MSF/MSFError.cpp
+++ b/llvm/lib/DebugInfo/MSF/MSFError.cpp
@@ -56,4 +56,4 @@ const std::error_category &llvm::msf::MSFErrCategory() {
return MSFCategory;
}
-char MSFError::ID;
+const char MSFError::ID = 0;
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
index 0bd93a0e95061..527187cade679 100644
--- a/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
+++ b/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
@@ -35,4 +35,4 @@ const std::error_category &llvm::pdb::DIAErrCategory() {
return DIACategory;
}
-char DIAError::ID;
+const char DIAError::ID = 0;
diff --git a/llvm/lib/DebugInfo/PDB/GenericError.cpp b/llvm/lib/DebugInfo/PDB/GenericError.cpp
index d6da2dd621400..ec825690ed603 100644
--- a/llvm/lib/DebugInfo/PDB/GenericError.cpp
+++ b/llvm/lib/DebugInfo/PDB/GenericError.cpp
@@ -46,4 +46,4 @@ const std::error_category &llvm::pdb::PDBErrCategory() {
return PDBCategory;
}
-char PDBError::ID;
+const char PDBError::ID = 0;
diff --git a/llvm/lib/DebugInfo/PDB/Native/RawError.cpp b/llvm/lib/DebugInfo/PDB/Native/RawError.cpp
index 31320288a6030..8a6eddcc434b4 100644
--- a/llvm/lib/DebugInfo/PDB/Native/RawError.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/RawError.cpp
@@ -51,4 +51,4 @@ const std::error_category &llvm::pdb::RawErrCategory() {
return RawCategory;
}
-char RawError::ID;
+const char RawError::ID = 0;
diff --git a/llvm/lib/Debuginfod/HTTPServer.cpp b/llvm/lib/Debuginfod/HTTPServer.cpp
index 1264353ce4b33..3dce8fa3bf0e3 100644
--- a/llvm/lib/Debuginfod/HTTPServer.cpp
+++ b/llvm/lib/Debuginfod/HTTPServer.cpp
@@ -28,7 +28,7 @@
using namespace llvm;
-char HTTPServerError::ID = 0;
+const char HTTPServerError::ID = 0;
HTTPServerError::HTTPServerError(const Twine &Msg) : Msg(Msg.str()) {}
diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
index d98ded1ee4c32..7867683680e03 100644
--- a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
@@ -51,7 +51,7 @@ class JITLinkerErrorCategory : public std::error_category {
namespace llvm {
namespace jitlink {
-char JITLinkError::ID = 0;
+const char JITLinkError::ID = 0;
void JITLinkError::log(raw_ostream &OS) const { OS << ErrMsg; }
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp
index 07bb570822d2a..a66a6288517b5 100644
--- a/llvm/lib/ExecutionEngine/Orc/Core.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp
@@ -25,16 +25,16 @@
namespace llvm {
namespace orc {
-char ResourceTrackerDefunct::ID = 0;
-char JITDylibDefunct::ID = 0;
-char FailedToMaterialize::ID = 0;
-char SymbolsNotFound::ID = 0;
-char SymbolsCouldNotBeRemoved::ID = 0;
-char MissingSymbolDefinitions::ID = 0;
-char UnexpectedSymbolDefinitions::ID = 0;
-char UnsatisfiedSymbolDependencies::ID = 0;
-char MaterializationTask::ID = 0;
-char LookupTask::ID = 0;
+const char ResourceTrackerDefunct::ID = 0;
+const char JITDylibDefunct::ID = 0;
+const char FailedToMaterialize::ID = 0;
+const char SymbolsNotFound::ID = 0;
+const char SymbolsCouldNotBeRemoved::ID = 0;
+const char MissingSymbolDefinitions::ID = 0;
+const char UnexpectedSymbolDefinitions::ID = 0;
+const char UnsatisfiedSymbolDependencies::ID = 0;
+const char MaterializationTask::ID = 0;
+const char LookupTask::ID = 0;
RegisterDependenciesFunction NoDependenciesToRegister =
RegisterDependenciesFunction();
diff --git a/llvm/lib/ExecutionEngine/Orc/Layer.cpp b/llvm/lib/ExecutionEngine/Orc/Layer.cpp
index eb144275da589..48b3517b72e77 100644
--- a/llvm/lib/ExecutionEngine/Orc/Layer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Layer.cpp
@@ -162,7 +162,7 @@ void BasicIRLayerMaterializationUnit::materialize(
}););
}
-char ObjectLayer::ID;
+const char ObjectLayer::ID = 0;
ObjectLayer::ObjectLayer(ExecutionSession &ES) : ES(ES) {}
diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
index 9bc0aa89c3533..b0980cff43a58 100644
--- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
@@ -14,7 +14,7 @@
namespace llvm::orc {
-char ObjectLinkingLayer::ID;
+const char ObjectLinkingLayer::ID = 0;
void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R,
std::unique_ptr<MemoryBuffer> O) {
diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp
index 207a31ec19407..0e417160f0bdd 100644
--- a/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp
@@ -12,7 +12,7 @@
namespace llvm {
namespace orc {
-char ObjectTransformLayer::ID;
+const char ObjectTransformLayer::ID = 0;
using BaseT = RTTIExtends<ObjectTransformLayer, ObjectLayer>;
diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
index 4d4a705ced64e..9eb8989eae0ee 100644
--- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
@@ -78,7 +78,7 @@ class JITDylibSearchOrderResolver : public JITSymbolResolver {
namespace llvm {
namespace orc {
-char RTDyldObjectLinkingLayer::ID;
+const char RTDyldObjectLinkingLayer::ID = 0;
using BaseT = RTTIExtends<RTDyldObjectLinkingLayer, ObjectLayer>;
diff --git a/llvm/lib/ExecutionEngine/Orc/Shared/OrcError.cpp b/llvm/lib/ExecutionEngine/Orc/Shared/OrcError.cpp
index 0612078ee2dd4..3912fcf41048c 100644
--- a/llvm/lib/ExecutionEngine/Orc/Shared/OrcError.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Shared/OrcError.cpp
@@ -78,8 +78,8 @@ OrcErrorCategory &getOrcErrCat() {
namespace llvm {
namespace orc {
-char DuplicateDefinition::ID = 0;
-char JITSymbolNotFound::ID = 0;
+const char DuplicateDefinition::ID = 0;
+const char JITSymbolNotFound::ID = 0;
std::error_code orcError(OrcErrorCode ErrCode) {
typedef std::underlying_type_t<OrcErrorCode> UT;
diff --git a/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp b/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp
index e87a14f3ea7c4..953c897a65c57 100644
--- a/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp
@@ -13,9 +13,9 @@
namespace llvm {
namespace orc {
-char Task::ID = 0;
-char GenericNamedTask::ID = 0;
-char IdleTask::ID = 0;
+const char Task::ID = 0;
+const char GenericNamedTask::ID = 0;
+const char IdleTask::ID = 0;
const char *GenericNamedTask::DefaultDescription = "Generic Task";
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 9f8c1dd87c76a..bbe018cb8654e 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -52,7 +52,7 @@ class RuntimeDyldErrorCategory : public std::error_category {
}
-char RuntimeDyldError::ID = 0;
+const char RuntimeDyldError::ID = 0;
void RuntimeDyldError::log(raw_ostream &OS) const {
OS << ErrMsg << "\n";
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index d50e5d9cb088b..fb220d207d918 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/FileCheck/FileCheck.cpp
@@ -369,11 +369,11 @@ static char popFront(StringRef &S) {
return C;
}
-char OverflowError::ID = 0;
-char UndefVarError::ID = 0;
-char ErrorDiagnostic::ID = 0;
-char NotFoundError::ID = 0;
-char ErrorReported::ID = 0;
+const char OverflowError::ID = 0;
+const char UndefVarError::ID = 0;
+const char ErrorDiagnostic::ID = 0;
+const char NotFoundError::ID = 0;
+const char ErrorReported::ID = 0;
Expected<NumericVariable *> Pattern::parseNumericVariableDefinition(
StringRef &Expr, FileCheckPatternContext *Context,
diff --git a/llvm/lib/FileCheck/FileCheckImpl.h b/llvm/lib/FileCheck/FileCheckImpl.h
index 5851cfc4b5d5c..1b5e2c34cf3b1 100644
--- a/llvm/lib/FileCheck/FileCheckImpl.h
+++ b/llvm/lib/FileCheck/FileCheckImpl.h
@@ -106,7 +106,7 @@ struct ExpressionFormat {
/// value.
class OverflowError : public ErrorInfo<OverflowError> {
public:
- LLVM_ABI_FOR_TEST static char ID;
+ LLVM_ABI_FOR_TEST static const char ID;
std::error_code convertToErrorCode() const override {
return std::make_error_code(std::errc::value_too_large);
@@ -175,7 +175,7 @@ class UndefVarError : public ErrorInfo<UndefVarError> {
StringRef VarName;
public:
- LLVM_ABI_FOR_TEST static char ID;
+ LLVM_ABI_FOR_TEST static const char ID;
UndefVarError(StringRef VarName) : VarName(VarName) {}
@@ -512,7 +512,7 @@ class ErrorDiagnostic : public ErrorInfo<ErrorDiagnostic> {
SMRange Range;
public:
- LLVM_ABI_FOR_TEST static char ID;
+ LLVM_ABI_FOR_TEST static const char ID;
ErrorDiagnostic(SMDiagnostic &&Diag, SMRange Range)
: Diagnostic(Diag), Range(Range) {}
@@ -542,7 +542,7 @@ class ErrorDiagnostic : public ErrorInfo<ErrorDiagnostic> {
class NotFoundError : public ErrorInfo<NotFoundError> {
public:
- LLVM_ABI_FOR_TEST static char ID;
+ LLVM_ABI_FOR_TEST static const char ID;
std::error_code convertToErrorCode() const override {
return inconvertibleErrorCode();
@@ -566,7 +566,7 @@ class NotFoundError : public ErrorInfo<NotFoundError> {
/// a call like \c consumeError.
class ErrorReported final : public ErrorInfo<ErrorReported> {
public:
- static char ID;
+ static const char ID;
std::error_code convertToErrorCode() const override {
return inconvertibleErrorCode();
diff --git a/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp b/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
index 132a280c659a1..351ade7ebc4f1 100644
--- a/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
+++ b/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp
@@ -24,7 +24,7 @@ namespace llvm {
namespace hlsl {
namespace rootsig {
-char RootSignatureValidationError::ID;
+const char RootSignatureValidationError::ID = 0;
static std::optional<uint32_t> extractMdIntValue(MDNode *Node,
unsigned int OpId) {
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp
index e1e88bb2aaff5..255296391176e 100644
--- a/llvm/lib/IR/Dominators.cpp
+++ b/llvm/lib/IR/Dominators.cpp
@@ -417,7 +417,7 @@ PreservedAnalyses DominatorTreeVerifierPass::run(Function &F,
//
//===----------------------------------------------------------------------===//
-char DominatorTreeWrapperPass::ID = 0;
+const char DominatorTreeWrapperPass::ID = 0;
DominatorTreeWrapperPass::DominatorTreeWrapperPass() : FunctionPass(ID) {
initializeDominatorTreeWrapperPassPass(*PassRegistry::getPassRegistry());
diff --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp
index 5c062800198fc..9d12be018805f 100644
--- a/llvm/lib/IR/IRPrintingPasses.cpp
+++ b/llvm/lib/IR/IRPrintingPasses.cpp
@@ -32,7 +32,7 @@ class PrintModulePassWrapper : public ModulePass {
bool ShouldPreserveUseListOrder;
public:
- static char ID;
+ static const char ID;
PrintModulePassWrapper() : ModulePass(ID), OS(dbgs()) {}
PrintModulePassWrapper(raw_ostream &OS, const std::string &Banner,
bool ShouldPreserveUseListOrder)
@@ -76,7 +76,7 @@ class PrintFunctionPassWrapper : public FunctionPass {
std::string Banner;
public:
- static char ID;
+ static const char ID;
PrintFunctionPassWrapper() : FunctionPass(ID), OS(dbgs()) {}
PrintFunctionPassWrapper(raw_ostream &OS, const std::string &Banner)
: FunctionPass(ID), OS(OS), Banner(Banner) {}
@@ -103,10 +103,10 @@ class PrintFunctionPassWrapper : public FunctionPass {
} // namespace
-char PrintModulePassWrapper::ID = 0;
+const char PrintModulePassWrapper::ID = 0;
INITIALIZE_PASS(PrintModulePassWrapper, "print-module",
"Print module to stderr", false, true)
-char PrintFunctionPassWrapper::ID = 0;
+const char PrintFunctionPassWrapper::ID = 0;
INITIALIZE_PASS(PrintFunctionPassWrapper, "print-function",
"Print function to stderr", false, true)
diff --git a/llvm/lib/IR/LLVMRemarkStreamer.cpp b/llvm/lib/IR/LLVMRemarkStreamer.cpp
index 9e1e45998f2f1..30898e770e93b 100644
--- a/llvm/lib/IR/LLVMRemarkStreamer.cpp
+++ b/llvm/lib/IR/LLVMRemarkStreamer.cpp
@@ -88,9 +88,9 @@ void LLVMRemarkStreamer::emit(const DiagnosticInfoOptimizationBase &Diag) {
RS.getSerializer().emit(R);
}
-char LLVMRemarkSetupFileError::ID = 0;
-char LLVMRemarkSetupPatternError::ID = 0;
-char LLVMRemarkSetupFormatError::ID = 0;
+const char LLVMRemarkSetupFileError::ID = 0;
+const char LLVMRemarkSetupPatternError::ID = 0;
+const char LLVMRemarkSetupFormatError::ID = 0;
Expected<LLVMRemarkFileHandle> llvm::setupLLVMOptimizationRemarks(
LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses,
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 47a828842b481..db0a0cc3ab0f5 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -246,7 +246,7 @@ class FunctionPassManagerImpl : public Pass,
private:
bool wasRun;
public:
- static char ID;
+ static const char ID;
explicit FunctionPassManagerImpl()
: Pass(PT_PassManager, ID), PMTopLevelManager(new FPPassManager()),
wasRun(false) {}
@@ -304,7 +304,7 @@ class FunctionPassManagerImpl : public Pass,
void FunctionPassManagerImpl::anchor() {}
-char FunctionPassManagerImpl::ID = 0;
+const char FunctionPassManagerImpl::ID = 0;
//===----------------------------------------------------------------------===//
// FunctionPassManagerImpl implementation
@@ -377,7 +377,7 @@ namespace {
/// sequences them to process one module.
class MPPassManager : public Pass, public PMDataManager {
public:
- static char ID;
+ static const char ID;
explicit MPPassManager() : Pass(PT_PassManager, ID) {}
// Delete on the fly managers.
@@ -451,7 +451,7 @@ class MPPassManager : public Pass, public PMDataManager {
MapVector<Pass *, legacy::FunctionPassManagerImpl *> OnTheFlyManagers;
};
-char MPPassManager::ID = 0;
+const char MPPassManager::ID = 0;
} // End anonymous namespace
namespace llvm {
@@ -467,7 +467,7 @@ class PassManagerImpl : public Pass,
virtual void anchor();
public:
- static char ID;
+ static const char ID;
explicit PassManagerImpl()
: Pass(PT_PassManager, ID), PMTopLevelManager(new MPPassManager()) {}
@@ -509,7 +509,7 @@ class PassManagerImpl : public Pass,
void PassManagerImpl::anchor() {}
-char PassManagerImpl::ID = 0;
+const char PassManagerImpl::ID = 0;
//===----------------------------------------------------------------------===//
// PassManagerImpl implementation
@@ -1339,7 +1339,7 @@ void FPPassManager::cleanup() {
//===----------------------------------------------------------------------===//
// FPPassManager implementation
-char FPPassManager::ID = 0;
+const char FPPassManager::ID = 0;
/// Print passes managed by this manager
void FPPassManager::dumpPassStructure(unsigned Offset) {
dbgs().indent(Offset*2) << "FunctionPass Manager\n";
diff --git a/llvm/lib/IR/Pass.cpp b/llvm/lib/IR/Pass.cpp
index dec7c9a9ab18c..ca46620aa074f 100644
--- a/llvm/lib/IR/Pass.cpp
+++ b/llvm/lib/IR/Pass.cpp
@@ -70,7 +70,7 @@ bool ModulePass::skipModule(const Module &M) const {
return Gate.isEnabled() && !Gate.shouldRunPass(PassName, getDescription(M));
}
-bool Pass::mustPreserveAnalysisID(char &AID) const {
+bool Pass::mustPreserveAnalysisID(const char &AID) const {
return Resolver->getAnalysisIfAvailable(&AID) != nullptr;
}
@@ -286,12 +286,12 @@ AnalysisUsage &AnalysisUsage::addRequiredID(const void *ID) {
return *this;
}
-AnalysisUsage &AnalysisUsage::addRequiredID(char &ID) {
+AnalysisUsage &AnalysisUsage::addRequiredID(const char &ID) {
pushUnique(Required, &ID);
return *this;
}
-AnalysisUsage &AnalysisUsage::addRequiredTransitiveID(char &ID) {
+AnalysisUsage &AnalysisUsage::addRequiredTransitiveID(const char &ID) {
pushUnique(Required, &ID);
pushUnique(RequiredTransitive, &ID);
return *this;
diff --git a/llvm/lib/IR/SafepointIRVerifier.cpp b/llvm/lib/IR/SafepointIRVerifier.cpp
index e35b5b30a7cc1..9f77471d7c931 100644
--- a/llvm/lib/IR/SafepointIRVerifier.cpp
+++ b/llvm/lib/IR/SafepointIRVerifier.cpp
@@ -208,7 +208,7 @@ PreservedAnalyses SafepointIRVerifierPass::run(Function &F,
namespace {
struct SafepointIRVerifier : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
SafepointIRVerifier() : FunctionPass(ID) {
initializeSafepointIRVerifierPass(*PassRegistry::getPassRegistry());
}
@@ -235,7 +235,7 @@ void llvm::verifySafepointIR(Function &F) {
pass.runOnFunction(F);
}
-char SafepointIRVerifier::ID = 0;
+const char SafepointIRVerifier::ID = 0;
FunctionPass *llvm::createSafepointIRVerifierPass() {
return new SafepointIRVerifier();
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 120a7daa16f05..b50ff1d4cffd8 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -7904,7 +7904,7 @@ bool llvm::verifyModule(const Module &M, raw_ostream *OS,
namespace {
struct VerifierLegacyPass : public FunctionPass {
- static char ID;
+ static const char ID;
std::unique_ptr<Verifier> V;
bool FatalErrors = true;
@@ -8297,7 +8297,7 @@ bool TBAAVerifier::visitTBAAMetadata(const Instruction *I, const MDNode *MD) {
return true;
}
-char VerifierLegacyPass::ID = 0;
+const char VerifierLegacyPass::ID = 0;
INITIALIZE_PASS(VerifierLegacyPass, "verify", "Module Verifier", false, false)
FunctionPass *llvm::createVerifierPass(bool FatalErrors) {
diff --git a/llvm/lib/MCA/InstrBuilder.cpp b/llvm/lib/MCA/InstrBuilder.cpp
index ffd6a8d5c14a8..c9d3cb47fce92 100644
--- a/llvm/lib/MCA/InstrBuilder.cpp
+++ b/llvm/lib/MCA/InstrBuilder.cpp
@@ -26,7 +26,7 @@
namespace llvm {
namespace mca {
-char RecycledInstErr::ID = 0;
+const char RecycledInstErr::ID = 0;
InstrBuilder::InstrBuilder(const llvm::MCSubtargetInfo &sti,
const llvm::MCInstrInfo &mcii,
diff --git a/llvm/lib/MCA/Stages/Stage.cpp b/llvm/lib/MCA/Stages/Stage.cpp
index 5613d4d6bd072..4240a881ac8eb 100644
--- a/llvm/lib/MCA/Stages/Stage.cpp
+++ b/llvm/lib/MCA/Stages/Stage.cpp
@@ -24,6 +24,6 @@ void Stage::addListener(HWEventListener *Listener) {
Listeners.insert(Listener);
}
-char InstStreamPause::ID = 0;
+const char InstStreamPause::ID = 0;
} // namespace mca
} // namespace llvm
diff --git a/llvm/lib/Object/DXContainer.cpp b/llvm/lib/Object/DXContainer.cpp
index 7b7b8d88c63fc..b2eb06dcdf924 100644
--- a/llvm/lib/Object/DXContainer.cpp
+++ b/llvm/lib/Object/DXContainer.cpp
@@ -522,7 +522,7 @@ uint8_t DirectX::PSVRuntimeInfo::getSigPatchOrPrimCount() const {
class DXNotSupportedError : public ErrorInfo<DXNotSupportedError> {
public:
- static char ID;
+ static const char ID;
DXNotSupportedError(StringRef S) : FeatureString(S) {}
@@ -538,7 +538,7 @@ class DXNotSupportedError : public ErrorInfo<DXNotSupportedError> {
StringRef FeatureString;
};
-char DXNotSupportedError::ID = 0;
+const char DXNotSupportedError::ID = 0;
Expected<section_iterator>
DXContainerObjectFile::getSymbolSection(DataRefImpl Symb) const {
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp
index 62cb51ca09e44..dd0a7c2c033c7 100644
--- a/llvm/lib/Object/Error.cpp
+++ b/llvm/lib/Object/Error.cpp
@@ -59,8 +59,8 @@ std::string _object_error_category::message(int EV) const {
}
void BinaryError::anchor() {}
-char BinaryError::ID = 0;
-char GenericBinaryError::ID = 0;
+const char BinaryError::ID = 0;
+const char GenericBinaryError::ID = 0;
GenericBinaryError::GenericBinaryError(const Twine &Msg) : Msg(Msg.str()) {}
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index b63f105e93513..fc176f2edfcf4 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -1670,4 +1670,4 @@ const std::error_category &llvm::coverage::coveragemap_category() {
return ErrorCategory;
}
-char CoverageMapError::ID = 0;
+const char CoverageMapError::ID = 0;
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 82469481881c0..b4feb49e1a0ff 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -259,7 +259,7 @@ std::string InstrProfError::message() const {
return getInstrProfErrString(Err, Msg);
}
-char InstrProfError::ID = 0;
+const char InstrProfError::ID = 0;
ProfOStream::ProfOStream(raw_fd_ostream &FD)
: IsFDOStream(true), OS(FD), LE(FD, llvm::endianness::little) {}
diff --git a/llvm/lib/ProfileData/SymbolRemappingReader.cpp b/llvm/lib/ProfileData/SymbolRemappingReader.cpp
index 805f66b68ce7b..9e70fa2c8defa 100644
--- a/llvm/lib/ProfileData/SymbolRemappingReader.cpp
+++ b/llvm/lib/ProfileData/SymbolRemappingReader.cpp
@@ -19,7 +19,7 @@
using namespace llvm;
-char SymbolRemappingParseError::ID;
+const char SymbolRemappingParseError::ID = 0;
/// Load a set of name remappings from a text file.
///
diff --git a/llvm/lib/Remarks/RemarkParser.cpp b/llvm/lib/Remarks/RemarkParser.cpp
index 038fc1d3f4856..c6feebe917f3f 100644
--- a/llvm/lib/Remarks/RemarkParser.cpp
+++ b/llvm/lib/Remarks/RemarkParser.cpp
@@ -22,7 +22,7 @@
using namespace llvm;
using namespace llvm::remarks;
-char EndOfFileError::ID = 0;
+const char EndOfFileError::ID = 0;
ParsedStringTable::ParsedStringTable(StringRef InBuffer) : Buffer(InBuffer) {
while (!InBuffer.empty()) {
diff --git a/llvm/lib/Remarks/YAMLRemarkParser.cpp b/llvm/lib/Remarks/YAMLRemarkParser.cpp
index a8b1c0cc29ad6..e75daff2fd8bc 100644
--- a/llvm/lib/Remarks/YAMLRemarkParser.cpp
+++ b/llvm/lib/Remarks/YAMLRemarkParser.cpp
@@ -21,7 +21,7 @@
using namespace llvm;
using namespace llvm::remarks;
-char YAMLParseError::ID = 0;
+const char YAMLParseError::ID = 0;
static void handleDiagnostic(const SMDiagnostic &Diag, void *Ctx) {
assert(Ctx && "Expected non-null Ctx in diagnostic handler.");
diff --git a/llvm/lib/Remarks/YAMLRemarkParser.h b/llvm/lib/Remarks/YAMLRemarkParser.h
index 9a30e9e295cb2..062d7211c238e 100644
--- a/llvm/lib/Remarks/YAMLRemarkParser.h
+++ b/llvm/lib/Remarks/YAMLRemarkParser.h
@@ -28,7 +28,7 @@ namespace remarks {
class YAMLParseError : public ErrorInfo<YAMLParseError> {
public:
- static char ID;
+ static const char ID;
YAMLParseError(StringRef Message, SourceMgr &SM, yaml::Stream &Stream,
yaml::Node &Node);
diff --git a/llvm/lib/Support/BinaryStreamError.cpp b/llvm/lib/Support/BinaryStreamError.cpp
index 9b8f6862b65c2..479106e692c33 100644
--- a/llvm/lib/Support/BinaryStreamError.cpp
+++ b/llvm/lib/Support/BinaryStreamError.cpp
@@ -11,7 +11,7 @@
using namespace llvm;
-char BinaryStreamError::ID = 0;
+const char BinaryStreamError::ID = 0;
BinaryStreamError::BinaryStreamError(stream_error_code C)
: BinaryStreamError(C, "") {}
diff --git a/llvm/lib/Support/Error.cpp b/llvm/lib/Support/Error.cpp
index c6743155ced85..b74284ef5237a 100644
--- a/llvm/lib/Support/Error.cpp
+++ b/llvm/lib/Support/Error.cpp
@@ -51,12 +51,12 @@ static ErrorErrorCategory &getErrorErrorCat() {
}
void ErrorInfoBase::anchor() {}
-char ErrorInfoBase::ID = 0;
-char ErrorList::ID = 0;
+const char ErrorInfoBase::ID = 0;
+const char ErrorList::ID = 0;
void ECError::anchor() {}
-char ECError::ID = 0;
-char StringError::ID = 0;
-char FileError::ID = 0;
+const char ECError::ID = 0;
+const char StringError::ID = 0;
+const char FileError::ID = 0;
void llvm::logAllUnhandledErrors(Error E, raw_ostream &OS, Twine ErrorBanner) {
if (!E)
@@ -199,7 +199,7 @@ char *LLVMGetErrorMessage(LLVMErrorRef Err) {
void LLVMDisposeErrorMessage(char *ErrMsg) { delete[] ErrMsg; }
LLVMErrorTypeId LLVMGetStringErrorTypeId() {
- return reinterpret_cast<void *>(&StringError::ID);
+ return reinterpret_cast<const void *>(&StringError::ID);
}
LLVMErrorRef LLVMCreateStringError(const char *ErrMsg) {
diff --git a/llvm/lib/Support/ExtensibleRTTI.cpp b/llvm/lib/Support/ExtensibleRTTI.cpp
index a6a5c196fb352..742f14acadd6e 100644
--- a/llvm/lib/Support/ExtensibleRTTI.cpp
+++ b/llvm/lib/Support/ExtensibleRTTI.cpp
@@ -9,4 +9,4 @@
#include "llvm/Support/ExtensibleRTTI.h"
void llvm::RTTIRoot::anchor() {}
-char llvm::RTTIRoot::ID = 0;
+const char llvm::RTTIRoot::ID = 0;
diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp
index e9fd8f8fae1fa..b28772463a9ed 100644
--- a/llvm/lib/Support/JSON.cpp
+++ b/llvm/lib/Support/JSON.cpp
@@ -688,7 +688,7 @@ Expected<Value> parse(StringRef JSON) {
return std::move(E);
return P.takeError();
}
-char ParseError::ID = 0;
+const char ParseError::ID = 0;
bool isUTF8(llvm::StringRef S, size_t *ErrOffset) {
// Fast-path for ASCII, which is valid UTF-8.
diff --git a/llvm/lib/Support/LSP/Protocol.cpp b/llvm/lib/Support/LSP/Protocol.cpp
index 5c2379431e900..f4bb3af182122 100644
--- a/llvm/lib/Support/LSP/Protocol.cpp
+++ b/llvm/lib/Support/LSP/Protocol.cpp
@@ -41,7 +41,7 @@ static bool mapOptOrNull(const llvm::json::Value &Params,
// LSPError
//===----------------------------------------------------------------------===//
-char LSPError::ID;
+const char LSPError::ID = 0;
//===----------------------------------------------------------------------===//
// URIForFile
diff --git a/llvm/lib/Support/VirtualOutputError.cpp b/llvm/lib/Support/VirtualOutputError.cpp
index c899c621205f4..3e864ee48302c 100644
--- a/llvm/lib/Support/VirtualOutputError.cpp
+++ b/llvm/lib/Support/VirtualOutputError.cpp
@@ -20,9 +20,9 @@ void OutputError::anchor() {}
void OutputConfigError::anchor() {}
void TempFileOutputError::anchor() {}
-char OutputError::ID = 0;
-char OutputConfigError::ID = 0;
-char TempFileOutputError::ID = 0;
+const char OutputError::ID = 0;
+const char OutputConfigError::ID = 0;
+const char TempFileOutputError::ID = 0;
void OutputError::log(raw_ostream &OS) const {
OS << getOutputPath() << ": ";
diff --git a/llvm/lib/Support/VirtualOutputFile.cpp b/llvm/lib/Support/VirtualOutputFile.cpp
index 62f54266d3be4..bd493ef254e4f 100644
--- a/llvm/lib/Support/VirtualOutputFile.cpp
+++ b/llvm/lib/Support/VirtualOutputFile.cpp
@@ -19,8 +19,8 @@
using namespace llvm;
using namespace llvm::vfs;
-char OutputFileImpl::ID = 0;
-char NullOutputFileImpl::ID = 0;
+const char OutputFileImpl::ID = 0;
+const char NullOutputFileImpl::ID = 0;
void OutputFileImpl::anchor() {}
void NullOutputFileImpl::anchor() {}
diff --git a/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp b/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp
index 407714adfb8b8..2247985fde081 100644
--- a/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp
+++ b/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp
@@ -80,7 +80,7 @@ class AArch64A53Fix835769 : public MachineFunctionPass {
const TargetInstrInfo *TII;
public:
- static char ID;
+ static const char ID;
explicit AArch64A53Fix835769() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -101,7 +101,7 @@ class AArch64A53Fix835769 : public MachineFunctionPass {
private:
bool runOnBasicBlock(MachineBasicBlock &MBB);
};
-char AArch64A53Fix835769::ID = 0;
+const char AArch64A53Fix835769::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
index b816f11508bed..006c0d73a361a 100644
--- a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
+++ b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
@@ -111,7 +111,7 @@ class AArch64A57FPLoadBalancing : public MachineFunctionPass {
RegisterClassInfo RCI;
public:
- static char ID;
+ static const char ID;
explicit AArch64A57FPLoadBalancing() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -145,7 +145,7 @@ class AArch64A57FPLoadBalancing : public MachineFunctionPass {
};
}
-char AArch64A57FPLoadBalancing::ID = 0;
+const char AArch64A57FPLoadBalancing::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64A57FPLoadBalancing, DEBUG_TYPE,
"AArch64 A57 FP Load-Balancing", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp b/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp
index c85adcf85f8dc..b14293e112b2f 100644
--- a/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp
@@ -81,7 +81,7 @@ class AArch64AdvSIMDScalar : public MachineFunctionPass {
bool processMachineBasicBlock(MachineBasicBlock *MBB);
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
explicit AArch64AdvSIMDScalar() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -93,7 +93,7 @@ class AArch64AdvSIMDScalar : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}
};
-char AArch64AdvSIMDScalar::ID = 0;
+const char AArch64AdvSIMDScalar::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(AArch64AdvSIMDScalar, "aarch64-simd-scalar",
diff --git a/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp b/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
index c27a693ceecc1..dd6d08152ccce 100644
--- a/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
@@ -61,7 +61,7 @@ struct ThunkArgInfo {
class AArch64Arm64ECCallLowering : public ModulePass {
public:
- static char ID;
+ static const char ID;
AArch64Arm64ECCallLowering() : ModulePass(ID) {}
Function *buildExitThunk(FunctionType *FnTy, AttributeList Attrs);
@@ -1018,7 +1018,7 @@ bool AArch64Arm64ECCallLowering::processFunction(
return true;
}
-char AArch64Arm64ECCallLowering::ID = 0;
+const char AArch64Arm64ECCallLowering::ID = 0;
INITIALIZE_PASS(AArch64Arm64ECCallLowering, "Arm64ECCallLowering",
"AArch64Arm64ECCallLowering", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 2b8db27599d3c..aa13b375b3ba9 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -107,7 +107,7 @@ class AArch64AsmPrinter : public AsmPrinter {
unsigned PAuthIFuncNextUniqueID = 1;
public:
- static char ID;
+ static const char ID;
AArch64AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer), ID),
@@ -4014,7 +4014,7 @@ const MCExpr *AArch64AsmPrinter::lowerConstant(const Constant *CV,
return AsmPrinter::lowerConstant(CV, BaseCV, Offset);
}
-char AArch64AsmPrinter::ID = 0;
+const char AArch64AsmPrinter::ID = 0;
INITIALIZE_PASS(AArch64AsmPrinter, "aarch64-asm-printer",
"AArch64 Assembly Printer", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp b/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
index 57934ae2da1cd..3c4c11e89e8ac 100644
--- a/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
+++ b/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
@@ -41,7 +41,7 @@ enum : unsigned {
class AArch64BranchTargets : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64BranchTargets() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -56,7 +56,7 @@ class AArch64BranchTargets : public MachineFunctionPass {
} // end anonymous namespace
-char AArch64BranchTargets::ID = 0;
+const char AArch64BranchTargets::ID = 0;
INITIALIZE_PASS(AArch64BranchTargets, "aarch64-branch-targets",
AARCH64_BRANCH_TARGETS_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp b/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
index f17adcce6c3a4..69739e604b5b4 100644
--- a/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
@@ -34,7 +34,7 @@ using namespace llvm;
namespace {
struct LDTLSCleanup : public MachineFunctionPass {
- static char ID;
+ static const char ID;
LDTLSCleanup() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -145,7 +145,7 @@ struct LDTLSCleanup : public MachineFunctionPass {
INITIALIZE_PASS(LDTLSCleanup, "aarch64-local-dynamic-tls-cleanup",
TLSCLEANUP_PASS_NAME, false, false)
-char LDTLSCleanup::ID = 0;
+const char LDTLSCleanup::ID = 0;
FunctionPass *llvm::createAArch64CleanupLocalDynamicTLSPass() {
return new LDTLSCleanup();
}
diff --git a/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp b/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
index 064716216d1cb..a75f73b1fbfa7 100644
--- a/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
+++ b/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
@@ -126,7 +126,7 @@ STATISTIC(NumADRSimpleCandidate, "Number of simplifiable ADRP + ADD");
namespace {
struct AArch64CollectLOH : public MachineFunctionPass {
- static char ID;
+ static const char ID;
AArch64CollectLOH() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -143,7 +143,7 @@ struct AArch64CollectLOH : public MachineFunctionPass {
}
};
-char AArch64CollectLOH::ID = 0;
+const char AArch64CollectLOH::ID = 0;
} // end anonymous namespace.
diff --git a/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp b/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
index 37ad308e4287d..9a623bd9706f7 100644
--- a/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
+++ b/llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
@@ -46,7 +46,7 @@ class AArch64CompressJumpTables : public MachineFunctionPass {
bool compressJumpTable(MachineInstr &MI, int Offset);
public:
- static char ID;
+ static const char ID;
AArch64CompressJumpTables() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -58,7 +58,7 @@ class AArch64CompressJumpTables : public MachineFunctionPass {
return "AArch64 Compress Jump Tables";
}
};
-char AArch64CompressJumpTables::ID = 0;
+const char AArch64CompressJumpTables::ID = 0;
} // namespace
INITIALIZE_PASS(AArch64CompressJumpTables, DEBUG_TYPE,
diff --git a/llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp b/llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp
index 96d7ce08a02e2..ffdcb4b26184d 100644
--- a/llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp
+++ b/llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp
@@ -51,7 +51,7 @@ class AArch64CondBrTuning : public MachineFunctionPass {
MachineRegisterInfo *MRI;
public:
- static char ID;
+ static const char ID;
AArch64CondBrTuning() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -66,7 +66,7 @@ class AArch64CondBrTuning : public MachineFunctionPass {
};
} // end anonymous namespace
-char AArch64CondBrTuning::ID = 0;
+const char AArch64CondBrTuning::ID = 0;
INITIALIZE_PASS(AArch64CondBrTuning, "aarch64-cond-br-tuning",
AARCH64_CONDBR_TUNING_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
index f428252e143ba..4b97bb3dd765b 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
@@ -110,7 +110,7 @@ class AArch64ConditionOptimizer : public MachineFunctionPass {
// order) of adjusted comparison.
using CmpInfo = std::tuple<int, unsigned, AArch64CC::CondCode>;
- static char ID;
+ static const char ID;
AArch64ConditionOptimizer() : MachineFunctionPass(ID) {}
@@ -132,7 +132,7 @@ class AArch64ConditionOptimizer : public MachineFunctionPass {
} // end anonymous namespace
-char AArch64ConditionOptimizer::ID = 0;
+const char AArch64ConditionOptimizer::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64ConditionOptimizer, "aarch64-condopt",
"AArch64 CondOpt Pass", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
index 058cae92de45b..cd20be5c1a45c 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
@@ -768,7 +768,7 @@ class AArch64ConditionalCompares : public MachineFunctionPass {
SSACCmpConv CmpConv;
public:
- static char ID;
+ static const char ID;
AArch64ConditionalCompares() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -785,7 +785,7 @@ class AArch64ConditionalCompares : public MachineFunctionPass {
};
} // end anonymous namespace
-char AArch64ConditionalCompares::ID = 0;
+const char AArch64ConditionalCompares::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64ConditionalCompares, "aarch64-ccmp",
"AArch64 CCMP Pass", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp b/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp
index 4ff49a627c794..3c0a69f2f067e 100644
--- a/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp
@@ -39,7 +39,7 @@ class AArch64DeadRegisterDefinitions : public MachineFunctionPass {
bool Changed;
void processMachineBasicBlock(MachineBasicBlock &MBB);
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
AArch64DeadRegisterDefinitions() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -51,7 +51,7 @@ class AArch64DeadRegisterDefinitions : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}
};
-char AArch64DeadRegisterDefinitions::ID = 0;
+const char AArch64DeadRegisterDefinitions::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(AArch64DeadRegisterDefinitions, "aarch64-dead-defs",
diff --git a/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp b/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
index 27d5940c808d2..321b90d9eca6e 100644
--- a/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
@@ -48,7 +48,7 @@ class AArch64ExpandPseudo : public MachineFunctionPass {
public:
const AArch64InstrInfo *TII;
- static char ID;
+ static const char ID;
AArch64ExpandPseudo() : MachineFunctionPass(ID) {}
@@ -110,7 +110,7 @@ class AArch64ExpandPseudo : public MachineFunctionPass {
} // end anonymous namespace
-char AArch64ExpandPseudo::ID = 0;
+const char AArch64ExpandPseudo::ID = 0;
INITIALIZE_PASS(AArch64ExpandPseudo, "aarch64-expand-pseudo",
AARCH64_EXPAND_PSEUDO_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
index 21756177fc74a..d5c507f4131d2 100644
--- a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
@@ -79,7 +79,7 @@ class FalkorMarkStridedAccesses {
class FalkorMarkStridedAccessesLegacy : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
FalkorMarkStridedAccessesLegacy() : FunctionPass(ID) {}
@@ -97,7 +97,7 @@ class FalkorMarkStridedAccessesLegacy : public FunctionPass {
} // end anonymous namespace
-char FalkorMarkStridedAccessesLegacy::ID = 0;
+const char FalkorMarkStridedAccessesLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(FalkorMarkStridedAccessesLegacy, DEBUG_TYPE,
"Falkor HW Prefetch Fix", false, false)
@@ -175,7 +175,7 @@ namespace {
class FalkorHWPFFix : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
FalkorHWPFFix() : MachineFunctionPass(ID) {}
@@ -213,7 +213,7 @@ struct LoadInfo {
} // end anonymous namespace
-char FalkorHWPFFix::ID = 0;
+const char FalkorHWPFFix::ID = 0;
INITIALIZE_PASS_BEGIN(FalkorHWPFFix, "aarch64-falkor-hwpf-fix-late",
"Falkor HW Prefetch Fix Late Phase", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
index 5a4f00ea718fb..b73e4743f6065 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -525,7 +525,7 @@ class AArch64DAGToDAGISel : public SelectionDAGISel {
class AArch64DAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit AArch64DAGToDAGISelLegacy(AArch64TargetMachine &tm,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -533,7 +533,7 @@ class AArch64DAGToDAGISelLegacy : public SelectionDAGISelLegacy {
};
} // end anonymous namespace
-char AArch64DAGToDAGISelLegacy::ID = 0;
+const char AArch64DAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(AArch64DAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
index 3d9444c0c5426..87eea18f2c125 100644
--- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -121,7 +121,7 @@ using LdStPairFlags = struct LdStPairFlags {
};
struct AArch64LoadStoreOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
AArch64LoadStoreOpt() : MachineFunctionPass(ID) {}
@@ -238,7 +238,7 @@ struct AArch64LoadStoreOpt : public MachineFunctionPass {
StringRef getPassName() const override { return AARCH64_LOAD_STORE_OPT_NAME; }
};
-char AArch64LoadStoreOpt::ID = 0;
+const char AArch64LoadStoreOpt::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
index d69f12e7c0a7c..c1ea4afabc898 100644
--- a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
@@ -71,7 +71,7 @@ class AArch64LowerHomogeneousPE {
class AArch64LowerHomogeneousPrologEpilog : public ModulePass {
public:
- static char ID;
+ static const char ID;
AArch64LowerHomogeneousPrologEpilog() : ModulePass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -89,7 +89,7 @@ class AArch64LowerHomogeneousPrologEpilog : public ModulePass {
} // end anonymous namespace
-char AArch64LowerHomogeneousPrologEpilog::ID = 0;
+const char AArch64LowerHomogeneousPrologEpilog::ID = 0;
INITIALIZE_PASS(AArch64LowerHomogeneousPrologEpilog,
"aarch64-lower-homogeneous-prolog-epilog",
diff --git a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
index 21ff921da9b8a..c0add617ff8a4 100644
--- a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+++ b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
@@ -82,7 +82,7 @@ using namespace llvm;
namespace {
struct AArch64MIPeepholeOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
AArch64MIPeepholeOpt() : MachineFunctionPass(ID) {}
@@ -154,7 +154,7 @@ struct AArch64MIPeepholeOpt : public MachineFunctionPass {
}
};
-char AArch64MIPeepholeOpt::ID = 0;
+const char AArch64MIPeepholeOpt::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp b/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
index 517b8a4c1737b..eb99d78f2ec46 100644
--- a/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
@@ -26,7 +26,7 @@ namespace {
class AArch64PointerAuth : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64PointerAuth() : MachineFunctionPass(ID) {}
@@ -55,7 +55,7 @@ FunctionPass *llvm::createAArch64PointerAuthPass() {
return new AArch64PointerAuth();
}
-char AArch64PointerAuth::ID = 0;
+const char AArch64PointerAuth::ID = 0;
static void emitPACSymOffsetIntoX16(const TargetInstrInfo &TII,
MachineBasicBlock &MBB,
diff --git a/llvm/lib/Target/AArch64/AArch64PostCoalescerPass.cpp b/llvm/lib/Target/AArch64/AArch64PostCoalescerPass.cpp
index a90950ddaaa96..5c39134bc4b8d 100644
--- a/llvm/lib/Target/AArch64/AArch64PostCoalescerPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PostCoalescerPass.cpp
@@ -19,7 +19,7 @@ using namespace llvm;
namespace {
struct AArch64PostCoalescer : public MachineFunctionPass {
- static char ID;
+ static const char ID;
AArch64PostCoalescer() : MachineFunctionPass(ID) {}
@@ -39,7 +39,7 @@ struct AArch64PostCoalescer : public MachineFunctionPass {
}
};
-char AArch64PostCoalescer::ID = 0;
+const char AArch64PostCoalescer::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
index 3f45d55063b50..5b9126969f68c 100644
--- a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
@@ -106,7 +106,7 @@ class AArch64PromoteConstant : public ModulePass {
: C(C), User(User), Op(Op) {}
};
- static char ID;
+ static const char ID;
AArch64PromoteConstant() : ModulePass(ID) {}
@@ -220,7 +220,7 @@ class AArch64PromoteConstant : public ModulePass {
} // end anonymous namespace
-char AArch64PromoteConstant::ID = 0;
+const char AArch64PromoteConstant::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64PromoteConstant, "aarch64-promote-const",
"AArch64 Promote Constant Pass", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64RedundantCondBranchPass.cpp b/llvm/lib/Target/AArch64/AArch64RedundantCondBranchPass.cpp
index 1a5a9f0a6018b..527ae441aaade 100644
--- a/llvm/lib/Target/AArch64/AArch64RedundantCondBranchPass.cpp
+++ b/llvm/lib/Target/AArch64/AArch64RedundantCondBranchPass.cpp
@@ -27,7 +27,7 @@ using namespace llvm;
namespace {
class AArch64RedundantCondBranch : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64RedundantCondBranch() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -39,7 +39,7 @@ class AArch64RedundantCondBranch : public MachineFunctionPass {
return "AArch64 Redundant Conditional Branch Elimination";
}
};
-char AArch64RedundantCondBranch::ID = 0;
+const char AArch64RedundantCondBranch::ID = 0;
} // namespace
INITIALIZE_PASS(AArch64RedundantCondBranch, "aarch64-redundantcondbranch",
diff --git a/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp b/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
index 9dc721eb7315d..c1315cdeb003c 100644
--- a/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
+++ b/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
@@ -78,7 +78,7 @@ class AArch64RedundantCopyElimination : public MachineFunctionPass {
LiveRegUnits OptBBClobberedRegs, OptBBUsedRegs;
public:
- static char ID;
+ static const char ID;
AArch64RedundantCopyElimination() : MachineFunctionPass(ID) {}
struct RegImm {
@@ -99,7 +99,7 @@ class AArch64RedundantCopyElimination : public MachineFunctionPass {
return "AArch64 Redundant Copy Elimination";
}
};
-char AArch64RedundantCopyElimination::ID = 0;
+const char AArch64RedundantCopyElimination::ID = 0;
}
INITIALIZE_PASS(AArch64RedundantCopyElimination, "aarch64-copyelim",
diff --git a/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp b/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp
index 6b42323448bb9..676135940cfe1 100644
--- a/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp
+++ b/llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp
@@ -66,7 +66,7 @@ STATISTIC(NumModifiedInstr,
namespace {
struct AArch64SIMDInstrOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const AArch64InstrInfo *TII;
MachineRegisterInfo *MRI;
@@ -203,7 +203,7 @@ struct AArch64SIMDInstrOpt : public MachineFunctionPass {
}
};
-char AArch64SIMDInstrOpt::ID = 0;
+const char AArch64SIMDInstrOpt::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/AArch64SLSHardening.cpp b/llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
index 0dc57f7353885..210f020f952d6 100644
--- a/llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
+++ b/llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
@@ -508,7 +508,7 @@ bool SLSHardeningInserter::hardenBLRs(MachineModuleInfo &MMI,
namespace {
class AArch64SLSHardening : public ThunkInserterPass<SLSHardeningInserter> {
public:
- static char ID;
+ static const char ID;
AArch64SLSHardening() : ThunkInserterPass(ID) {}
@@ -517,7 +517,7 @@ class AArch64SLSHardening : public ThunkInserterPass<SLSHardeningInserter> {
} // end anonymous namespace
-char AArch64SLSHardening::ID = 0;
+const char AArch64SLSHardening::ID = 0;
INITIALIZE_PASS(AArch64SLSHardening, "aarch64-sls-hardening",
AARCH64_SLS_HARDENING_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp b/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp
index a591ba9aceb67..b5ccc19fc5c8a 100644
--- a/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp
+++ b/llvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp
@@ -124,7 +124,7 @@ class AArch64SpeculationHardening : public MachineFunctionPass {
const TargetInstrInfo *TII;
const TargetRegisterInfo *TRI;
- static char ID;
+ static const char ID;
AArch64SpeculationHardening() : MachineFunctionPass(ID) {}
@@ -173,7 +173,7 @@ class AArch64SpeculationHardening : public MachineFunctionPass {
} // end anonymous namespace
-char AArch64SpeculationHardening::ID = 0;
+const char AArch64SpeculationHardening::ID = 0;
INITIALIZE_PASS(AArch64SpeculationHardening, "aarch64-speculation-hardening",
AARCH64_SPECULATION_HARDENING_NAME, false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
index 1a7ed7848f057..526307cb2a924 100644
--- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
@@ -303,7 +303,7 @@ class AArch64StackTagging : public FunctionPass {
const bool UseStackSafety;
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
AArch64StackTagging(bool IsOptNone = false)
: FunctionPass(ID),
@@ -345,7 +345,7 @@ class AArch64StackTagging : public FunctionPass {
} // end anonymous namespace
-char AArch64StackTagging::ID = 0;
+const char AArch64StackTagging::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64StackTagging, DEBUG_TYPE, "AArch64 Stack Tagging",
false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp b/llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
index 7f0b48dd4a198..d2b61695edf35 100644
--- a/llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
+++ b/llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
@@ -61,7 +61,7 @@ class AArch64StackTaggingPreRA : public MachineFunctionPass {
SmallVector<MachineInstr*, 16> ReTags;
public:
- static char ID;
+ static const char ID;
AArch64StackTaggingPreRA() : MachineFunctionPass(ID) {}
bool mayUseUncheckedLoadStore();
@@ -81,7 +81,7 @@ class AArch64StackTaggingPreRA : public MachineFunctionPass {
};
} // end anonymous namespace
-char AArch64StackTaggingPreRA::ID = 0;
+const char AArch64StackTaggingPreRA::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64StackTaggingPreRA, "aarch64-stack-tagging-pre-ra",
"AArch64 Stack Tagging PreRA Pass", false, false)
diff --git a/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp b/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp
index dd775da97112d..47b2fcce7f37a 100644
--- a/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp
+++ b/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp
@@ -37,7 +37,7 @@ class AArch64StorePairSuppress : public MachineFunctionPass {
MachineTraceMetrics::Ensemble *MinInstr;
public:
- static char ID;
+ static const char ID;
AArch64StorePairSuppress() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return STPSUPPRESS_PASS_NAME; }
@@ -56,7 +56,7 @@ class AArch64StorePairSuppress : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}
};
-char AArch64StorePairSuppress::ID = 0;
+const char AArch64StorePairSuppress::ID = 0;
} // anonymous
INITIALIZE_PASS(AArch64StorePairSuppress, "aarch64-stp-suppress",
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64O0PreLegalizerCombiner.cpp b/llvm/lib/Target/AArch64/GISel/AArch64O0PreLegalizerCombiner.cpp
index 7f568b49f2619..b439d4ce5fc16 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64O0PreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64O0PreLegalizerCombiner.cpp
@@ -116,7 +116,7 @@ bool AArch64O0PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
class AArch64O0PreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64O0PreLegalizerCombiner();
@@ -176,7 +176,7 @@ bool AArch64O0PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AArch64O0PreLegalizerCombiner::ID = 0;
+const char AArch64O0PreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64O0PreLegalizerCombiner, DEBUG_TYPE,
"Combine AArch64 machine instrs before legalization",
false, false)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
index fa7bb6ecc35ee..b46de4f524b49 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
@@ -599,7 +599,7 @@ AArch64PostLegalizerCombinerImpl::AArch64PostLegalizerCombinerImpl(
class AArch64PostLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64PostLegalizerCombiner(bool IsOptNone = false);
@@ -876,7 +876,7 @@ bool AArch64PostLegalizerCombiner::optimizeConsecutiveMemOpAddressing(
return Changed;
}
-char AArch64PostLegalizerCombiner::ID = 0;
+const char AArch64PostLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64PostLegalizerCombiner, DEBUG_TYPE,
"Combine AArch64 MachineInstrs after legalization", false,
false)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
index 221a7bcd881bb..64ad451fe6cd8 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
@@ -1250,7 +1250,7 @@ AArch64PostLegalizerLoweringImpl::AArch64PostLegalizerLoweringImpl(
class AArch64PostLegalizerLowering : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64PostLegalizerLowering();
@@ -1300,7 +1300,7 @@ bool AArch64PostLegalizerLowering::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AArch64PostLegalizerLowering::ID = 0;
+const char AArch64PostLegalizerLowering::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64PostLegalizerLowering, DEBUG_TYPE,
"Lower AArch64 MachineInstrs after legalization", false,
false)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp
index 4bd025da636ca..40315687f1fbf 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64PostSelectOptimize.cpp
@@ -31,7 +31,7 @@ using namespace llvm;
namespace {
class AArch64PostSelectOptimize : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64PostSelectOptimize() : MachineFunctionPass(ID) {}
@@ -304,7 +304,7 @@ bool AArch64PostSelectOptimize::runOnMachineFunction(MachineFunction &MF) {
return Changed;
}
-char AArch64PostSelectOptimize::ID = 0;
+const char AArch64PostSelectOptimize::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64PostSelectOptimize, DEBUG_TYPE,
"Optimize AArch64 selected instructions",
false, false)
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
index 45cbe7b5aa2fe..a388d1eb56f99 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
@@ -806,7 +806,7 @@ bool AArch64PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
class AArch64PreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AArch64PreLegalizerCombiner();
@@ -882,7 +882,7 @@ bool AArch64PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AArch64PreLegalizerCombiner::ID = 0;
+const char AArch64PreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AArch64PreLegalizerCombiner, DEBUG_TYPE,
"Combine AArch64 machine instrs before legalization",
false, false)
diff --git a/llvm/lib/Target/AArch64/SMEABIPass.cpp b/llvm/lib/Target/AArch64/SMEABIPass.cpp
index 4245afbbf6beb..4a460964bcbc2 100644
--- a/llvm/lib/Target/AArch64/SMEABIPass.cpp
+++ b/llvm/lib/Target/AArch64/SMEABIPass.cpp
@@ -33,7 +33,7 @@ using namespace llvm;
namespace {
struct SMEABI : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
SMEABI() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
@@ -48,7 +48,7 @@ struct SMEABI : public FunctionPass {
};
} // end anonymous namespace
-char SMEABI::ID = 0;
+const char SMEABI::ID = 0;
static const char *name = "SME ABI Pass";
INITIALIZE_PASS(SMEABI, DEBUG_TYPE, name, false, false)
diff --git a/llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp b/llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
index 2a563663a34d1..ecdda31a1b22f 100644
--- a/llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
+++ b/llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
struct SMEPeepholeOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
SMEPeepholeOpt() : MachineFunctionPass(ID) {}
@@ -46,7 +46,7 @@ struct SMEPeepholeOpt : public MachineFunctionPass {
bool visitRegSequence(MachineInstr &MI);
};
-char SMEPeepholeOpt::ID = 0;
+const char SMEPeepholeOpt::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp b/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
index cf4f59bd6c304..db3ed39e040a2 100644
--- a/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
+++ b/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
@@ -43,7 +43,7 @@ using namespace llvm::PatternMatch;
namespace {
struct SVEIntrinsicOpts : public ModulePass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
SVEIntrinsicOpts() : ModulePass(ID) {}
bool runOnModule(Module &M) override;
@@ -69,7 +69,7 @@ void SVEIntrinsicOpts::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
}
-char SVEIntrinsicOpts::ID = 0;
+const char SVEIntrinsicOpts::ID = 0;
static const char *name = "SVE intrinsics optimizations";
INITIALIZE_PASS_BEGIN(SVEIntrinsicOpts, DEBUG_TYPE, name, false, false)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.h b/llvm/lib/Target/AMDGPU/AMDGPU.h
index 5df11a45b4889..5a29b3ba3ff6d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPU.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPU.h
@@ -104,19 +104,19 @@ void initializeAMDGPUAsmPrinterPass(PassRegistry &);
enum class ScanOptions { DPP, Iterative, None };
FunctionPass *createAMDGPUAtomicOptimizerPass(ScanOptions ScanStrategy);
void initializeAMDGPUAtomicOptimizerPass(PassRegistry &);
-extern char &AMDGPUAtomicOptimizerID;
+extern const char &AMDGPUAtomicOptimizerID;
ModulePass *createAMDGPUCtorDtorLoweringLegacyPass();
void initializeAMDGPUCtorDtorLoweringLegacyPass(PassRegistry &);
-extern char &AMDGPUCtorDtorLoweringLegacyPassID;
+extern const char &AMDGPUCtorDtorLoweringLegacyPassID;
FunctionPass *createAMDGPULowerKernelArgumentsPass();
void initializeAMDGPULowerKernelArgumentsPass(PassRegistry &);
-extern char &AMDGPULowerKernelArgumentsID;
+extern const char &AMDGPULowerKernelArgumentsID;
FunctionPass *createAMDGPUPromoteKernelArgumentsPass();
void initializeAMDGPUPromoteKernelArgumentsPass(PassRegistry &);
-extern char &AMDGPUPromoteKernelArgumentsID;
+extern const char &AMDGPUPromoteKernelArgumentsID;
struct AMDGPUPromoteKernelArgumentsPass
: PassInfoMixin<AMDGPUPromoteKernelArgumentsPass> {
@@ -125,7 +125,7 @@ struct AMDGPUPromoteKernelArgumentsPass
ModulePass *createAMDGPULowerKernelAttributesPass();
void initializeAMDGPULowerKernelAttributesPass(PassRegistry &);
-extern char &AMDGPULowerKernelAttributesID;
+extern const char &AMDGPULowerKernelAttributesID;
struct AMDGPULowerKernelAttributesPass
: PassInfoMixin<AMDGPULowerKernelAttributesPass> {
@@ -133,7 +133,7 @@ struct AMDGPULowerKernelAttributesPass
};
void initializeAMDGPULowerModuleLDSLegacyPass(PassRegistry &);
-extern char &AMDGPULowerModuleLDSLegacyPassID;
+extern const char &AMDGPULowerModuleLDSLegacyPassID;
struct AMDGPULowerModuleLDSPass : PassInfoMixin<AMDGPULowerModuleLDSPass> {
const AMDGPUTargetMachine &TM;
@@ -143,7 +143,7 @@ struct AMDGPULowerModuleLDSPass : PassInfoMixin<AMDGPULowerModuleLDSPass> {
};
void initializeAMDGPULowerBufferFatPointersPass(PassRegistry &);
-extern char &AMDGPULowerBufferFatPointersID;
+extern const char &AMDGPULowerBufferFatPointersID;
struct AMDGPULowerBufferFatPointersPass
: PassInfoMixin<AMDGPULowerBufferFatPointersPass> {
@@ -165,93 +165,93 @@ struct AMDGPULowerIntrinsicsPass : PassInfoMixin<AMDGPULowerIntrinsicsPass> {
};
void initializeAMDGPUPrepareAGPRAllocLegacyPass(PassRegistry &);
-extern char &AMDGPUPrepareAGPRAllocLegacyID;
+extern const char &AMDGPUPrepareAGPRAllocLegacyID;
void initializeAMDGPUReserveWWMRegsLegacyPass(PassRegistry &);
-extern char &AMDGPUReserveWWMRegsLegacyID;
+extern const char &AMDGPUReserveWWMRegsLegacyID;
void initializeAMDGPURewriteOutArgumentsPass(PassRegistry &);
-extern char &AMDGPURewriteOutArgumentsID;
+extern const char &AMDGPURewriteOutArgumentsID;
void initializeGCNDPPCombineLegacyPass(PassRegistry &);
-extern char &GCNDPPCombineLegacyID;
+extern const char &GCNDPPCombineLegacyID;
void initializeSIFoldOperandsLegacyPass(PassRegistry &);
-extern char &SIFoldOperandsLegacyID;
+extern const char &SIFoldOperandsLegacyID;
void initializeSIPeepholeSDWALegacyPass(PassRegistry &);
-extern char &SIPeepholeSDWALegacyID;
+extern const char &SIPeepholeSDWALegacyID;
void initializeSIShrinkInstructionsLegacyPass(PassRegistry &);
-extern char &SIShrinkInstructionsLegacyID;
+extern const char &SIShrinkInstructionsLegacyID;
void initializeSIFixSGPRCopiesLegacyPass(PassRegistry &);
-extern char &SIFixSGPRCopiesLegacyID;
+extern const char &SIFixSGPRCopiesLegacyID;
void initializeSIFixVGPRCopiesLegacyPass(PassRegistry &);
-extern char &SIFixVGPRCopiesID;
+extern const char &SIFixVGPRCopiesID;
void initializeSILowerWWMCopiesLegacyPass(PassRegistry &);
-extern char &SILowerWWMCopiesLegacyID;
+extern const char &SILowerWWMCopiesLegacyID;
void initializeSILowerI1CopiesLegacyPass(PassRegistry &);
-extern char &SILowerI1CopiesLegacyID;
+extern const char &SILowerI1CopiesLegacyID;
void initializeAMDGPUGlobalISelDivergenceLoweringPass(PassRegistry &);
-extern char &AMDGPUGlobalISelDivergenceLoweringID;
+extern const char &AMDGPUGlobalISelDivergenceLoweringID;
void initializeAMDGPURegBankSelectPass(PassRegistry &);
-extern char &AMDGPURegBankSelectID;
+extern const char &AMDGPURegBankSelectID;
void initializeAMDGPURegBankLegalizePass(PassRegistry &);
-extern char &AMDGPURegBankLegalizeID;
+extern const char &AMDGPURegBankLegalizeID;
void initializeAMDGPUMarkLastScratchLoadLegacyPass(PassRegistry &);
-extern char &AMDGPUMarkLastScratchLoadID;
+extern const char &AMDGPUMarkLastScratchLoadID;
void initializeSILowerSGPRSpillsLegacyPass(PassRegistry &);
-extern char &SILowerSGPRSpillsLegacyID;
+extern const char &SILowerSGPRSpillsLegacyID;
void initializeSILoadStoreOptimizerLegacyPass(PassRegistry &);
-extern char &SILoadStoreOptimizerLegacyID;
+extern const char &SILoadStoreOptimizerLegacyID;
void initializeSIWholeQuadModeLegacyPass(PassRegistry &);
-extern char &SIWholeQuadModeID;
+extern const char &SIWholeQuadModeID;
void initializeSILowerControlFlowLegacyPass(PassRegistry &);
-extern char &SILowerControlFlowLegacyID;
+extern const char &SILowerControlFlowLegacyID;
void initializeSIPreEmitPeepholeLegacyPass(PassRegistry &);
-extern char &SIPreEmitPeepholeID;
+extern const char &SIPreEmitPeepholeID;
void initializeSILateBranchLoweringLegacyPass(PassRegistry &);
-extern char &SILateBranchLoweringPassID;
+extern const char &SILateBranchLoweringPassID;
void initializeSIOptimizeExecMaskingLegacyPass(PassRegistry &);
-extern char &SIOptimizeExecMaskingLegacyID;
+extern const char &SIOptimizeExecMaskingLegacyID;
void initializeSIPreAllocateWWMRegsLegacyPass(PassRegistry &);
-extern char &SIPreAllocateWWMRegsLegacyID;
+extern const char &SIPreAllocateWWMRegsLegacyID;
void initializeAMDGPUImageIntrinsicOptimizerPass(PassRegistry &);
-extern char &AMDGPUImageIntrinsicOptimizerID;
+extern const char &AMDGPUImageIntrinsicOptimizerID;
void initializeAMDGPUPerfHintAnalysisLegacyPass(PassRegistry &);
-extern char &AMDGPUPerfHintAnalysisLegacyID;
+extern const char &AMDGPUPerfHintAnalysisLegacyID;
void initializeGCNRegPressurePrinterPass(PassRegistry &);
-extern char &GCNRegPressurePrinterID;
+extern const char &GCNRegPressurePrinterID;
void initializeAMDGPUPreloadKernArgPrologLegacyPass(PassRegistry &);
-extern char &AMDGPUPreloadKernArgPrologLegacyID;
+extern const char &AMDGPUPreloadKernArgPrologLegacyID;
void initializeAMDGPUPreloadKernelArgumentsLegacyPass(PassRegistry &);
-extern char &AMDGPUPreloadKernelArgumentsLegacyID;
+extern const char &AMDGPUPreloadKernelArgumentsLegacyID;
// Passes common to R600 and SI
FunctionPass *createAMDGPUPromoteAlloca();
void initializeAMDGPUPromoteAllocaPass(PassRegistry&);
-extern char &AMDGPUPromoteAllocaID;
+extern const char &AMDGPUPromoteAllocaID;
struct AMDGPUPromoteAllocaPass : PassInfoMixin<AMDGPUPromoteAllocaPass> {
AMDGPUPromoteAllocaPass(TargetMachine &TM) : TM(TM) {}
@@ -299,7 +299,7 @@ struct AMDGPUAlwaysInlinePass : PassInfoMixin<AMDGPUAlwaysInlinePass> {
};
void initializeAMDGPULowerExecSyncLegacyPass(PassRegistry &);
-extern char &AMDGPULowerExecSyncLegacyPassID;
+extern const char &AMDGPULowerExecSyncLegacyPassID;
ModulePass *createAMDGPULowerExecSyncLegacyPass();
struct AMDGPULowerExecSyncPass : PassInfoMixin<AMDGPULowerExecSyncPass> {
@@ -308,7 +308,7 @@ struct AMDGPULowerExecSyncPass : PassInfoMixin<AMDGPULowerExecSyncPass> {
};
void initializeAMDGPUSwLowerLDSLegacyPass(PassRegistry &);
-extern char &AMDGPUSwLowerLDSLegacyPassID;
+extern const char &AMDGPUSwLowerLDSLegacyPassID;
ModulePass *
createAMDGPUSwLowerLDSLegacyPass(const AMDGPUTargetMachine *TM = nullptr);
@@ -449,10 +449,10 @@ FunctionPass *createAMDGPUAnnotateUniformValuesLegacy();
ModulePass *createAMDGPUPrintfRuntimeBinding();
void initializeAMDGPUPrintfRuntimeBindingPass(PassRegistry&);
-extern char &AMDGPUPrintfRuntimeBindingID;
+extern const char &AMDGPUPrintfRuntimeBindingID;
void initializeAMDGPUResourceUsageAnalysisWrapperPassPass(PassRegistry &);
-extern char &AMDGPUResourceUsageAnalysisID;
+extern const char &AMDGPUResourceUsageAnalysisID;
struct AMDGPUPrintfRuntimeBindingPass
: PassInfoMixin<AMDGPUPrintfRuntimeBindingPass> {
@@ -460,26 +460,26 @@ struct AMDGPUPrintfRuntimeBindingPass
};
void initializeSIOptimizeExecMaskingPreRALegacyPass(PassRegistry &);
-extern char &SIOptimizeExecMaskingPreRAID;
+extern const char &SIOptimizeExecMaskingPreRAID;
void initializeSIOptimizeVGPRLiveRangeLegacyPass(PassRegistry &);
-extern char &SIOptimizeVGPRLiveRangeLegacyID;
+extern const char &SIOptimizeVGPRLiveRangeLegacyID;
void initializeAMDGPUAnnotateUniformValuesLegacyPass(PassRegistry &);
-extern char &AMDGPUAnnotateUniformValuesLegacyPassID;
+extern const char &AMDGPUAnnotateUniformValuesLegacyPassID;
void initializeAMDGPUCodeGenPreparePass(PassRegistry&);
-extern char &AMDGPUCodeGenPrepareID;
+extern const char &AMDGPUCodeGenPrepareID;
void initializeAMDGPURemoveIncompatibleFunctionsLegacyPass(PassRegistry &);
-extern char &AMDGPURemoveIncompatibleFunctionsID;
+extern const char &AMDGPURemoveIncompatibleFunctionsID;
void initializeAMDGPULateCodeGenPrepareLegacyPass(PassRegistry &);
-extern char &AMDGPULateCodeGenPrepareLegacyID;
+extern const char &AMDGPULateCodeGenPrepareLegacyID;
FunctionPass *createAMDGPURewriteUndefForPHILegacyPass();
void initializeAMDGPURewriteUndefForPHILegacyPass(PassRegistry &);
-extern char &AMDGPURewriteUndefForPHILegacyPassID;
+extern const char &AMDGPURewriteUndefForPHILegacyPassID;
class AMDGPURewriteUndefForPHIPass
: public PassInfoMixin<AMDGPURewriteUndefForPHIPass> {
@@ -499,37 +499,37 @@ class SIAnnotateControlFlowPass
};
void initializeSIAnnotateControlFlowLegacyPass(PassRegistry &);
-extern char &SIAnnotateControlFlowLegacyPassID;
+extern const char &SIAnnotateControlFlowLegacyPassID;
void initializeSIMemoryLegalizerLegacyPass(PassRegistry &);
-extern char &SIMemoryLegalizerID;
+extern const char &SIMemoryLegalizerID;
void initializeSIModeRegisterLegacyPass(PassRegistry &);
-extern char &SIModeRegisterID;
+extern const char &SIModeRegisterID;
void initializeAMDGPUInsertDelayAluLegacyPass(PassRegistry &);
-extern char &AMDGPUInsertDelayAluID;
+extern const char &AMDGPUInsertDelayAluID;
void initializeAMDGPULowerVGPREncodingLegacyPass(PassRegistry &);
-extern char &AMDGPULowerVGPREncodingLegacyID;
+extern const char &AMDGPULowerVGPREncodingLegacyID;
void initializeSIInsertHardClausesLegacyPass(PassRegistry &);
-extern char &SIInsertHardClausesID;
+extern const char &SIInsertHardClausesID;
void initializeSIInsertWaitcntsLegacyPass(PassRegistry &);
-extern char &SIInsertWaitcntsID;
+extern const char &SIInsertWaitcntsID;
void initializeSIFormMemoryClausesLegacyPass(PassRegistry &);
-extern char &SIFormMemoryClausesID;
+extern const char &SIFormMemoryClausesID;
void initializeSIPostRABundlerLegacyPass(PassRegistry &);
-extern char &SIPostRABundlerLegacyID;
+extern const char &SIPostRABundlerLegacyID;
void initializeGCNCreateVOPDLegacyPass(PassRegistry &);
-extern char &GCNCreateVOPDID;
+extern const char &GCNCreateVOPDID;
void initializeAMDGPUUnifyDivergentExitNodesPass(PassRegistry&);
-extern char &AMDGPUUnifyDivergentExitNodesID;
+extern const char &AMDGPUUnifyDivergentExitNodesID;
ImmutablePass *createAMDGPUAAWrapperPass();
void initializeAMDGPUAAWrapperPassPass(PassRegistry&);
@@ -540,25 +540,25 @@ void initializeAMDGPUArgumentUsageInfoWrapperLegacyPass(PassRegistry &);
ModulePass *createAMDGPUExportKernelRuntimeHandlesLegacyPass();
void initializeAMDGPUExportKernelRuntimeHandlesLegacyPass(PassRegistry &);
-extern char &AMDGPUExportKernelRuntimeHandlesLegacyID;
+extern const char &AMDGPUExportKernelRuntimeHandlesLegacyID;
void initializeGCNNSAReassignLegacyPass(PassRegistry &);
-extern char &GCNNSAReassignID;
+extern const char &GCNNSAReassignID;
void initializeGCNPreRALongBranchRegLegacyPass(PassRegistry &);
-extern char &GCNPreRALongBranchRegID;
+extern const char &GCNPreRALongBranchRegID;
void initializeGCNPreRAOptimizationsLegacyPass(PassRegistry &);
-extern char &GCNPreRAOptimizationsID;
+extern const char &GCNPreRAOptimizationsID;
FunctionPass *createAMDGPUSetWavePriorityPass();
void initializeAMDGPUSetWavePriorityLegacyPass(PassRegistry &);
void initializeGCNRewritePartialRegUsesLegacyPass(llvm::PassRegistry &);
-extern char &GCNRewritePartialRegUsesID;
+extern const char &GCNRewritePartialRegUsesID;
void initializeAMDGPUWaitSGPRHazardsLegacyPass(PassRegistry &);
-extern char &AMDGPUWaitSGPRHazardsLegacyID;
+extern const char &AMDGPUWaitSGPRHazardsLegacyID;
class AMDGPURewriteAGPRCopyMFMAPass
: public PassInfoMixin<AMDGPURewriteAGPRCopyMFMAPass> {
@@ -569,10 +569,10 @@ class AMDGPURewriteAGPRCopyMFMAPass
};
void initializeAMDGPURewriteAGPRCopyMFMALegacyPass(PassRegistry &);
-extern char &AMDGPURewriteAGPRCopyMFMALegacyID;
+extern const char &AMDGPURewriteAGPRCopyMFMALegacyID;
void initializeAMDGPUUniformIntrinsicCombineLegacyPass(PassRegistry &);
-extern char &AMDGPUUniformIntrinsicCombineLegacyPassID;
+extern const char &AMDGPUUniformIntrinsicCombineLegacyPassID;
FunctionPass *createAMDGPUUniformIntrinsicCombineLegacyPass();
struct AMDGPUUniformIntrinsicCombinePass
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
index 7bcc128cb114f..c8845c7231606 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
@@ -21,8 +21,8 @@ using namespace llvm;
AnalysisKey AMDGPUAA::Key;
// Register this pass...
-char AMDGPUAAWrapperPass::ID = 0;
-char AMDGPUExternalAAWrapper::ID = 0;
+const char AMDGPUAAWrapperPass::ID = 0;
+const char AMDGPUExternalAAWrapper::ID = 0;
INITIALIZE_PASS(AMDGPUAAWrapperPass, "amdgpu-aa",
"AMDGPU Address space based Alias Analysis", false, true)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
index aa0e9974667b7..b330c386aa20b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
@@ -62,7 +62,7 @@ class AMDGPUAAWrapperPass : public ImmutablePass {
std::unique_ptr<AMDGPUAAResult> Result;
public:
- static char ID;
+ static const char ID;
AMDGPUAAWrapperPass();
@@ -86,7 +86,7 @@ class AMDGPUAAWrapperPass : public ImmutablePass {
// callback.
class AMDGPUExternalAAWrapper : public ExternalAAWrapperPass {
public:
- static char ID;
+ static const char ID;
AMDGPUExternalAAWrapper() : ExternalAAWrapperPass(
[](Pass &P, Function &, AAResults &AAR) {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
index 2bdaddaa11761..1fd2dc7ce3fcc 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
@@ -34,7 +34,7 @@ class AMDGPUAlwaysInline : public ModulePass {
bool GlobalOpt;
public:
- static char ID;
+ static const char ID;
AMDGPUAlwaysInline(bool GlobalOpt = false) :
ModulePass(ID), GlobalOpt(GlobalOpt) { }
@@ -50,7 +50,7 @@ class AMDGPUAlwaysInline : public ModulePass {
INITIALIZE_PASS(AMDGPUAlwaysInline, "amdgpu-always-inline",
"AMDGPU Inline All Functions", false, false)
-char AMDGPUAlwaysInline::ID = 0;
+const char AMDGPUAlwaysInline::ID = 0;
static void
recursivelyVisitUsers(GlobalValue &GV,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
index 9da0d93341ddf..af11f29642868 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
@@ -103,7 +103,7 @@ AMDGPUAnnotateUniformValuesPass::run(Function &F,
class AMDGPUAnnotateUniformValuesLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUAnnotateUniformValuesLegacy() : FunctionPass(ID) {}
@@ -144,7 +144,7 @@ INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
INITIALIZE_PASS_END(AMDGPUAnnotateUniformValuesLegacy, DEBUG_TYPE,
"Add AMDGPU uniform metadata", false, false)
-char AMDGPUAnnotateUniformValuesLegacy::ID = 0;
+const char AMDGPUAnnotateUniformValuesLegacy::ID = 0;
FunctionPass *llvm::createAMDGPUAnnotateUniformValuesLegacy() {
return new AMDGPUAnnotateUniformValuesLegacy();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp
index 346e257ea7291..0701bc96afd32 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp
@@ -42,7 +42,7 @@ void ArgDescriptor::print(raw_ostream &OS,
OS << '\n';
}
-char AMDGPUArgumentUsageInfoWrapperLegacy::ID = 0;
+const char AMDGPUArgumentUsageInfoWrapperLegacy::ID = 0;
const AMDGPUFunctionArgInfo AMDGPUArgumentUsageInfo::ExternFunctionInfo{};
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
index f41739ac6c169..29ec51f6b97a7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
@@ -198,7 +198,7 @@ class AMDGPUArgumentUsageInfoWrapperLegacy : public ImmutablePass {
std::unique_ptr<AMDGPUArgumentUsageInfo> AUIP;
public:
- static char ID;
+ static const char ID;
AMDGPUArgumentUsageInfoWrapperLegacy() : ImmutablePass(ID) {
initializeAMDGPUArgumentUsageInfoWrapperLegacyPass(
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
index 7d2df427ddd60..3615d07ffc067 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -1792,7 +1792,7 @@ void AMDGPUAsmPrinter::emitResourceUsageRemarks(
CurrentProgramInfo.LDSSize);
}
-char AMDGPUAsmPrinter::ID = 0;
+const char AMDGPUAsmPrinter::ID = 0;
INITIALIZE_PASS(AMDGPUAsmPrinter, "amdgpu-asm-printer",
"AMDGPU Assembly Printer", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
index 9e854fa554672..f245af493697c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
@@ -37,7 +37,7 @@ class MetadataStreamer;
class AMDGPUAsmPrinter final : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
unsigned CodeObjectVersion;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
index 784ee36d55c1e..36d46c08f2bb7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
@@ -49,7 +49,7 @@ struct ReplacementInfo {
class AMDGPUAtomicOptimizer : public FunctionPass {
public:
- static char ID;
+ static const char ID;
ScanOptions ScanImpl;
AMDGPUAtomicOptimizer(ScanOptions ScanImpl)
: FunctionPass(ID), ScanImpl(ScanImpl) {}
@@ -107,9 +107,9 @@ class AMDGPUAtomicOptimizerImpl
} // namespace
-char AMDGPUAtomicOptimizer::ID = 0;
+const char AMDGPUAtomicOptimizer::ID = 0;
-char &llvm::AMDGPUAtomicOptimizerID = AMDGPUAtomicOptimizer::ID;
+const char &llvm::AMDGPUAtomicOptimizerID = AMDGPUAtomicOptimizer::ID;
bool AMDGPUAtomicOptimizer::runOnFunction(Function &F) {
if (skipFunction(F)) {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
index e51d2c0d12c4c..89a5397e9de38 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
@@ -267,7 +267,7 @@ class AMDGPUCodeGenPrepareImpl
class AMDGPUCodeGenPrepare : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUCodeGenPrepare() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<AssumptionCacheTracker>();
@@ -2293,7 +2293,7 @@ bool AMDGPUCodeGenPrepareImpl::visitMbcntHi(IntrinsicInst &I) const {
return tryReplaceWithWorkitemId(I, Wave);
}
-char AMDGPUCodeGenPrepare::ID = 0;
+const char AMDGPUCodeGenPrepare::ID = 0;
FunctionPass *llvm::createAMDGPUCodeGenPreparePass() {
return new AMDGPUCodeGenPrepare();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
index a774ad53b5bed..fe1b74fbeb964 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
@@ -172,7 +172,7 @@ static bool lowerCtorsAndDtors(Module &M) {
class AMDGPUCtorDtorLoweringLegacy final : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPUCtorDtorLoweringLegacy() : ModulePass(ID) {}
bool runOnModule(Module &M) override { return lowerCtorsAndDtors(M); }
};
@@ -185,8 +185,8 @@ PreservedAnalyses AMDGPUCtorDtorLoweringPass::run(Module &M,
: PreservedAnalyses::all();
}
-char AMDGPUCtorDtorLoweringLegacy::ID = 0;
-char &llvm::AMDGPUCtorDtorLoweringLegacyPassID =
+const char AMDGPUCtorDtorLoweringLegacy::ID = 0;
+char const &llvm::AMDGPUCtorDtorLoweringLegacyPassID =
AMDGPUCtorDtorLoweringLegacy::ID;
INITIALIZE_PASS(AMDGPUCtorDtorLoweringLegacy, DEBUG_TYPE,
"Lower ctors and dtors for AMDGPU", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUExportKernelRuntimeHandles.cpp b/llvm/lib/Target/AMDGPU/AMDGPUExportKernelRuntimeHandles.cpp
index a42d94d56b802..5034d92078f98 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUExportKernelRuntimeHandles.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUExportKernelRuntimeHandles.cpp
@@ -35,7 +35,7 @@ namespace {
/// Lower enqueued blocks.
class AMDGPUExportKernelRuntimeHandlesLegacy : public ModulePass {
public:
- static char ID;
+ static const char ID;
explicit AMDGPUExportKernelRuntimeHandlesLegacy() : ModulePass(ID) {}
@@ -45,9 +45,9 @@ class AMDGPUExportKernelRuntimeHandlesLegacy : public ModulePass {
} // end anonymous namespace
-char AMDGPUExportKernelRuntimeHandlesLegacy::ID = 0;
+const char AMDGPUExportKernelRuntimeHandlesLegacy::ID = 0;
-char &llvm::AMDGPUExportKernelRuntimeHandlesLegacyID =
+const char &llvm::AMDGPUExportKernelRuntimeHandlesLegacyID =
AMDGPUExportKernelRuntimeHandlesLegacy::ID;
INITIALIZE_PASS(AMDGPUExportKernelRuntimeHandlesLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp
index f924335844da2..be60a5cc901ce 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelDivergenceLowering.cpp
@@ -31,7 +31,7 @@ namespace {
class AMDGPUGlobalISelDivergenceLowering : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
public:
AMDGPUGlobalISelDivergenceLowering() : MachineFunctionPass(ID) {}
@@ -293,9 +293,9 @@ INITIALIZE_PASS_DEPENDENCY(MachineUniformityAnalysisPass)
INITIALIZE_PASS_END(AMDGPUGlobalISelDivergenceLowering, DEBUG_TYPE,
"AMDGPU GlobalISel divergence lowering", false, false)
-char AMDGPUGlobalISelDivergenceLowering::ID = 0;
+const char AMDGPUGlobalISelDivergenceLowering::ID = 0;
-char &llvm::AMDGPUGlobalISelDivergenceLoweringID =
+const char &llvm::AMDGPUGlobalISelDivergenceLoweringID =
AMDGPUGlobalISelDivergenceLowering::ID;
FunctionPass *llvm::createAMDGPUGlobalISelDivergenceLoweringPass() {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
index 6a35661c9e61c..2850b0e82fb06 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -4523,4 +4523,4 @@ AMDGPUDAGToDAGISelLegacy::AMDGPUDAGToDAGISelLegacy(TargetMachine &TM,
: SelectionDAGISelLegacy(
ID, std::make_unique<AMDGPUDAGToDAGISel>(TM, OptLevel)) {}
-char AMDGPUDAGToDAGISelLegacy::ID = 0;
+const char AMDGPUDAGToDAGISelLegacy::ID = 0;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
index e8873666b3ede..9b046b543685f 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
@@ -313,7 +313,7 @@ class AMDGPUISelDAGToDAGPass : public SelectionDAGISelPass {
class AMDGPUDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
AMDGPUDAGToDAGISelLegacy(TargetMachine &TM, CodeGenOptLevel OptLevel);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp
index 639089c75a33e..9ba3259a4f40c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp
@@ -80,7 +80,7 @@ class AMDGPUImageIntrinsicOptimizer : public FunctionPass {
const TargetMachine *TM;
public:
- static char ID;
+ static const char ID;
AMDGPUImageIntrinsicOptimizer(const TargetMachine *TM = nullptr)
: FunctionPass(ID), TM(TM) {}
@@ -93,7 +93,7 @@ class AMDGPUImageIntrinsicOptimizer : public FunctionPass {
INITIALIZE_PASS(AMDGPUImageIntrinsicOptimizer, DEBUG_TYPE,
"AMDGPU Image Intrinsic Optimizer", false, false)
-char AMDGPUImageIntrinsicOptimizer::ID = 0;
+const char AMDGPUImageIntrinsicOptimizer::ID = 0;
void addInstToMergeableList(
IntrinsicInst *II,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp
index 7c84edf2a60bc..497aac7f3f519 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp
@@ -502,7 +502,7 @@ class AMDGPUInsertDelayAlu {
class AMDGPUInsertDelayAluLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUInsertDelayAluLegacy() : MachineFunctionPass(ID) {}
@@ -530,9 +530,9 @@ AMDGPUInsertDelayAluPass::run(MachineFunction &MF,
return PA;
} // end namespace llvm
-char AMDGPUInsertDelayAluLegacy::ID = 0;
+const char AMDGPUInsertDelayAluLegacy::ID = 0;
-char &llvm::AMDGPUInsertDelayAluID = AMDGPUInsertDelayAluLegacy::ID;
+const char &llvm::AMDGPUInsertDelayAluID = AMDGPUInsertDelayAluLegacy::ID;
INITIALIZE_PASS(AMDGPUInsertDelayAluLegacy, DEBUG_TYPE,
"AMDGPU Insert Delay ALU", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
index 63e265612cbf7..cf6f3faa6e527 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
@@ -568,7 +568,7 @@ AMDGPULateCodeGenPreparePass::run(Function &F, FunctionAnalysisManager &FAM) {
class AMDGPULateCodeGenPrepareLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPULateCodeGenPrepareLegacy() : FunctionPass(ID) {}
@@ -611,7 +611,7 @@ INITIALIZE_PASS_DEPENDENCY(UniformityInfoWrapperPass)
INITIALIZE_PASS_END(AMDGPULateCodeGenPrepareLegacy, DEBUG_TYPE,
"AMDGPU IR late optimizations", false, false)
-char AMDGPULateCodeGenPrepareLegacy::ID = 0;
+const char AMDGPULateCodeGenPrepareLegacy::ID = 0;
FunctionPass *llvm::createAMDGPULateCodeGenPrepareLegacyPass() {
return new AMDGPULateCodeGenPrepareLegacy();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
index c4762602fa169..69ec6fa9074f8 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
@@ -2354,7 +2354,7 @@ void SplitPtrStructs::processFunction(Function &F) {
namespace {
class AMDGPULowerBufferFatPointers : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerBufferFatPointers() : ModulePass(ID) {}
@@ -2579,9 +2579,10 @@ bool AMDGPULowerBufferFatPointers::runOnModule(Module &M) {
return run(M, TM);
}
-char AMDGPULowerBufferFatPointers::ID = 0;
+const char AMDGPULowerBufferFatPointers::ID = 0;
-char &llvm::AMDGPULowerBufferFatPointersID = AMDGPULowerBufferFatPointers::ID;
+const char &llvm::AMDGPULowerBufferFatPointersID =
+ AMDGPULowerBufferFatPointers::ID;
void AMDGPULowerBufferFatPointers::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetPassConfig>();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp
index c26e97360efef..d2ee6701a7eb5 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp
@@ -207,15 +207,16 @@ static bool runLowerExecSyncGlobals(Module &M) {
class AMDGPULowerExecSyncLegacy : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerExecSyncLegacy() : ModulePass(ID) {}
bool runOnModule(Module &M) override;
};
} // namespace
-char AMDGPULowerExecSyncLegacy::ID = 0;
-char &llvm::AMDGPULowerExecSyncLegacyPassID = AMDGPULowerExecSyncLegacy::ID;
+const char AMDGPULowerExecSyncLegacy::ID = 0;
+const char &llvm::AMDGPULowerExecSyncLegacyPassID =
+ AMDGPULowerExecSyncLegacy::ID;
INITIALIZE_PASS_BEGIN(AMDGPULowerExecSyncLegacy, DEBUG_TYPE,
"AMDGPU lowering of execution synchronization", false,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
index d490788a97685..115a4dca840ec 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
@@ -42,7 +42,7 @@ class AMDGPULowerIntrinsicsImpl {
class AMDGPULowerIntrinsicsLegacy : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerIntrinsicsLegacy() : ModulePass(ID) {}
@@ -206,7 +206,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_END(AMDGPULowerIntrinsicsLegacy, DEBUG_TYPE, PASS_DESC, false,
false)
-char AMDGPULowerIntrinsicsLegacy::ID = 0;
+const char AMDGPULowerIntrinsicsLegacy::ID = 0;
ModulePass *llvm::createAMDGPULowerIntrinsicsLegacyPass() {
return new AMDGPULowerIntrinsicsLegacy;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
index f93b0b44f2488..3dd22b4727803 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
@@ -41,7 +41,7 @@ namespace {
class AMDGPULowerKernelArguments : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerKernelArguments() : FunctionPass(ID) {}
@@ -381,7 +381,7 @@ INITIALIZE_PASS_BEGIN(AMDGPULowerKernelArguments, DEBUG_TYPE,
INITIALIZE_PASS_END(AMDGPULowerKernelArguments, DEBUG_TYPE, "AMDGPU Lower Kernel Arguments",
false, false)
-char AMDGPULowerKernelArguments::ID = 0;
+const char AMDGPULowerKernelArguments::ID = 0;
FunctionPass *llvm::createAMDGPULowerKernelArgumentsPass() {
return new AMDGPULowerKernelArguments();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
index fbfb71059b6b1..161a9768d7cf3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
@@ -61,7 +61,7 @@ enum ImplicitArgOffsets {
class AMDGPULowerKernelAttributes : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerKernelAttributes() : ModulePass(ID) {}
@@ -415,7 +415,7 @@ INITIALIZE_PASS_BEGIN(AMDGPULowerKernelAttributes, DEBUG_TYPE,
INITIALIZE_PASS_END(AMDGPULowerKernelAttributes, DEBUG_TYPE,
"AMDGPU Kernel Attributes", false, false)
-char AMDGPULowerKernelAttributes::ID = 0;
+const char AMDGPULowerKernelAttributes::ID = 0;
ModulePass *llvm::createAMDGPULowerKernelAttributesPass() {
return new AMDGPULowerKernelAttributes();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index 588eee036a4e2..41b1c97f12822 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -1406,7 +1406,7 @@ class AMDGPULowerModuleLDS {
class AMDGPULowerModuleLDSLegacy : public ModulePass {
public:
const AMDGPUTargetMachine *TM;
- static char ID;
+ static const char ID;
AMDGPULowerModuleLDSLegacy(const AMDGPUTargetMachine *TM = nullptr)
: ModulePass(ID), TM(TM) {}
@@ -1427,9 +1427,10 @@ class AMDGPULowerModuleLDSLegacy : public ModulePass {
};
} // namespace
-char AMDGPULowerModuleLDSLegacy::ID = 0;
+const char AMDGPULowerModuleLDSLegacy::ID = 0;
-char &llvm::AMDGPULowerModuleLDSLegacyPassID = AMDGPULowerModuleLDSLegacy::ID;
+const char &llvm::AMDGPULowerModuleLDSLegacyPassID =
+ AMDGPULowerModuleLDSLegacy::ID;
INITIALIZE_PASS_BEGIN(AMDGPULowerModuleLDSLegacy, DEBUG_TYPE,
"Lower uses of LDS variables from non-kernel functions",
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
index f4872ec63f7c3..cb6a6ebadea54 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
@@ -479,7 +479,7 @@ bool AMDGPULowerVGPREncoding::run(MachineFunction &MF) {
class AMDGPULowerVGPREncodingLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPULowerVGPREncodingLegacy() : MachineFunctionPass(ID) {}
@@ -495,9 +495,10 @@ class AMDGPULowerVGPREncodingLegacy : public MachineFunctionPass {
} // namespace
-char AMDGPULowerVGPREncodingLegacy::ID = 0;
+const char AMDGPULowerVGPREncodingLegacy::ID = 0;
-char &llvm::AMDGPULowerVGPREncodingLegacyID = AMDGPULowerVGPREncodingLegacy::ID;
+const char &llvm::AMDGPULowerVGPREncodingLegacyID =
+ AMDGPULowerVGPREncodingLegacy::ID;
INITIALIZE_PASS(AMDGPULowerVGPREncodingLegacy, DEBUG_TYPE,
"AMDGPU Lower VGPR Encoding", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp
index 9b6bb56c85d24..11b09f1cc1de0 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp
@@ -40,7 +40,7 @@ class AMDGPUMarkLastScratchLoad {
class AMDGPUMarkLastScratchLoadLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUMarkLastScratchLoadLegacy() : MachineFunctionPass(ID) {}
@@ -152,9 +152,10 @@ bool AMDGPUMarkLastScratchLoad::run(MachineFunction &MF) {
return Changed;
}
-char AMDGPUMarkLastScratchLoadLegacy::ID = 0;
+const char AMDGPUMarkLastScratchLoadLegacy::ID = 0;
-char &llvm::AMDGPUMarkLastScratchLoadID = AMDGPUMarkLastScratchLoadLegacy::ID;
+const char &llvm::AMDGPUMarkLastScratchLoadID =
+ AMDGPUMarkLastScratchLoadLegacy::ID;
INITIALIZE_PASS_BEGIN(AMDGPUMarkLastScratchLoadLegacy, DEBUG_TYPE,
"AMDGPU Mark last scratch load", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
index f8772da6139fe..6430391f3783e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
@@ -391,7 +391,7 @@ class AMDGPUPerfHintAnalysisLegacy : public CallGraphSCCPass {
AMDGPUPerfHintAnalysis Impl;
public:
- static char ID;
+ static const char ID;
AMDGPUPerfHintAnalysisLegacy() : CallGraphSCCPass(ID) {}
@@ -463,8 +463,9 @@ bool AMDGPUPerfHintAnalysis::run(const GCNTargetMachine &TM,
return Changed;
}
-char AMDGPUPerfHintAnalysisLegacy::ID = 0;
-char &llvm::AMDGPUPerfHintAnalysisLegacyID = AMDGPUPerfHintAnalysisLegacy::ID;
+const char AMDGPUPerfHintAnalysisLegacy::ID = 0;
+const char &llvm::AMDGPUPerfHintAnalysisLegacyID =
+ AMDGPUPerfHintAnalysisLegacy::ID;
INITIALIZE_PASS(AMDGPUPerfHintAnalysisLegacy, DEBUG_TYPE,
"Analysis if a function is memory bound", true, true)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
index 0264d88c4d0ec..95601f1900de7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
@@ -440,7 +440,7 @@ bool AMDGPUPostLegalizerCombinerImpl::matchCombine_s_mul_u64(
class AMDGPUPostLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUPostLegalizerCombiner(bool IsOptNone = false);
@@ -507,7 +507,7 @@ bool AMDGPUPostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AMDGPUPostLegalizerCombiner::ID = 0;
+const char AMDGPUPostLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPUPostLegalizerCombiner, DEBUG_TYPE,
"Combine AMDGPU machine instrs after legalization", false,
false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
index 4a70c5d6e78f6..c3b30c6c1a1c1 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
@@ -211,7 +211,7 @@ void AMDGPUPreLegalizerCombinerImpl::applyClampI64ToI16(
class AMDGPUPreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUPreLegalizerCombiner(bool IsOptNone = false);
@@ -283,7 +283,7 @@ bool AMDGPUPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AMDGPUPreLegalizerCombiner::ID = 0;
+const char AMDGPUPreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPUPreLegalizerCombiner, DEBUG_TYPE,
"Combine AMDGPU machine instrs before legalization",
false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernArgProlog.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernArgProlog.cpp
index 90c4f4e6680c2..6e9966dea6a3b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernArgProlog.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernArgProlog.cpp
@@ -73,7 +73,7 @@ class AMDGPUPreloadKernArgProlog {
class AMDGPUPreloadKernArgPrologLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUPreloadKernArgPrologLegacy() : MachineFunctionPass(ID) {}
@@ -86,12 +86,12 @@ class AMDGPUPreloadKernArgPrologLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char AMDGPUPreloadKernArgPrologLegacy::ID = 0;
+const char AMDGPUPreloadKernArgPrologLegacy::ID = 0;
INITIALIZE_PASS(AMDGPUPreloadKernArgPrologLegacy, DEBUG_TYPE,
"AMDGPU Preload Kernel Arguments Prolog", false, false)
-char &llvm::AMDGPUPreloadKernArgPrologLegacyID =
+const char &llvm::AMDGPUPreloadKernArgPrologLegacyID =
AMDGPUPreloadKernArgPrologLegacy::ID;
FunctionPass *llvm::createAMDGPUPreloadKernArgPrologLegacyPass() {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp
index 7d6e3edc75e1f..f60e026b9d8c1 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPreloadKernelArguments.cpp
@@ -48,7 +48,7 @@ class AMDGPUPreloadKernelArgumentsLegacy : public ModulePass {
const GCNTargetMachine *TM;
public:
- static char ID;
+ static const char ID;
explicit AMDGPUPreloadKernelArgumentsLegacy(
const GCNTargetMachine *TM = nullptr);
@@ -264,7 +264,7 @@ class PreloadKernelArgInfo {
} // end anonymous namespace
-char AMDGPUPreloadKernelArgumentsLegacy::ID = 0;
+const char AMDGPUPreloadKernelArgumentsLegacy::ID = 0;
INITIALIZE_PASS(AMDGPUPreloadKernelArgumentsLegacy, DEBUG_TYPE,
"AMDGPU Preload Kernel Arguments", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp
index 0137b3f5943d7..02c9b82619412 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp
@@ -44,7 +44,7 @@ class AMDGPUPrepareAGPRAllocImpl {
class AMDGPUPrepareAGPRAllocLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUPrepareAGPRAllocLegacy() : MachineFunctionPass(ID) {
initializeAMDGPUPrepareAGPRAllocLegacyPass(
@@ -67,9 +67,10 @@ INITIALIZE_PASS_BEGIN(AMDGPUPrepareAGPRAllocLegacy, DEBUG_TYPE,
INITIALIZE_PASS_END(AMDGPUPrepareAGPRAllocLegacy, DEBUG_TYPE,
"AMDGPU Prepare AGPR Alloc", false, false)
-char AMDGPUPrepareAGPRAllocLegacy::ID = 0;
+const char AMDGPUPrepareAGPRAllocLegacy::ID = 0;
-char &llvm::AMDGPUPrepareAGPRAllocLegacyID = AMDGPUPrepareAGPRAllocLegacy::ID;
+const char &llvm::AMDGPUPrepareAGPRAllocLegacyID =
+ AMDGPUPrepareAGPRAllocLegacy::ID;
bool AMDGPUPrepareAGPRAllocLegacy::runOnMachineFunction(MachineFunction &MF) {
if (skipFunction(MF.getFunction()))
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index d3fa423d6099f..2b8b4b7d7359b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -40,7 +40,7 @@ namespace {
class AMDGPUPrintfRuntimeBinding final : public ModulePass {
public:
- static char ID;
+ static const char ID;
explicit AMDGPUPrintfRuntimeBinding() : ModulePass(ID) {}
@@ -64,7 +64,7 @@ class AMDGPUPrintfRuntimeBindingImpl {
};
} // namespace
-char AMDGPUPrintfRuntimeBinding::ID = 0;
+const char AMDGPUPrintfRuntimeBinding::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPUPrintfRuntimeBinding,
"amdgpu-printf-runtime-binding", "AMDGPU Printf lowering",
@@ -74,7 +74,7 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
INITIALIZE_PASS_END(AMDGPUPrintfRuntimeBinding, "amdgpu-printf-runtime-binding",
"AMDGPU Printf lowering", false, false)
-char &llvm::AMDGPUPrintfRuntimeBindingID = AMDGPUPrintfRuntimeBinding::ID;
+const char &llvm::AMDGPUPrintfRuntimeBindingID = AMDGPUPrintfRuntimeBinding::ID;
ModulePass *llvm::createAMDGPUPrintfRuntimeBinding() {
return new AMDGPUPrintfRuntimeBinding();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
index ed676c3fde2f8..0e38b3a02d173 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -183,7 +183,7 @@ class AMDGPUPromoteAllocaImpl {
// FIXME: This can create globals so should be a module pass.
class AMDGPUPromoteAlloca : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUPromoteAlloca() : FunctionPass(ID) {}
@@ -235,7 +235,7 @@ static unsigned getMaxVGPRs(unsigned LDSBytes, const TargetMachine &TM,
} // end anonymous namespace
-char AMDGPUPromoteAlloca::ID = 0;
+const char AMDGPUPromoteAlloca::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPUPromoteAlloca, DEBUG_TYPE,
"AMDGPU promote alloca to vector or LDS", false, false)
@@ -246,7 +246,7 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
INITIALIZE_PASS_END(AMDGPUPromoteAlloca, DEBUG_TYPE,
"AMDGPU promote alloca to vector or LDS", false, false)
-char &llvm::AMDGPUPromoteAllocaID = AMDGPUPromoteAlloca::ID;
+const char &llvm::AMDGPUPromoteAllocaID = AMDGPUPromoteAlloca::ID;
PreservedAnalyses AMDGPUPromoteAllocaPass::run(Function &F,
FunctionAnalysisManager &AM) {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp
index 06819d05b4be6..84b1ab629da14 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPromoteKernelArguments.cpp
@@ -45,7 +45,7 @@ class AMDGPUPromoteKernelArguments : public FunctionPass {
bool promoteLoad(LoadInst *LI);
public:
- static char ID;
+ static const char ID;
AMDGPUPromoteKernelArguments() : FunctionPass(ID) {}
@@ -198,7 +198,7 @@ INITIALIZE_PASS_DEPENDENCY(MemorySSAWrapperPass)
INITIALIZE_PASS_END(AMDGPUPromoteKernelArguments, DEBUG_TYPE,
"AMDGPU Promote Kernel Arguments", false, false)
-char AMDGPUPromoteKernelArguments::ID = 0;
+const char AMDGPUPromoteKernelArguments::ID = 0;
FunctionPass *llvm::createAMDGPUPromoteKernelArgumentsPass() {
return new AMDGPUPromoteKernelArguments();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
index e2e84ce2e6219..58da47fbe9417 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
@@ -512,7 +512,7 @@ bool AMDGPURegBankCombinerImpl::isClampZeroToOne(MachineInstr *K0,
class AMDGPURegBankCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPURegBankCombiner(bool IsOptNone = false);
@@ -577,7 +577,7 @@ bool AMDGPURegBankCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char AMDGPURegBankCombiner::ID = 0;
+const char AMDGPURegBankCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPURegBankCombiner, DEBUG_TYPE,
"Combine AMDGPU machine instrs after regbankselect",
false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp
index 2e009cdec06ac..4a86463bc28de 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalize.cpp
@@ -48,7 +48,7 @@ m_GAMDGPUReadAnyLane(const SrcTy &Src) {
class AMDGPURegBankLegalize : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
public:
AMDGPURegBankLegalize() : MachineFunctionPass(ID) {}
@@ -83,9 +83,9 @@ INITIALIZE_PASS_DEPENDENCY(MachineUniformityAnalysisPass)
INITIALIZE_PASS_END(AMDGPURegBankLegalize, DEBUG_TYPE,
"AMDGPU Register Bank Legalize", false, false)
-char AMDGPURegBankLegalize::ID = 0;
+const char AMDGPURegBankLegalize::ID = 0;
-char &llvm::AMDGPURegBankLegalizeID = AMDGPURegBankLegalize::ID;
+const char &llvm::AMDGPURegBankLegalizeID = AMDGPURegBankLegalize::ID;
FunctionPass *llvm::createAMDGPURegBankLegalizePass() {
return new AMDGPURegBankLegalize();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.cpp
index 493b7541cdd81..f0186b6b7a4b7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.cpp
@@ -33,7 +33,7 @@ namespace {
class AMDGPURegBankSelect : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPURegBankSelect() : MachineFunctionPass(ID) {}
@@ -67,9 +67,9 @@ INITIALIZE_PASS_DEPENDENCY(MachineUniformityAnalysisPass)
INITIALIZE_PASS_END(AMDGPURegBankSelect, DEBUG_TYPE,
"AMDGPU Register Bank Select", false, false)
-char AMDGPURegBankSelect::ID = 0;
+const char AMDGPURegBankSelect::ID = 0;
-char &llvm::AMDGPURegBankSelectID = AMDGPURegBankSelect::ID;
+const char &llvm::AMDGPURegBankSelectID = AMDGPURegBankSelect::ID;
FunctionPass *llvm::createAMDGPURegBankSelectPass() {
return new AMDGPURegBankSelect();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp b/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp
index d2ec7dd429d8b..271f0e605cad3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp
@@ -65,7 +65,7 @@ class AMDGPURemoveIncompatibleFunctions {
class AMDGPURemoveIncompatibleFunctionsLegacy : public ModulePass {
public:
- static char ID;
+ static const char ID;
AMDGPURemoveIncompatibleFunctionsLegacy(const TargetMachine *TM)
: ModulePass(ID), TM(TM) {}
@@ -212,7 +212,7 @@ bool AMDGPURemoveIncompatibleFunctions::checkFunction(Function &F) {
INITIALIZE_PASS(AMDGPURemoveIncompatibleFunctionsLegacy, DEBUG_TYPE,
"AMDGPU Remove Incompatible Functions", false, false)
-char AMDGPURemoveIncompatibleFunctionsLegacy::ID = 0;
+const char AMDGPURemoveIncompatibleFunctionsLegacy::ID = 0;
ModulePass *
llvm::createAMDGPURemoveIncompatibleFunctionsPass(const TargetMachine *TM) {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUReserveWWMRegs.cpp b/llvm/lib/Target/AMDGPU/AMDGPUReserveWWMRegs.cpp
index 94830ba998f27..31cf359354c8d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUReserveWWMRegs.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUReserveWWMRegs.cpp
@@ -29,7 +29,7 @@ namespace {
class AMDGPUReserveWWMRegsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUReserveWWMRegsLegacy() : MachineFunctionPass(ID) {}
@@ -55,9 +55,9 @@ class AMDGPUReserveWWMRegs {
INITIALIZE_PASS(AMDGPUReserveWWMRegsLegacy, DEBUG_TYPE,
"AMDGPU Reserve WWM Registers", false, false)
-char AMDGPUReserveWWMRegsLegacy::ID = 0;
+const char AMDGPUReserveWWMRegsLegacy::ID = 0;
-char &llvm::AMDGPUReserveWWMRegsLegacyID = AMDGPUReserveWWMRegsLegacy::ID;
+const char &llvm::AMDGPUReserveWWMRegsLegacyID = AMDGPUReserveWWMRegsLegacy::ID;
bool AMDGPUReserveWWMRegsLegacy::runOnMachineFunction(MachineFunction &MF) {
return AMDGPUReserveWWMRegs().run(MF);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
index 4e664e084fb88..986ef31312c56 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
@@ -30,8 +30,8 @@ using namespace llvm::AMDGPU;
#define DEBUG_TYPE "amdgpu-resource-usage"
-char llvm::AMDGPUResourceUsageAnalysisWrapperPass::ID = 0;
-char &llvm::AMDGPUResourceUsageAnalysisID =
+const char llvm::AMDGPUResourceUsageAnalysisWrapperPass::ID = 0;
+const char &llvm::AMDGPUResourceUsageAnalysisID =
AMDGPUResourceUsageAnalysisWrapperPass::ID;
// In code object v4 and older, we need to tell the runtime some amount ahead of
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
index 9ae3bb3ca048e..fd4c402a2e313 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.h
@@ -27,7 +27,7 @@ class GCNTargetMachine;
struct AMDGPUResourceUsageAnalysisImpl {
public:
- static char ID;
+ static const char ID;
// Track resource usage for callee functions.
struct SIFunctionResourceInfo {
// Track the number of explicitly used VGPRs. Special registers reserved at
@@ -58,7 +58,7 @@ struct AMDGPUResourceUsageAnalysisWrapperPass : public MachineFunctionPass {
FunctionResourceInfo ResourceInfo;
public:
- static char ID;
+ static const char ID;
AMDGPUResourceUsageAnalysisWrapperPass() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
index ffbb1c183ca9e..cd3969b43b42c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
@@ -592,7 +592,7 @@ bool AMDGPURewriteAGPRCopyMFMAImpl::run(MachineFunction &MF) const {
class AMDGPURewriteAGPRCopyMFMALegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RegisterClassInfo RegClassInfo;
AMDGPURewriteAGPRCopyMFMALegacy() : MachineFunctionPass(ID) {
@@ -633,9 +633,9 @@ INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
INITIALIZE_PASS_END(AMDGPURewriteAGPRCopyMFMALegacy, DEBUG_TYPE,
"AMDGPU Rewrite AGPR-Copy-MFMA", false, false)
-char AMDGPURewriteAGPRCopyMFMALegacy::ID = 0;
+const char AMDGPURewriteAGPRCopyMFMALegacy::ID = 0;
-char &llvm::AMDGPURewriteAGPRCopyMFMALegacyID =
+const char &llvm::AMDGPURewriteAGPRCopyMFMALegacyID =
AMDGPURewriteAGPRCopyMFMALegacy::ID;
bool AMDGPURewriteAGPRCopyMFMALegacy::runOnMachineFunction(
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
index a2e16c7f873f7..f56309940f717 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
@@ -87,7 +87,7 @@ class AMDGPURewriteOutArguments : public FunctionPass {
Type *getOutArgumentType(Argument &Arg) const;
public:
- static char ID;
+ static const char ID;
AMDGPURewriteOutArguments() : FunctionPass(ID) {}
@@ -108,7 +108,7 @@ INITIALIZE_PASS_DEPENDENCY(MemoryDependenceWrapperPass)
INITIALIZE_PASS_END(AMDGPURewriteOutArguments, DEBUG_TYPE,
"AMDGPU Rewrite Out Arguments", false, false)
-char AMDGPURewriteOutArguments::ID = 0;
+const char AMDGPURewriteOutArguments::ID = 0;
Type *AMDGPURewriteOutArguments::getStoredType(Value &Arg) const {
const int MaxUses = 10;
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp b/llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp
index 1c135f09080e1..c6641f5c7c68e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp
@@ -71,7 +71,7 @@ namespace {
class AMDGPURewriteUndefForPHILegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPURewriteUndefForPHILegacy() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
StringRef getPassName() const override {
@@ -88,7 +88,7 @@ class AMDGPURewriteUndefForPHILegacy : public FunctionPass {
};
} // end anonymous namespace
-char AMDGPURewriteUndefForPHILegacy::ID = 0;
+const char AMDGPURewriteUndefForPHILegacy::ID = 0;
INITIALIZE_PASS_BEGIN(AMDGPURewriteUndefForPHILegacy, DEBUG_TYPE,
"Rewrite undef for PHI", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
index 56aa3f6db83ad..bf067ed6812f2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
@@ -55,7 +55,7 @@ class AMDGPUSetWavePriority {
class AMDGPUSetWavePriorityLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUSetWavePriorityLegacy() : MachineFunctionPass(ID) {}
@@ -74,7 +74,7 @@ class AMDGPUSetWavePriorityLegacy : public MachineFunctionPass {
INITIALIZE_PASS(AMDGPUSetWavePriorityLegacy, DEBUG_TYPE, "Set wave priority",
false, false)
-char AMDGPUSetWavePriorityLegacy::ID = 0;
+const char AMDGPUSetWavePriorityLegacy::ID = 0;
FunctionPass *llvm::createAMDGPUSetWavePriorityPass() {
return new AMDGPUSetWavePriorityLegacy();
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
index 3fd554a4c0443..c056edee6a983 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
@@ -1298,7 +1298,7 @@ bool AMDGPUSwLowerLDS::run() {
class AMDGPUSwLowerLDSLegacy : public ModulePass {
public:
const AMDGPUTargetMachine *AMDGPUTM;
- static char ID;
+ static const char ID;
AMDGPUSwLowerLDSLegacy(const AMDGPUTargetMachine *TM)
: ModulePass(ID), AMDGPUTM(TM) {}
bool runOnModule(Module &M) override;
@@ -1308,8 +1308,8 @@ class AMDGPUSwLowerLDSLegacy : public ModulePass {
};
} // namespace
-char AMDGPUSwLowerLDSLegacy::ID = 0;
-char &llvm::AMDGPUSwLowerLDSLegacyPassID = AMDGPUSwLowerLDSLegacy::ID;
+const char AMDGPUSwLowerLDSLegacy::ID = 0;
+const char &llvm::AMDGPUSwLowerLDSLegacyPassID = AMDGPUSwLowerLDSLegacy::ID;
INITIALIZE_PASS_BEGIN(AMDGPUSwLowerLDSLegacy, "amdgpu-sw-lower-lds",
"AMDGPU Software lowering of LDS", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp
index 47d56adf18b7c..06d984ac64417 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp
@@ -164,7 +164,7 @@ AMDGPUUniformIntrinsicCombinePass::run(Function &F,
namespace {
class AMDGPUUniformIntrinsicCombineLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUUniformIntrinsicCombineLegacy() : FunctionPass(ID) {
initializeAMDGPUUniformIntrinsicCombineLegacyPass(
*PassRegistry::getPassRegistry());
@@ -180,8 +180,8 @@ class AMDGPUUniformIntrinsicCombineLegacy : public FunctionPass {
};
} // namespace
-char AMDGPUUniformIntrinsicCombineLegacy::ID = 0;
-char &llvm::AMDGPUUniformIntrinsicCombineLegacyPassID =
+const char AMDGPUUniformIntrinsicCombineLegacy::ID = 0;
+const char &llvm::AMDGPUUniformIntrinsicCombineLegacyPassID =
AMDGPUUniformIntrinsicCombineLegacy::ID;
bool AMDGPUUniformIntrinsicCombineLegacy::runOnFunction(Function &F) {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
index fe81a5efd9d51..e94734e6ca067 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
@@ -73,16 +73,17 @@ class AMDGPUUnifyDivergentExitNodesImpl {
class AMDGPUUnifyDivergentExitNodes : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUUnifyDivergentExitNodes() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;
};
} // end anonymous namespace
-char AMDGPUUnifyDivergentExitNodes::ID = 0;
+const char AMDGPUUnifyDivergentExitNodes::ID = 0;
-char &llvm::AMDGPUUnifyDivergentExitNodesID = AMDGPUUnifyDivergentExitNodes::ID;
+const char &llvm::AMDGPUUnifyDivergentExitNodesID =
+ AMDGPUUnifyDivergentExitNodes::ID;
INITIALIZE_PASS_BEGIN(AMDGPUUnifyDivergentExitNodes, DEBUG_TYPE,
"Unify divergent function exit nodes", false, false)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp b/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
index faef40862d718..0692e3aff546b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp
@@ -533,7 +533,7 @@ class AMDGPUWaitSGPRHazards {
class AMDGPUWaitSGPRHazardsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AMDGPUWaitSGPRHazardsLegacy() : MachineFunctionPass(ID) {}
@@ -549,9 +549,10 @@ class AMDGPUWaitSGPRHazardsLegacy : public MachineFunctionPass {
} // namespace
-char AMDGPUWaitSGPRHazardsLegacy::ID = 0;
+const char AMDGPUWaitSGPRHazardsLegacy::ID = 0;
-char &llvm::AMDGPUWaitSGPRHazardsLegacyID = AMDGPUWaitSGPRHazardsLegacy::ID;
+const char &llvm::AMDGPUWaitSGPRHazardsLegacyID =
+ AMDGPUWaitSGPRHazardsLegacy::ID;
INITIALIZE_PASS(AMDGPUWaitSGPRHazardsLegacy, DEBUG_TYPE,
"AMDGPU Insert waits for SGPR read hazards", false, false)
diff --git a/llvm/lib/Target/AMDGPU/GCNCreateVOPD.cpp b/llvm/lib/Target/AMDGPU/GCNCreateVOPD.cpp
index 72805aa9165b6..d6fa8c4521cd3 100644
--- a/llvm/lib/Target/AMDGPU/GCNCreateVOPD.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNCreateVOPD.cpp
@@ -198,7 +198,7 @@ class GCNCreateVOPD {
class GCNCreateVOPDLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNCreateVOPDLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -227,9 +227,9 @@ llvm::GCNCreateVOPDPass::run(MachineFunction &MF,
return getMachineFunctionPassPreservedAnalyses().preserveSet<CFGAnalyses>();
}
-char GCNCreateVOPDLegacy::ID = 0;
+const char GCNCreateVOPDLegacy::ID = 0;
-char &llvm::GCNCreateVOPDID = GCNCreateVOPDLegacy::ID;
+const char &llvm::GCNCreateVOPDID = GCNCreateVOPDLegacy::ID;
INITIALIZE_PASS(GCNCreateVOPDLegacy, DEBUG_TYPE, "GCN Create VOPD Instructions",
false, false)
diff --git a/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp b/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
index 6ba669f076085..3c87977902f25 100644
--- a/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
@@ -85,7 +85,7 @@ class GCNDPPCombine {
class GCNDPPCombineLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNDPPCombineLegacy() : MachineFunctionPass(ID) {}
@@ -108,9 +108,9 @@ class GCNDPPCombineLegacy : public MachineFunctionPass {
INITIALIZE_PASS(GCNDPPCombineLegacy, DEBUG_TYPE, "GCN DPP Combine", false,
false)
-char GCNDPPCombineLegacy::ID = 0;
+const char GCNDPPCombineLegacy::ID = 0;
-char &llvm::GCNDPPCombineLegacyID = GCNDPPCombineLegacy::ID;
+const char &llvm::GCNDPPCombineLegacyID = GCNDPPCombineLegacy::ID;
FunctionPass *llvm::createGCNDPPCombinePass() {
return new GCNDPPCombineLegacy();
diff --git a/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp b/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
index 1682abbdea169..30d2e900d2c37 100644
--- a/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
@@ -79,7 +79,7 @@ class GCNNSAReassignImpl {
class GCNNSAReassignLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNNSAReassignLegacy() : MachineFunctionPass(ID) {
initializeGCNNSAReassignLegacyPass(*PassRegistry::getPassRegistry());
@@ -108,9 +108,9 @@ INITIALIZE_PASS_DEPENDENCY(LiveRegMatrixWrapperLegacy)
INITIALIZE_PASS_END(GCNNSAReassignLegacy, DEBUG_TYPE, "GCN NSA Reassign", false,
false)
-char GCNNSAReassignLegacy::ID = 0;
+const char GCNNSAReassignLegacy::ID = 0;
-char &llvm::GCNNSAReassignID = GCNNSAReassignLegacy::ID;
+const char &llvm::GCNNSAReassignID = GCNNSAReassignLegacy::ID;
bool GCNNSAReassignImpl::tryAssignRegisters(
SmallVectorImpl<LiveInterval *> &Intervals, unsigned StartReg) const {
diff --git a/llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp b/llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp
index 355bbeb2ffeba..a5ce2bb95bf51 100644
--- a/llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp
@@ -56,7 +56,7 @@ class GCNPreRALongBranchReg {
class GCNPreRALongBranchRegLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNPreRALongBranchRegLegacy() : MachineFunctionPass(ID) {
initializeGCNPreRALongBranchRegLegacyPass(*PassRegistry::getPassRegistry());
}
@@ -76,12 +76,12 @@ class GCNPreRALongBranchRegLegacy : public MachineFunctionPass {
};
} // End anonymous namespace.
-char GCNPreRALongBranchRegLegacy::ID = 0;
+const char GCNPreRALongBranchRegLegacy::ID = 0;
INITIALIZE_PASS(GCNPreRALongBranchRegLegacy, DEBUG_TYPE,
"AMDGPU Pre-RA Long Branch Reg", false, false)
-char &llvm::GCNPreRALongBranchRegID = GCNPreRALongBranchRegLegacy::ID;
+const char &llvm::GCNPreRALongBranchRegID = GCNPreRALongBranchRegLegacy::ID;
void GCNPreRALongBranchReg::generateBlockInfo(
MachineFunction &MF, SmallVectorImpl<BasicBlockInfo> &BlockInfo) {
diff --git a/llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp b/llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
index 27c122ca54ffe..f9c11b3ffef86 100644
--- a/llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
@@ -61,7 +61,7 @@ class GCNPreRAOptimizationsImpl {
class GCNPreRAOptimizationsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNPreRAOptimizationsLegacy() : MachineFunctionPass(ID) {
initializeGCNPreRAOptimizationsLegacyPass(*PassRegistry::getPassRegistry());
@@ -87,9 +87,9 @@ INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
INITIALIZE_PASS_END(GCNPreRAOptimizationsLegacy, DEBUG_TYPE,
"Pre-RA optimizations", false, false)
-char GCNPreRAOptimizationsLegacy::ID = 0;
+const char GCNPreRAOptimizationsLegacy::ID = 0;
-char &llvm::GCNPreRAOptimizationsID = GCNPreRAOptimizationsLegacy::ID;
+const char &llvm::GCNPreRAOptimizationsID = GCNPreRAOptimizationsLegacy::ID;
FunctionPass *llvm::createGCNPreRAOptimizationsLegacyPass() {
return new GCNPreRAOptimizationsLegacy();
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
index 89307ef9767b7..74d2f9d0d8f03 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
@@ -842,8 +842,8 @@ static cl::opt<bool> UseDownwardTracker(
cl::desc("Use GCNDownwardRPTracker for GCNRegPressurePrinter pass"),
cl::init(false), cl::Hidden);
-char llvm::GCNRegPressurePrinter::ID = 0;
-char &llvm::GCNRegPressurePrinterID = GCNRegPressurePrinter::ID;
+const char llvm::GCNRegPressurePrinter::ID = 0;
+const char &llvm::GCNRegPressurePrinterID = GCNRegPressurePrinter::ID;
INITIALIZE_PASS(GCNRegPressurePrinter, "amdgpu-print-rp", "", true, true)
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.h b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
index c55796c37f287..1c4a988a86aba 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.h
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
@@ -554,7 +554,7 @@ Printable reportMismatch(const GCNRPTracker::LiveRegSet &LISLR,
const TargetRegisterInfo *TRI, StringRef Pfx = " ");
struct GCNRegPressurePrinter : public MachineFunctionPass {
- static char ID;
+ static const char ID;
public:
GCNRegPressurePrinter() : MachineFunctionPass(ID) {}
diff --git a/llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp b/llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp
index 237da2d64d4ee..266e58046cf50 100644
--- a/llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNRewritePartialRegUses.cpp
@@ -129,7 +129,7 @@ class GCNRewritePartialRegUsesImpl {
class GCNRewritePartialRegUsesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
GCNRewritePartialRegUsesLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -465,9 +465,10 @@ GCNRewritePartialRegUsesPass::run(MachineFunction &MF,
return PA;
}
-char GCNRewritePartialRegUsesLegacy::ID;
+const char GCNRewritePartialRegUsesLegacy::ID = 0;
-char &llvm::GCNRewritePartialRegUsesID = GCNRewritePartialRegUsesLegacy::ID;
+const char &llvm::GCNRewritePartialRegUsesID =
+ GCNRewritePartialRegUsesLegacy::ID;
INITIALIZE_PASS_BEGIN(GCNRewritePartialRegUsesLegacy, DEBUG_TYPE,
"Rewrite Partial Register Uses", false, false)
diff --git a/llvm/lib/Target/AMDGPU/R600.h b/llvm/lib/Target/AMDGPU/R600.h
index 9236675ce082a..f97461305bdd2 100644
--- a/llvm/lib/Target/AMDGPU/R600.h
+++ b/llvm/lib/Target/AMDGPU/R600.h
@@ -31,19 +31,19 @@ FunctionPass *createR600ISelDag(TargetMachine &TM, CodeGenOptLevel OptLevel);
ModulePass *createR600OpenCLImageTypeLoweringPass();
void initializeR600ClauseMergePassPass(PassRegistry &);
-extern char &R600ClauseMergePassID;
+extern const char &R600ClauseMergePassID;
void initializeR600ControlFlowFinalizerPass(PassRegistry &);
-extern char &R600ControlFlowFinalizerID;
+extern const char &R600ControlFlowFinalizerID;
void initializeR600ExpandSpecialInstrsPassPass(PassRegistry &);
-extern char &R600ExpandSpecialInstrsPassID;
+extern const char &R600ExpandSpecialInstrsPassID;
void initializeR600VectorRegMergerPass(PassRegistry &);
-extern char &R600VectorRegMergerID;
+extern const char &R600VectorRegMergerID;
void initializeR600PacketizerPass(PassRegistry &);
-extern char &R600PacketizerID;
+extern const char &R600PacketizerID;
void initializeR600EmitClauseMarkersPass(PassRegistry &);
void initializeR600MachineCFGStructurizerPass(PassRegistry &);
diff --git a/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp b/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp
index 2b85df8ac6cf6..ad3f2b0e1bda4 100644
--- a/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp
@@ -53,7 +53,7 @@ class R600ClauseMergePass : public MachineFunctionPass {
const MachineInstr &LatrCFAlu) const;
public:
- static char ID;
+ static const char ID;
R600ClauseMergePass() : MachineFunctionPass(ID) { }
@@ -69,9 +69,9 @@ INITIALIZE_PASS_BEGIN(R600ClauseMergePass, DEBUG_TYPE,
INITIALIZE_PASS_END(R600ClauseMergePass, DEBUG_TYPE,
"R600 Clause Merge", false, false)
-char R600ClauseMergePass::ID = 0;
+const char R600ClauseMergePass::ID = 0;
-char &llvm::R600ClauseMergePassID = R600ClauseMergePass::ID;
+const char &llvm::R600ClauseMergePassID = R600ClauseMergePass::ID;
unsigned R600ClauseMergePass::getCFAluSize(const MachineInstr &MI) const {
assert(isCFAlu(MI));
diff --git a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
index 248d734268ccf..1ae83841017de 100644
--- a/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp
@@ -466,7 +466,7 @@ class R600ControlFlowFinalizer : public MachineFunctionPass {
}
public:
- static char ID;
+ static const char ID;
R600ControlFlowFinalizer() : MachineFunctionPass(ID) {}
@@ -678,9 +678,9 @@ INITIALIZE_PASS_BEGIN(R600ControlFlowFinalizer, DEBUG_TYPE,
INITIALIZE_PASS_END(R600ControlFlowFinalizer, DEBUG_TYPE,
"R600 Control Flow Finalizer", false, false)
-char R600ControlFlowFinalizer::ID = 0;
+const char R600ControlFlowFinalizer::ID = 0;
-char &llvm::R600ControlFlowFinalizerID = R600ControlFlowFinalizer::ID;
+const char &llvm::R600ControlFlowFinalizerID = R600ControlFlowFinalizer::ID;
FunctionPass *llvm::createR600ControlFlowFinalizer() {
return new R600ControlFlowFinalizer();
diff --git a/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp b/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp
index b88d655d4e613..0559f33376946 100644
--- a/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp
+++ b/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp
@@ -281,7 +281,7 @@ class R600EmitClauseMarkers : public MachineFunctionPass {
}
public:
- static char ID;
+ static const char ID;
R600EmitClauseMarkers() : MachineFunctionPass(ID) {}
@@ -310,7 +310,7 @@ class R600EmitClauseMarkers : public MachineFunctionPass {
}
};
-char R600EmitClauseMarkers::ID = 0;
+const char R600EmitClauseMarkers::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp b/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp
index a33dbfa2ca411..740af4c9c84c5 100644
--- a/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp
@@ -34,7 +34,7 @@ class R600ExpandSpecialInstrsPass : public MachineFunctionPass {
R600::OpName Op);
public:
- static char ID;
+ static const char ID;
R600ExpandSpecialInstrsPass() : MachineFunctionPass(ID) {}
@@ -52,9 +52,10 @@ INITIALIZE_PASS_BEGIN(R600ExpandSpecialInstrsPass, DEBUG_TYPE,
INITIALIZE_PASS_END(R600ExpandSpecialInstrsPass, DEBUG_TYPE,
"R600ExpandSpecialInstrs", false, false)
-char R600ExpandSpecialInstrsPass::ID = 0;
+const char R600ExpandSpecialInstrsPass::ID = 0;
-char &llvm::R600ExpandSpecialInstrsPassID = R600ExpandSpecialInstrsPass::ID;
+const char &llvm::R600ExpandSpecialInstrsPassID =
+ R600ExpandSpecialInstrsPass::ID;
FunctionPass *llvm::createR600ExpandSpecialInstrsPass() {
return new R600ExpandSpecialInstrsPass();
diff --git a/llvm/lib/Target/AMDGPU/R600ISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/R600ISelDAGToDAG.cpp
index 288f14346d10c..5065b336b862f 100644
--- a/llvm/lib/Target/AMDGPU/R600ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AMDGPU/R600ISelDAGToDAG.cpp
@@ -52,13 +52,13 @@ class R600DAGToDAGISel : public AMDGPUDAGToDAGISel {
class R600DAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit R600DAGToDAGISelLegacy(TargetMachine &TM, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
ID, std::make_unique<R600DAGToDAGISel>(TM, OptLevel)) {}
};
-char R600DAGToDAGISelLegacy::ID = 0;
+const char R600DAGToDAGISelLegacy::ID = 0;
} // namespace
diff --git a/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp b/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
index 56d1a194b7384..e2bcbf00b9943 100644
--- a/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
+++ b/llvm/lib/Target/AMDGPU/R600MachineCFGStructurizer.cpp
@@ -96,7 +96,7 @@ class R600MachineCFGStructurizer : public MachineFunctionPass {
SinglePath_NotInPath = 2
};
- static char ID;
+ static const char ID;
R600MachineCFGStructurizer() : MachineFunctionPass(ID) {}
@@ -309,7 +309,7 @@ class R600MachineCFGStructurizer : public MachineFunctionPass {
} // end anonymous namespace
-char R600MachineCFGStructurizer::ID = 0;
+const char R600MachineCFGStructurizer::ID = 0;
int R600MachineCFGStructurizer::getSCCNum(MachineBasicBlock *MBB) const {
MBBInfoMap::const_iterator It = BlockInfoMap.find(MBB);
diff --git a/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp b/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
index 02fa4cd581b93..2c101c10ef34e 100644
--- a/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
+++ b/llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
@@ -139,7 +139,7 @@ PushArgMD(KernelArgMD &MD, const MDVector &V) {
namespace {
class R600OpenCLImageTypeLoweringPass : public ModulePass {
- static char ID;
+ static const char ID;
LLVMContext *Context;
Type *Int32Type;
@@ -367,7 +367,7 @@ class R600OpenCLImageTypeLoweringPass : public ModulePass {
} // end anonymous namespace
-char R600OpenCLImageTypeLoweringPass::ID = 0;
+const char R600OpenCLImageTypeLoweringPass::ID = 0;
ModulePass *llvm::createR600OpenCLImageTypeLoweringPass() {
return new R600OpenCLImageTypeLoweringPass();
diff --git a/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp b/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
index 9e1a97e95dc23..d7c7af5891fcf 100644
--- a/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
+++ b/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp
@@ -97,7 +97,7 @@ class R600VectorRegMerger : public MachineFunctionPass {
void trackRSI(const RegSeqInfo &RSI);
public:
- static char ID;
+ static const char ID;
R600VectorRegMerger() : MachineFunctionPass(ID) {}
@@ -128,9 +128,9 @@ INITIALIZE_PASS_BEGIN(R600VectorRegMerger, DEBUG_TYPE,
INITIALIZE_PASS_END(R600VectorRegMerger, DEBUG_TYPE,
"R600 Vector Reg Merger", false, false)
-char R600VectorRegMerger::ID = 0;
+const char R600VectorRegMerger::ID = 0;
-char &llvm::R600VectorRegMergerID = R600VectorRegMerger::ID;
+const char &llvm::R600VectorRegMergerID = R600VectorRegMerger::ID;
bool R600VectorRegMerger::canSwizzle(const MachineInstr &MI)
const {
diff --git a/llvm/lib/Target/AMDGPU/R600Packetizer.cpp b/llvm/lib/Target/AMDGPU/R600Packetizer.cpp
index 301cb21a808f8..1be0f403c7e15 100644
--- a/llvm/lib/Target/AMDGPU/R600Packetizer.cpp
+++ b/llvm/lib/Target/AMDGPU/R600Packetizer.cpp
@@ -30,7 +30,7 @@ namespace {
class R600Packetizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
R600Packetizer() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -396,9 +396,9 @@ INITIALIZE_PASS_BEGIN(R600Packetizer, DEBUG_TYPE,
INITIALIZE_PASS_END(R600Packetizer, DEBUG_TYPE,
"R600 Packetizer", false, false)
-char R600Packetizer::ID = 0;
+const char R600Packetizer::ID = 0;
-char &llvm::R600PacketizerID = R600Packetizer::ID;
+const char &llvm::R600PacketizerID = R600Packetizer::ID;
llvm::FunctionPass *llvm::createR600Packetizer() {
return new R600Packetizer();
diff --git a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
index f041e94c9161d..dbcb2830f2dbe 100644
--- a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
+++ b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
@@ -409,7 +409,7 @@ PreservedAnalyses SIAnnotateControlFlowPass::run(Function &F,
class SIAnnotateControlFlowLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SIAnnotateControlFlowLegacy() : FunctionPass(ID) {}
@@ -447,7 +447,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_END(SIAnnotateControlFlowLegacy, DEBUG_TYPE,
"Annotate SI Control Flow", false, false)
-char SIAnnotateControlFlowLegacy::ID = 0;
+const char SIAnnotateControlFlowLegacy::ID = 0;
/// Create the annotation pass
FunctionPass *llvm::createSIAnnotateControlFlowLegacyPass() {
diff --git a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
index 8782fc5fc9bb7..cf6071dcfb067 100644
--- a/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
@@ -163,7 +163,7 @@ class SIFixSGPRCopies {
class SIFixSGPRCopiesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIFixSGPRCopiesLegacy() : MachineFunctionPass(ID) {}
@@ -192,9 +192,9 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(SIFixSGPRCopiesLegacy, DEBUG_TYPE, "SI Fix SGPR copies",
false, false)
-char SIFixSGPRCopiesLegacy::ID = 0;
+const char SIFixSGPRCopiesLegacy::ID = 0;
-char &llvm::SIFixSGPRCopiesLegacyID = SIFixSGPRCopiesLegacy::ID;
+const char &llvm::SIFixSGPRCopiesLegacyID = SIFixSGPRCopiesLegacy::ID;
FunctionPass *llvm::createSIFixSGPRCopiesLegacyPass() {
return new SIFixSGPRCopiesLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp b/llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp
index d0d679221eee0..aa23419b712ff 100644
--- a/llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFixVGPRCopies.cpp
@@ -25,7 +25,7 @@ namespace {
class SIFixVGPRCopiesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIFixVGPRCopiesLegacy() : MachineFunctionPass(ID) {
initializeSIFixVGPRCopiesLegacyPass(*PassRegistry::getPassRegistry());
@@ -51,9 +51,9 @@ class SIFixVGPRCopies {
INITIALIZE_PASS(SIFixVGPRCopiesLegacy, DEBUG_TYPE, "SI Fix VGPR copies", false,
false)
-char SIFixVGPRCopiesLegacy::ID = 0;
+const char SIFixVGPRCopiesLegacy::ID = 0;
-char &llvm::SIFixVGPRCopiesID = SIFixVGPRCopiesLegacy::ID;
+const char &llvm::SIFixVGPRCopiesID = SIFixVGPRCopiesLegacy::ID;
PreservedAnalyses SIFixVGPRCopiesPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &) {
diff --git a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
index a2fe31bd849c3..fb7b60d5586bf 100644
--- a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -270,7 +270,7 @@ class SIFoldOperandsImpl {
class SIFoldOperandsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIFoldOperandsLegacy() : MachineFunctionPass(ID) {}
@@ -297,9 +297,9 @@ class SIFoldOperandsLegacy : public MachineFunctionPass {
INITIALIZE_PASS(SIFoldOperandsLegacy, DEBUG_TYPE, "SI Fold Operands", false,
false)
-char SIFoldOperandsLegacy::ID = 0;
+const char SIFoldOperandsLegacy::ID = 0;
-char &llvm::SIFoldOperandsLegacyID = SIFoldOperandsLegacy::ID;
+const char &llvm::SIFoldOperandsLegacyID = SIFoldOperandsLegacy::ID;
static const TargetRegisterClass *getRegOpRC(const MachineRegisterInfo &MRI,
const TargetRegisterInfo &TRI,
diff --git a/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp b/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
index e9aec826f5c72..cbc82ca106787 100644
--- a/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
@@ -59,7 +59,7 @@ class SIFormMemoryClausesImpl {
class SIFormMemoryClausesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIFormMemoryClausesLegacy() : MachineFunctionPass(ID) {
initializeSIFormMemoryClausesLegacyPass(*PassRegistry::getPassRegistry());
@@ -90,9 +90,9 @@ INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
INITIALIZE_PASS_END(SIFormMemoryClausesLegacy, DEBUG_TYPE,
"SI Form memory clauses", false, false)
-char SIFormMemoryClausesLegacy::ID = 0;
+const char SIFormMemoryClausesLegacy::ID = 0;
-char &llvm::SIFormMemoryClausesID = SIFormMemoryClausesLegacy::ID;
+const char &llvm::SIFormMemoryClausesID = SIFormMemoryClausesLegacy::ID;
FunctionPass *llvm::createSIFormMemoryClausesLegacyPass() {
return new SIFormMemoryClausesLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp b/llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp
index 0a68512668c7d..fe4b6c72236f9 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp
@@ -273,7 +273,7 @@ class SIInsertHardClauses {
class SIInsertHardClausesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIInsertHardClausesLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -302,9 +302,9 @@ llvm::SIInsertHardClausesPass::run(MachineFunction &MF,
return PA;
}
-char SIInsertHardClausesLegacy::ID = 0;
+const char SIInsertHardClausesLegacy::ID = 0;
-char &llvm::SIInsertHardClausesID = SIInsertHardClausesLegacy::ID;
+const char &llvm::SIInsertHardClausesID = SIInsertHardClausesLegacy::ID;
INITIALIZE_PASS(SIInsertHardClausesLegacy, DEBUG_TYPE, "SI Insert Hard Clauses",
false, false)
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 9a2a7b4923881..425f0879cd61e 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1039,7 +1039,7 @@ class WaitcntBrackets {
class SIInsertWaitcntsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIInsertWaitcntsLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -1596,9 +1596,9 @@ INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTreeWrapperPass)
INITIALIZE_PASS_END(SIInsertWaitcntsLegacy, DEBUG_TYPE, "SI Insert Waitcnts",
false, false)
-char SIInsertWaitcntsLegacy::ID = 0;
+const char SIInsertWaitcntsLegacy::ID = 0;
-char &llvm::SIInsertWaitcntsID = SIInsertWaitcntsLegacy::ID;
+const char &llvm::SIInsertWaitcntsID = SIInsertWaitcntsLegacy::ID;
FunctionPass *llvm::createSIInsertWaitcntsPass() {
return new SIInsertWaitcntsLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SILateBranchLowering.cpp b/llvm/lib/Target/AMDGPU/SILateBranchLowering.cpp
index 83cf457dfac13..7e5c8a10de50f 100644
--- a/llvm/lib/Target/AMDGPU/SILateBranchLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SILateBranchLowering.cpp
@@ -51,7 +51,7 @@ class SILateBranchLowering {
class SILateBranchLoweringLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILateBranchLoweringLegacy() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -76,7 +76,7 @@ class SILateBranchLoweringLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char SILateBranchLoweringLegacy::ID = 0;
+const char SILateBranchLoweringLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(SILateBranchLoweringLegacy, DEBUG_TYPE,
"SI insert s_cbranch_execz instructions", false, false)
@@ -84,7 +84,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(SILateBranchLoweringLegacy, DEBUG_TYPE,
"SI insert s_cbranch_execz instructions", false, false)
-char &llvm::SILateBranchLoweringPassID = SILateBranchLoweringLegacy::ID;
+const char &llvm::SILateBranchLoweringPassID = SILateBranchLoweringLegacy::ID;
static void generateEndPgm(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I, DebugLoc DL,
diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
index 594c35a1dee3b..d3304224a69ce 100644
--- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -319,7 +319,7 @@ class SILoadStoreOptimizer {
class SILoadStoreOptimizerLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILoadStoreOptimizerLegacy() : MachineFunctionPass(ID) {}
@@ -944,9 +944,9 @@ INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
INITIALIZE_PASS_END(SILoadStoreOptimizerLegacy, DEBUG_TYPE,
"SI Load Store Optimizer", false, false)
-char SILoadStoreOptimizerLegacy::ID = 0;
+const char SILoadStoreOptimizerLegacy::ID = 0;
-char &llvm::SILoadStoreOptimizerLegacyID = SILoadStoreOptimizerLegacy::ID;
+const char &llvm::SILoadStoreOptimizerLegacyID = SILoadStoreOptimizerLegacy::ID;
FunctionPass *llvm::createSILoadStoreOptimizerLegacyPass() {
return new SILoadStoreOptimizerLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
index 9cc86e84407b1..bf8782831d650 100644
--- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
@@ -143,7 +143,7 @@ class SILowerControlFlow {
class SILowerControlFlowLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILowerControlFlowLegacy() : MachineFunctionPass(ID) {}
@@ -168,7 +168,7 @@ class SILowerControlFlowLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char SILowerControlFlowLegacy::ID = 0;
+const char SILowerControlFlowLegacy::ID = 0;
INITIALIZE_PASS(SILowerControlFlowLegacy, DEBUG_TYPE, "SI lower control flow",
false, false)
@@ -180,7 +180,7 @@ static void setImpSCCDefDead(MachineInstr &MI, bool IsDead) {
ImpDefSCC.setIsDead(IsDead);
}
-char &llvm::SILowerControlFlowLegacyID = SILowerControlFlowLegacy::ID;
+const char &llvm::SILowerControlFlowLegacyID = SILowerControlFlowLegacy::ID;
bool SILowerControlFlow::hasKill(const MachineBasicBlock *Begin,
const MachineBasicBlock *End) {
diff --git a/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp b/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
index 5b329f46930ca..7360243fbb240 100644
--- a/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
@@ -886,7 +886,7 @@ SILowerI1CopiesPass::run(MachineFunction &MF,
class SILowerI1CopiesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILowerI1CopiesLegacy() : MachineFunctionPass(ID) {
initializeSILowerI1CopiesLegacyPass(*PassRegistry::getPassRegistry());
@@ -919,9 +919,9 @@ INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTreeWrapperPass)
INITIALIZE_PASS_END(SILowerI1CopiesLegacy, DEBUG_TYPE, "SI Lower i1 Copies",
false, false)
-char SILowerI1CopiesLegacy::ID = 0;
+const char SILowerI1CopiesLegacy::ID = 0;
-char &llvm::SILowerI1CopiesLegacyID = SILowerI1CopiesLegacy::ID;
+const char &llvm::SILowerI1CopiesLegacyID = SILowerI1CopiesLegacy::ID;
FunctionPass *llvm::createSILowerI1CopiesLegacyPass() {
return new SILowerI1CopiesLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp b/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
index cbd08f0fb5dff..f6b1d7a358e52 100644
--- a/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
@@ -68,7 +68,7 @@ class SILowerSGPRSpills {
class SILowerSGPRSpillsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILowerSGPRSpillsLegacy() : MachineFunctionPass(ID) {}
@@ -88,7 +88,7 @@ class SILowerSGPRSpillsLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char SILowerSGPRSpillsLegacy::ID = 0;
+const char SILowerSGPRSpillsLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(SILowerSGPRSpillsLegacy, DEBUG_TYPE,
"SI lower SGPR spill instructions", false, false)
@@ -98,7 +98,7 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
INITIALIZE_PASS_END(SILowerSGPRSpillsLegacy, DEBUG_TYPE,
"SI lower SGPR spill instructions", false, false)
-char &llvm::SILowerSGPRSpillsLegacyID = SILowerSGPRSpillsLegacy::ID;
+const char &llvm::SILowerSGPRSpillsLegacyID = SILowerSGPRSpillsLegacy::ID;
static bool isLiveIntoMBB(MCRegister Reg, MachineBasicBlock &MBB,
const TargetRegisterInfo *TRI) {
diff --git a/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp b/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
index ef384c2a1a215..f20339914522c 100644
--- a/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
+++ b/llvm/lib/Target/AMDGPU/SILowerWWMCopies.cpp
@@ -51,7 +51,7 @@ class SILowerWWMCopies {
class SILowerWWMCopiesLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SILowerWWMCopiesLegacy() : MachineFunctionPass(ID) {
initializeSILowerWWMCopiesLegacyPass(*PassRegistry::getPassRegistry());
@@ -79,9 +79,9 @@ INITIALIZE_PASS_DEPENDENCY(VirtRegMapWrapperLegacy)
INITIALIZE_PASS_END(SILowerWWMCopiesLegacy, DEBUG_TYPE, "SI Lower WWM Copies",
false, false)
-char SILowerWWMCopiesLegacy::ID = 0;
+const char SILowerWWMCopiesLegacy::ID = 0;
-char &llvm::SILowerWWMCopiesLegacyID = SILowerWWMCopiesLegacy::ID;
+const char &llvm::SILowerWWMCopiesLegacyID = SILowerWWMCopiesLegacy::ID;
bool SILowerWWMCopies::isSCCLiveAtMI(const MachineInstr &MI) {
// We can't determine the liveness info if LIS isn't available. Early return
diff --git a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
index c16aa3e8a0352..881c29b1c2a7a 100644
--- a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
@@ -603,7 +603,7 @@ class SIMemoryLegalizer final {
class SIMemoryLegalizerLegacy final : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIMemoryLegalizerLegacy() : MachineFunctionPass(ID) {}
@@ -2479,8 +2479,8 @@ bool SIMemoryLegalizer::run(MachineFunction &MF) {
INITIALIZE_PASS(SIMemoryLegalizerLegacy, DEBUG_TYPE, PASS_NAME, false, false)
-char SIMemoryLegalizerLegacy::ID = 0;
-char &llvm::SIMemoryLegalizerID = SIMemoryLegalizerLegacy::ID;
+const char SIMemoryLegalizerLegacy::ID = 0;
+const char &llvm::SIMemoryLegalizerID = SIMemoryLegalizerLegacy::ID;
FunctionPass *llvm::createSIMemoryLegalizerPass() {
return new SIMemoryLegalizerLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
index dc723986badc7..b1f50c8dc5aed 100644
--- a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
+++ b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
@@ -139,7 +139,7 @@ class SIModeRegister {
class SIModeRegisterLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIModeRegisterLegacy() : MachineFunctionPass(ID) {}
@@ -155,9 +155,9 @@ class SIModeRegisterLegacy : public MachineFunctionPass {
INITIALIZE_PASS(SIModeRegisterLegacy, DEBUG_TYPE,
"Insert required mode register values", false, false)
-char SIModeRegisterLegacy::ID = 0;
+const char SIModeRegisterLegacy::ID = 0;
-char &llvm::SIModeRegisterID = SIModeRegisterLegacy::ID;
+const char &llvm::SIModeRegisterID = SIModeRegisterLegacy::ID;
FunctionPass *llvm::createSIModeRegisterPass() {
return new SIModeRegisterLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
index aa028c850bd49..14387d91b6bdc 100644
--- a/llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
+++ b/llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
@@ -74,7 +74,7 @@ class SIOptimizeExecMasking {
class SIOptimizeExecMaskingLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIOptimizeExecMaskingLegacy() : MachineFunctionPass(ID) {
initializeSIOptimizeExecMaskingLegacyPass(*PassRegistry::getPassRegistry());
@@ -113,9 +113,10 @@ INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
INITIALIZE_PASS_END(SIOptimizeExecMaskingLegacy, DEBUG_TYPE,
"SI optimize exec mask operations", false, false)
-char SIOptimizeExecMaskingLegacy::ID = 0;
+const char SIOptimizeExecMaskingLegacy::ID = 0;
-char &llvm::SIOptimizeExecMaskingLegacyID = SIOptimizeExecMaskingLegacy::ID;
+const char &llvm::SIOptimizeExecMaskingLegacyID =
+ SIOptimizeExecMaskingLegacy::ID;
/// If \p MI is a copy from exec, return the register copied to.
Register SIOptimizeExecMasking::isCopyFromExec(const MachineInstr &MI) const {
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
index a9ab38bffb731..42809a8b1c670 100644
--- a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
+++ b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
@@ -52,7 +52,7 @@ class SIOptimizeExecMaskingPreRA {
class SIOptimizeExecMaskingPreRALegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIOptimizeExecMaskingPreRALegacy() : MachineFunctionPass(ID) {
initializeSIOptimizeExecMaskingPreRALegacyPass(
@@ -80,9 +80,10 @@ INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
INITIALIZE_PASS_END(SIOptimizeExecMaskingPreRALegacy, DEBUG_TYPE,
"SI optimize exec mask operations pre-RA", false, false)
-char SIOptimizeExecMaskingPreRALegacy::ID = 0;
+const char SIOptimizeExecMaskingPreRALegacy::ID = 0;
-char &llvm::SIOptimizeExecMaskingPreRAID = SIOptimizeExecMaskingPreRALegacy::ID;
+const char &llvm::SIOptimizeExecMaskingPreRAID =
+ SIOptimizeExecMaskingPreRALegacy::ID;
FunctionPass *llvm::createSIOptimizeExecMaskingPreRAPass() {
return new SIOptimizeExecMaskingPreRALegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
index 610a835ec3303..976ea1a739f65 100644
--- a/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
+++ b/llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp
@@ -146,7 +146,7 @@ class SIOptimizeVGPRLiveRange {
class SIOptimizeVGPRLiveRangeLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIOptimizeVGPRLiveRangeLegacy() : MachineFunctionPass(ID) {}
@@ -621,7 +621,7 @@ void SIOptimizeVGPRLiveRange::optimizeWaterfallLiveRange(
}
}
-char SIOptimizeVGPRLiveRangeLegacy::ID = 0;
+const char SIOptimizeVGPRLiveRangeLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(SIOptimizeVGPRLiveRangeLegacy, DEBUG_TYPE,
"SI Optimize VGPR LiveRange", false, false)
@@ -631,7 +631,8 @@ INITIALIZE_PASS_DEPENDENCY(LiveVariablesWrapperPass)
INITIALIZE_PASS_END(SIOptimizeVGPRLiveRangeLegacy, DEBUG_TYPE,
"SI Optimize VGPR LiveRange", false, false)
-char &llvm::SIOptimizeVGPRLiveRangeLegacyID = SIOptimizeVGPRLiveRangeLegacy::ID;
+const char &llvm::SIOptimizeVGPRLiveRangeLegacyID =
+ SIOptimizeVGPRLiveRangeLegacy::ID;
FunctionPass *llvm::createSIOptimizeVGPRLiveRangeLegacyPass() {
return new SIOptimizeVGPRLiveRangeLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp b/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
index 926c52fa027b7..20cb908cc3c53 100644
--- a/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
@@ -73,7 +73,7 @@ class SIPeepholeSDWA {
class SIPeepholeSDWALegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIPeepholeSDWALegacy() : MachineFunctionPass(ID) {}
@@ -212,9 +212,9 @@ class SDWADstPreserveOperand : public SDWADstOperand {
INITIALIZE_PASS(SIPeepholeSDWALegacy, DEBUG_TYPE, "SI Peephole SDWA", false,
false)
-char SIPeepholeSDWALegacy::ID = 0;
+const char SIPeepholeSDWALegacy::ID = 0;
-char &llvm::SIPeepholeSDWALegacyID = SIPeepholeSDWALegacy::ID;
+const char &llvm::SIPeepholeSDWALegacyID = SIPeepholeSDWALegacy::ID;
FunctionPass *llvm::createSIPeepholeSDWALegacyPass() {
return new SIPeepholeSDWALegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIPostRABundler.cpp b/llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
index b537e44aaa9ea..64ea5dd590cab 100644
--- a/llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
@@ -26,7 +26,7 @@ namespace {
class SIPostRABundlerLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
public:
SIPostRABundlerLegacy() : MachineFunctionPass(ID) {
@@ -72,9 +72,9 @@ constexpr uint64_t MemFlags = SIInstrFlags::MTBUF | SIInstrFlags::MUBUF |
INITIALIZE_PASS(SIPostRABundlerLegacy, DEBUG_TYPE, "SI post-RA bundler", false,
false)
-char SIPostRABundlerLegacy::ID = 0;
+const char SIPostRABundlerLegacy::ID = 0;
-char &llvm::SIPostRABundlerLegacyID = SIPostRABundlerLegacy::ID;
+const char &llvm::SIPostRABundlerLegacyID = SIPostRABundlerLegacy::ID;
FunctionPass *llvm::createSIPostRABundlerPass() {
return new SIPostRABundlerLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp b/llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
index b9f2993783a1b..3fa17ebfb27ec 100644
--- a/llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
@@ -61,7 +61,7 @@ class SIPreAllocateWWMRegs {
class SIPreAllocateWWMRegsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIPreAllocateWWMRegsLegacy() : MachineFunctionPass(ID) {}
@@ -86,9 +86,9 @@ INITIALIZE_PASS_DEPENDENCY(LiveRegMatrixWrapperLegacy)
INITIALIZE_PASS_END(SIPreAllocateWWMRegsLegacy, DEBUG_TYPE,
"SI Pre-allocate WWM Registers", false, false)
-char SIPreAllocateWWMRegsLegacy::ID = 0;
+const char SIPreAllocateWWMRegsLegacy::ID = 0;
-char &llvm::SIPreAllocateWWMRegsLegacyID = SIPreAllocateWWMRegsLegacy::ID;
+const char &llvm::SIPreAllocateWWMRegsLegacyID = SIPreAllocateWWMRegsLegacy::ID;
FunctionPass *llvm::createSIPreAllocateWWMRegsLegacyPass() {
return new SIPreAllocateWWMRegsLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp b/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
index 385127cb26eea..536e151010acd 100644
--- a/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
+++ b/llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
@@ -83,7 +83,7 @@ class SIPreEmitPeephole {
class SIPreEmitPeepholeLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIPreEmitPeepholeLegacy() : MachineFunctionPass(ID) {
initializeSIPreEmitPeepholeLegacyPass(*PassRegistry::getPassRegistry());
@@ -99,9 +99,9 @@ class SIPreEmitPeepholeLegacy : public MachineFunctionPass {
INITIALIZE_PASS(SIPreEmitPeepholeLegacy, DEBUG_TYPE,
"SI peephole optimizations", false, false)
-char SIPreEmitPeepholeLegacy::ID = 0;
+const char SIPreEmitPeepholeLegacy::ID = 0;
-char &llvm::SIPreEmitPeepholeID = SIPreEmitPeepholeLegacy::ID;
+const char &llvm::SIPreEmitPeepholeID = SIPreEmitPeepholeLegacy::ID;
bool SIPreEmitPeephole::optimizeVccBranch(MachineInstr &MI) const {
// Match:
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
index 5b32bd0b72a59..42f1955a41bad 100644
--- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -67,7 +67,7 @@ class SIShrinkInstructions {
class SIShrinkInstructionsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIShrinkInstructionsLegacy() : MachineFunctionPass(ID) {}
@@ -86,7 +86,7 @@ class SIShrinkInstructionsLegacy : public MachineFunctionPass {
INITIALIZE_PASS(SIShrinkInstructionsLegacy, DEBUG_TYPE,
"SI Shrink Instructions", false, false)
-char SIShrinkInstructionsLegacy::ID = 0;
+const char SIShrinkInstructionsLegacy::ID = 0;
FunctionPass *llvm::createSIShrinkInstructionsLegacyPass() {
return new SIShrinkInstructionsLegacy();
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
index 5fd0c1e1064cb..94a022ca82b94 100644
--- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -233,7 +233,7 @@ class SIWholeQuadMode {
class SIWholeQuadModeLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SIWholeQuadModeLegacy() : MachineFunctionPass(ID) {}
@@ -256,7 +256,7 @@ class SIWholeQuadModeLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char SIWholeQuadModeLegacy::ID = 0;
+const char SIWholeQuadModeLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(SIWholeQuadModeLegacy, DEBUG_TYPE, "SI Whole Quad Mode",
false, false)
@@ -266,7 +266,7 @@ INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTreeWrapperPass)
INITIALIZE_PASS_END(SIWholeQuadModeLegacy, DEBUG_TYPE, "SI Whole Quad Mode",
false, false)
-char &llvm::SIWholeQuadModeID = SIWholeQuadModeLegacy::ID;
+const char &llvm::SIWholeQuadModeID = SIWholeQuadModeLegacy::ID;
FunctionPass *llvm::createSIWholeQuadModeLegacyPass() {
return new SIWholeQuadModeLegacy;
diff --git a/llvm/lib/Target/ARC/ARCAsmPrinter.cpp b/llvm/lib/Target/ARC/ARCAsmPrinter.cpp
index 55de4015b585b..7aaddad22090e 100644
--- a/llvm/lib/Target/ARC/ARCAsmPrinter.cpp
+++ b/llvm/lib/Target/ARC/ARCAsmPrinter.cpp
@@ -35,7 +35,7 @@ class ARCAsmPrinter : public AsmPrinter {
ARCMCInstLower MCInstLowering;
public:
- static char ID;
+ static const char ID;
explicit ARCAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
@@ -74,7 +74,7 @@ bool ARCAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
return AsmPrinter::runOnMachineFunction(MF);
}
-char ARCAsmPrinter::ID = 0;
+const char ARCAsmPrinter::ID = 0;
INITIALIZE_PASS(ARCAsmPrinter, "arc-asm-printer", "ARC Assmebly Printer", false,
false)
diff --git a/llvm/lib/Target/ARC/ARCBranchFinalize.cpp b/llvm/lib/Target/ARC/ARCBranchFinalize.cpp
index 9d616e103f171..b142d2a9d969e 100644
--- a/llvm/lib/Target/ARC/ARCBranchFinalize.cpp
+++ b/llvm/lib/Target/ARC/ARCBranchFinalize.cpp
@@ -37,7 +37,7 @@ namespace {
class ARCBranchFinalize : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARCBranchFinalize() : MachineFunctionPass(ID) {
initializeARCBranchFinalizePass(*PassRegistry::getPassRegistry());
@@ -55,7 +55,7 @@ class ARCBranchFinalize : public MachineFunctionPass {
const ARCInstrInfo *TII{nullptr};
};
-char ARCBranchFinalize::ID = 0;
+const char ARCBranchFinalize::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARC/ARCExpandPseudos.cpp b/llvm/lib/Target/ARC/ARCExpandPseudos.cpp
index 84bb6cac28768..a1a188940559b 100644
--- a/llvm/lib/Target/ARC/ARCExpandPseudos.cpp
+++ b/llvm/lib/Target/ARC/ARCExpandPseudos.cpp
@@ -27,7 +27,7 @@ namespace {
class ARCExpandPseudos : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARCExpandPseudos() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -42,7 +42,7 @@ class ARCExpandPseudos : public MachineFunctionPass {
const ARCInstrInfo *TII;
};
-char ARCExpandPseudos::ID = 0;
+const char ARCExpandPseudos::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp b/llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp
index 02a5721c70fcd..398e4b053a753 100644
--- a/llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp
@@ -61,13 +61,13 @@ class ARCDAGToDAGISel : public SelectionDAGISel {
class ARCDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit ARCDAGToDAGISelLegacy(ARCTargetMachine &TM, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
ID, std::make_unique<ARCDAGToDAGISel>(TM, OptLevel)) {}
};
-char ARCDAGToDAGISelLegacy::ID;
+const char ARCDAGToDAGISelLegacy::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARC/ARCOptAddrMode.cpp b/llvm/lib/Target/ARC/ARCOptAddrMode.cpp
index a2af5062c65a0..55c74cae96779 100644
--- a/llvm/lib/Target/ARC/ARCOptAddrMode.cpp
+++ b/llvm/lib/Target/ARC/ARCOptAddrMode.cpp
@@ -51,7 +51,7 @@ void initializeARCOptAddrModePass(PassRegistry &);
namespace {
class ARCOptAddrMode : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARCOptAddrMode() : MachineFunctionPass(ID) {}
@@ -116,7 +116,7 @@ class ARCOptAddrMode : public MachineFunctionPass {
} // end anonymous namespace
-char ARCOptAddrMode::ID = 0;
+const char ARCOptAddrMode::ID = 0;
INITIALIZE_PASS_BEGIN(ARCOptAddrMode, OPTADDRMODE_NAME, OPTADDRMODE_DESC, false,
false)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
diff --git a/llvm/lib/Target/ARM/A15SDOptimizer.cpp b/llvm/lib/Target/ARM/A15SDOptimizer.cpp
index cd775dd5aa7a6..b809e9444bca2 100644
--- a/llvm/lib/Target/ARM/A15SDOptimizer.cpp
+++ b/llvm/lib/Target/ARM/A15SDOptimizer.cpp
@@ -46,7 +46,7 @@ using namespace llvm;
namespace {
struct A15SDOptimizer : public MachineFunctionPass {
- static char ID;
+ static const char ID;
A15SDOptimizer() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -125,7 +125,7 @@ namespace {
std::map<MachineInstr*, unsigned> Replacements;
std::set<MachineInstr *> DeadInstr;
};
- char A15SDOptimizer::ID = 0;
+ const char A15SDOptimizer::ID = 0;
} // end anonymous namespace
// Returns true if this is a use of a SPR register.
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 45f647951df33..978b8feae1fe8 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -2933,7 +2933,7 @@ void ARMAsmPrinter::emitInstruction(const MachineInstr *MI) {
EmitToStreamer(*OutStreamer, TmpInst);
}
-char ARMAsmPrinter::ID = 0;
+const char ARMAsmPrinter::ID = 0;
INITIALIZE_PASS(ARMAsmPrinter, "arm-asm-printer", "ARM Assembly Printer", false,
false)
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.h b/llvm/lib/Target/ARM/ARMAsmPrinter.h
index 1d35b3c445958..55ffc727e6d11 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.h
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.h
@@ -30,7 +30,7 @@ namespace ARM {
class LLVM_LIBRARY_VISIBILITY ARMAsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
/// AFI - Keep a pointer to ARMFunctionInfo for the current
diff --git a/llvm/lib/Target/ARM/ARMBlockPlacement.cpp b/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
index 3d8ebfeae81da..021f0588c24d3 100644
--- a/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
+++ b/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
@@ -36,7 +36,7 @@ class ARMBlockPlacement : public MachineFunctionPass {
SmallVector<MachineInstr *> RevertedWhileLoops;
public:
- static char ID;
+ static const char ID;
ARMBlockPlacement() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -58,7 +58,7 @@ FunctionPass *llvm::createARMBlockPlacementPass() {
return new ARMBlockPlacement();
}
-char ARMBlockPlacement::ID = 0;
+const char ARMBlockPlacement::ID = 0;
INITIALIZE_PASS(ARMBlockPlacement, DEBUG_TYPE, "ARM block placement", false,
false)
diff --git a/llvm/lib/Target/ARM/ARMBranchTargets.cpp b/llvm/lib/Target/ARM/ARMBranchTargets.cpp
index 409482b9679d8..2a2e403159062 100644
--- a/llvm/lib/Target/ARM/ARMBranchTargets.cpp
+++ b/llvm/lib/Target/ARM/ARMBranchTargets.cpp
@@ -31,7 +31,7 @@ using namespace llvm;
namespace {
class ARMBranchTargets : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARMBranchTargets() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -42,7 +42,7 @@ class ARMBranchTargets : public MachineFunctionPass {
};
} // end anonymous namespace
-char ARMBranchTargets::ID = 0;
+const char ARMBranchTargets::ID = 0;
INITIALIZE_PASS(ARMBranchTargets, "arm-branch-targets", ARM_BRANCH_TARGETS_NAME,
false, false)
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index 80494d993f425..50e696959d7d0 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -217,7 +217,7 @@ namespace {
bool isPositionIndependentOrROPI;
public:
- static char ID;
+ static const char ID;
ARMConstantIslands() : MachineFunctionPass(ID) {}
@@ -290,7 +290,7 @@ namespace {
} // end anonymous namespace
-char ARMConstantIslands::ID = 0;
+const char ARMConstantIslands::ID = 0;
/// verify - check BBOffsets, BBSizes, alignment of islands
void ARMConstantIslands::verify() {
diff --git a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index 14e4c19a8ac1a..22d86d774ded9 100644
--- a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -42,7 +42,7 @@ VerifyARMPseudo("verify-arm-pseudo-expand", cl::Hidden,
namespace {
class ARMExpandPseudo : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARMExpandPseudo() : MachineFunctionPass(ID) {}
const ARMBaseInstrInfo *TII;
@@ -116,7 +116,7 @@ namespace {
MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI);
};
- char ARMExpandPseudo::ID = 0;
+ const char ARMExpandPseudo::ID = 0;
}
INITIALIZE_PASS(ARMExpandPseudo, DEBUG_TYPE, ARM_EXPAND_PSEUDO_NAME, false,
diff --git a/llvm/lib/Target/ARM/ARMFixCortexA57AES1742098Pass.cpp b/llvm/lib/Target/ARM/ARMFixCortexA57AES1742098Pass.cpp
index 547205f900039..45b128cde7520 100644
--- a/llvm/lib/Target/ARM/ARMFixCortexA57AES1742098Pass.cpp
+++ b/llvm/lib/Target/ARM/ARMFixCortexA57AES1742098Pass.cpp
@@ -67,7 +67,7 @@ using namespace llvm;
namespace {
class ARMFixCortexA57AES1742098 : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
explicit ARMFixCortexA57AES1742098() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &F) override;
@@ -105,7 +105,7 @@ class ARMFixCortexA57AES1742098 : public MachineFunctionPass {
static bool isFirstAESPairInstr(MachineInstr &MI);
static bool isSafeAESInput(MachineInstr &MI);
};
-char ARMFixCortexA57AES1742098::ID = 0;
+const char ARMFixCortexA57AES1742098::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
index 26b5e5a22386e..90b3e922d6021 100644
--- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -351,14 +351,14 @@ class ARMDAGToDAGISel : public SelectionDAGISel {
class ARMDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
ARMDAGToDAGISelLegacy(ARMBaseTargetMachine &tm, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
ID, std::make_unique<ARMDAGToDAGISel>(tm, OptLevel)) {}
};
}
-char ARMDAGToDAGISelLegacy::ID = 0;
+const char ARMDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(ARMDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
index db37b769efcad..0999c1894ebb1 100644
--- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -99,7 +99,7 @@ namespace {
/// Post- register allocation pass the combine load / store instructions to
/// form ldm / stm instructions.
struct ARMLoadStoreOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const MachineFunction *MF;
const TargetInstrInfo *TII;
@@ -196,7 +196,7 @@ namespace {
} // end anonymous namespace
-char ARMLoadStoreOpt::ID = 0;
+const char ARMLoadStoreOpt::ID = 0;
INITIALIZE_PASS(ARMLoadStoreOpt, "arm-ldst-opt", ARM_LOAD_STORE_OPT_NAME, false,
false)
@@ -2137,7 +2137,7 @@ namespace {
/// Pre- register allocation pass that move load / stores from consecutive
/// locations close to make it more likely they will be combined later.
struct ARMPreAllocLoadStoreOpt : public MachineFunctionPass{
- static char ID;
+ static const char ID;
AliasAnalysis *AA;
const DataLayout *TD;
@@ -2179,7 +2179,7 @@ namespace {
} // end anonymous namespace
-char ARMPreAllocLoadStoreOpt::ID = 0;
+const char ARMPreAllocLoadStoreOpt::ID = 0;
INITIALIZE_PASS_BEGIN(ARMPreAllocLoadStoreOpt, "arm-prera-ldst-opt",
ARM_PREALLOC_LOAD_STORE_OPT_NAME, false, false)
diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
index 1719165fb6717..4aa69d73c6f3c 100644
--- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
@@ -474,7 +474,7 @@ namespace {
std::unique_ptr<ARMBasicBlockUtils> BBUtils = nullptr;
public:
- static char ID;
+ static const char ID;
ARMLowOverheadLoops() : MachineFunctionPass(ID) { }
@@ -519,7 +519,7 @@ namespace {
};
}
-char ARMLowOverheadLoops::ID = 0;
+const char ARMLowOverheadLoops::ID = 0;
INITIALIZE_PASS(ARMLowOverheadLoops, DEBUG_TYPE, ARM_LOW_OVERHEAD_LOOPS_NAME,
false, false)
diff --git a/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp b/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
index b2708ec1437d7..32bc4f0725f37 100644
--- a/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
+++ b/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
@@ -20,7 +20,7 @@ STATISTIC(NumDMBsRemoved, "Number of DMBs removed");
namespace {
class ARMOptimizeBarriersPass : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
ARMOptimizeBarriersPass() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -31,7 +31,7 @@ class ARMOptimizeBarriersPass : public MachineFunctionPass {
StringRef getPassName() const override { return "optimise barriers pass"; }
};
-char ARMOptimizeBarriersPass::ID = 0;
+const char ARMOptimizeBarriersPass::ID = 0;
}
// Returns whether the instruction can safely move past a DMB instruction
diff --git a/llvm/lib/Target/ARM/ARMParallelDSP.cpp b/llvm/lib/Target/ARM/ARMParallelDSP.cpp
index 05667f4f8619e..c9c94821192a4 100644
--- a/llvm/lib/Target/ARM/ARMParallelDSP.cpp
+++ b/llvm/lib/Target/ARM/ARMParallelDSP.cpp
@@ -233,7 +233,7 @@ namespace {
bool MatchSMLAD(Function &F);
public:
- static char ID;
+ static const char ID;
ARMParallelDSP() : FunctionPass(ID) { }
@@ -809,7 +809,7 @@ Pass *llvm::createARMParallelDSPPass() {
return new ARMParallelDSP();
}
-char ARMParallelDSP::ID = 0;
+const char ARMParallelDSP::ID = 0;
INITIALIZE_PASS_BEGIN(ARMParallelDSP, "arm-parallel-dsp",
"Transform functions to use DSP intrinsics", false, false)
diff --git a/llvm/lib/Target/ARM/ARMSLSHardening.cpp b/llvm/lib/Target/ARM/ARMSLSHardening.cpp
index 23acc3cfba68e..36f2959058b8a 100644
--- a/llvm/lib/Target/ARM/ARMSLSHardening.cpp
+++ b/llvm/lib/Target/ARM/ARMSLSHardening.cpp
@@ -37,7 +37,7 @@ class ARMSLSHardening : public MachineFunctionPass {
const TargetInstrInfo *TII;
const ARMSubtarget *ST;
- static char ID;
+ static const char ID;
ARMSLSHardening() : MachineFunctionPass(ID) {
initializeARMSLSHardeningPass(*PassRegistry::getPassRegistry());
@@ -62,7 +62,7 @@ class ARMSLSHardening : public MachineFunctionPass {
} // end anonymous namespace
-char ARMSLSHardening::ID = 0;
+const char ARMSLSHardening::ID = 0;
INITIALIZE_PASS(ARMSLSHardening, "arm-sls-hardening",
ARM_SLS_HARDENING_NAME, false, false)
@@ -387,7 +387,7 @@ FunctionPass *llvm::createARMSLSHardeningPass() {
namespace {
class ARMIndirectThunks : public ThunkInserterPass<SLSBLRThunkInserter> {
public:
- static char ID;
+ static const char ID;
ARMIndirectThunks() : ThunkInserterPass(ID) {}
@@ -395,7 +395,7 @@ class ARMIndirectThunks : public ThunkInserterPass<SLSBLRThunkInserter> {
};
} // end anonymous namespace
-char ARMIndirectThunks::ID = 0;
+const char ARMIndirectThunks::ID = 0;
FunctionPass *llvm::createARMIndirectThunks() {
return new ARMIndirectThunks();
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
index d74d7737995a1..42e71195626e8 100644
--- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp
@@ -324,13 +324,13 @@ class ARMPassConfig : public TargetPassConfig {
class ARMExecutionDomainFix : public ExecutionDomainFix {
public:
- static char ID;
+ static const char ID;
ARMExecutionDomainFix() : ExecutionDomainFix(ID, ARM::DPRRegClass) {}
StringRef getPassName() const override {
return "ARM Execution Domain Fix";
}
};
-char ARMExecutionDomainFix::ID;
+const char ARMExecutionDomainFix::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARM/MLxExpansionPass.cpp b/llvm/lib/Target/ARM/MLxExpansionPass.cpp
index eb237b4275cc9..36d8549739c17 100644
--- a/llvm/lib/Target/ARM/MLxExpansionPass.cpp
+++ b/llvm/lib/Target/ARM/MLxExpansionPass.cpp
@@ -37,7 +37,7 @@ STATISTIC(NumExpand, "Number of fp MLA / MLS instructions expanded");
namespace {
struct MLxExpansion : public MachineFunctionPass {
- static char ID;
+ static const char ID;
MLxExpansion() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -69,7 +69,7 @@ namespace {
bool NegAcc, bool HasLane);
bool ExpandFPMLxInstructions(MachineBasicBlock &MBB);
};
- char MLxExpansion::ID = 0;
+ const char MLxExpansion::ID = 0;
}
void MLxExpansion::clearStack() {
diff --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index 374a07882b485..62a30a1d0faa2 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -54,7 +54,7 @@ namespace {
class MVEGatherScatterLowering : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit MVEGatherScatterLowering() : FunctionPass(ID) {
initializeMVEGatherScatterLoweringPass(*PassRegistry::getPassRegistry());
@@ -158,7 +158,7 @@ class MVEGatherScatterLowering : public FunctionPass {
} // end anonymous namespace
-char MVEGatherScatterLowering::ID = 0;
+const char MVEGatherScatterLowering::ID = 0;
INITIALIZE_PASS(MVEGatherScatterLowering, DEBUG_TYPE,
"MVE gather/scattering lowering pass", false, false)
diff --git a/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp b/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp
index e6bb4986c836e..0ae0cb098d082 100644
--- a/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp
+++ b/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp
@@ -78,7 +78,7 @@ namespace {
class MVELaneInterleaving : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit MVELaneInterleaving() : FunctionPass(ID) {
initializeMVELaneInterleavingPass(*PassRegistry::getPassRegistry());
@@ -97,7 +97,7 @@ class MVELaneInterleaving : public FunctionPass {
} // end anonymous namespace
-char MVELaneInterleaving::ID = 0;
+const char MVELaneInterleaving::ID = 0;
INITIALIZE_PASS(MVELaneInterleaving, DEBUG_TYPE, "MVE lane interleaving", false,
false)
diff --git a/llvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp b/llvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp
index 413e8442419fd..6de3ec7142efe 100644
--- a/llvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp
+++ b/llvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp
@@ -47,7 +47,7 @@ SetLRPredicate("arm-set-lr-predicate", cl::Hidden,
namespace {
class MVETPAndVPTOptimisations : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
const Thumb2InstrInfo *TII;
MachineRegisterInfo *MRI;
@@ -84,7 +84,7 @@ class MVETPAndVPTOptimisations : public MachineFunctionPass {
MachineInstr *LoopStart);
};
-char MVETPAndVPTOptimisations::ID = 0;
+const char MVETPAndVPTOptimisations::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARM/MVETailPredication.cpp b/llvm/lib/Target/ARM/MVETailPredication.cpp
index f9f01163846ba..570407676da75 100644
--- a/llvm/lib/Target/ARM/MVETailPredication.cpp
+++ b/llvm/lib/Target/ARM/MVETailPredication.cpp
@@ -86,7 +86,7 @@ class MVETailPredication : public LoopPass {
const ARMSubtarget *ST = nullptr;
public:
- static char ID;
+ static const char ID;
MVETailPredication() : LoopPass(ID) { }
@@ -454,6 +454,6 @@ Pass *llvm::createMVETailPredicationPass() {
return new MVETailPredication();
}
-char MVETailPredication::ID = 0;
+const char MVETailPredication::ID = 0;
INITIALIZE_PASS(MVETailPredication, DEBUG_TYPE, DESC, false, false)
diff --git a/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp b/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
index d896d10a7758c..c9227cbe44ed4 100644
--- a/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
+++ b/llvm/lib/Target/ARM/MVEVPTBlockPass.cpp
@@ -32,7 +32,7 @@ using namespace llvm;
namespace {
class MVEVPTBlock : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
const Thumb2InstrInfo *TII;
const TargetRegisterInfo *TRI;
@@ -52,7 +52,7 @@ class MVEVPTBlock : public MachineFunctionPass {
bool InsertVPTBlocks(MachineBasicBlock &MBB);
};
-char MVEVPTBlock::ID = 0;
+const char MVEVPTBlock::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
index 4980910a4952e..83876fff603b5 100644
--- a/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
+++ b/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
@@ -40,7 +40,7 @@ namespace {
class Thumb2ITBlock : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
bool restrictIT;
const Thumb2InstrInfo *TII;
@@ -66,7 +66,7 @@ namespace {
bool InsertITInstructions(MachineBasicBlock &Block);
};
- char Thumb2ITBlock::ID = 0;
+ const char Thumb2ITBlock::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
index 500c7b5ef67ca..f1d8d171db6f8 100644
--- a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
+++ b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
@@ -157,7 +157,7 @@ namespace {
class Thumb2SizeReduce : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
const Thumb2InstrInfo *TII;
const ARMSubtarget *STI;
@@ -232,7 +232,7 @@ namespace {
std::function<bool(const Function &)> PredicateFtor;
};
- char Thumb2SizeReduce::ID = 0;
+ const char Thumb2SizeReduce::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/AVR/AVRAsmPrinter.cpp b/llvm/lib/Target/AVR/AVRAsmPrinter.cpp
index ad8f7d8018439..a0db72abf5ad2 100644
--- a/llvm/lib/Target/AVR/AVRAsmPrinter.cpp
+++ b/llvm/lib/Target/AVR/AVRAsmPrinter.cpp
@@ -71,7 +71,7 @@ class AVRAsmPrinter : public AsmPrinter {
void emitStartOfAsmFile(Module &M) override;
- static char ID;
+ static const char ID;
private:
const MCRegisterInfo &MRI;
@@ -331,7 +331,7 @@ void AVRAsmPrinter::emitStartOfAsmFile(Module &M) {
MCConstantExpr::create(SubTM->getIORegRAMPZ(), MMI->getContext()));
}
-char AVRAsmPrinter::ID = 0;
+const char AVRAsmPrinter::ID = 0;
INITIALIZE_PASS(AVRAsmPrinter, "avr-asm-printer", "AVR Assembly Printer", false,
false)
diff --git a/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp b/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
index 7717490b3e78d..4abb8e6342471 100644
--- a/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
@@ -32,7 +32,7 @@ namespace {
/// actual AVR instructions.
class AVRExpandPseudo : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
AVRExpandPseudo() : MachineFunctionPass(ID) {}
@@ -103,7 +103,7 @@ class AVRExpandPseudo : public MachineFunctionPass {
bool expandROLBRd(Block &MBB, BlockIt MBBI);
};
-char AVRExpandPseudo::ID = 0;
+const char AVRExpandPseudo::ID = 0;
bool AVRExpandPseudo::expandMBB(MachineBasicBlock &MBB) {
bool Modified = false;
diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
index b919be3d4466d..df6bc45069243 100644
--- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
@@ -430,7 +430,7 @@ void AVRFrameLowering::determineCalleeSaves(MachineFunction &MF,
/// Scans the function for allocas and used arguments
/// that are passed through the stack.
struct AVRFrameAnalyzer : public MachineFunctionPass {
- static char ID;
+ static const char ID;
AVRFrameAnalyzer() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -489,7 +489,7 @@ struct AVRFrameAnalyzer : public MachineFunctionPass {
StringRef getPassName() const override { return "AVR Frame Analyzer"; }
};
-char AVRFrameAnalyzer::ID = 0;
+const char AVRFrameAnalyzer::ID = 0;
/// Creates instance of the frame analyzer pass.
FunctionPass *createAVRFrameAnalyzerPass() { return new AVRFrameAnalyzer(); }
diff --git a/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp b/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
index 20d35340bd15a..bd7ac03d2cd6a 100644
--- a/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
@@ -60,7 +60,7 @@ class AVRDAGToDAGISel : public SelectionDAGISel {
class AVRDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
AVRDAGToDAGISelLegacy(AVRTargetMachine &TM, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
ID, std::make_unique<AVRDAGToDAGISel>(TM, OptLevel)) {}
@@ -68,7 +68,7 @@ class AVRDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
} // namespace
-char AVRDAGToDAGISelLegacy::ID = 0;
+const char AVRDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(AVRDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/AVR/AVRShiftExpand.cpp b/llvm/lib/Target/AVR/AVRShiftExpand.cpp
index 46103bd2b5ddc..4c16603b07cd1 100644
--- a/llvm/lib/Target/AVR/AVRShiftExpand.cpp
+++ b/llvm/lib/Target/AVR/AVRShiftExpand.cpp
@@ -24,7 +24,7 @@ namespace {
class AVRShiftExpand : public FunctionPass {
public:
- static char ID;
+ static const char ID;
AVRShiftExpand() : FunctionPass(ID) {}
@@ -38,7 +38,7 @@ class AVRShiftExpand : public FunctionPass {
} // end of anonymous namespace
-char AVRShiftExpand::ID = 0;
+const char AVRShiftExpand::ID = 0;
INITIALIZE_PASS(AVRShiftExpand, "avr-shift-expand", "AVR Shift Expansion",
false, false)
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
index abe081c0c76fd..db797eee98e1d 100644
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
@@ -242,7 +242,7 @@ void BPFAsmPrinter::emitJumpTableInfo() {
}
}
-char BPFAsmPrinter::ID = 0;
+const char BPFAsmPrinter::ID = 0;
INITIALIZE_PASS(BPFAsmPrinter, "bpf-asm-printer", "BPF Assembly Printer", false,
false)
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.h b/llvm/lib/Target/BPF/BPFAsmPrinter.h
index 75a1d7ed9f884..c23f2240d2611 100644
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.h
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.h
@@ -34,7 +34,7 @@ class BPFAsmPrinter : public AsmPrinter {
MCSymbol *getJTPublicSymbol(unsigned JTI);
void emitJumpTableInfo() override;
- static char ID;
+ static const char ID;
private:
BTFDebug *BTF;
diff --git a/llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp b/llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
index b12985d81fa75..062ed1ced220a 100644
--- a/llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
+++ b/llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
@@ -44,7 +44,7 @@ class BPFCheckAndAdjustIR final : public ModulePass {
bool runOnModule(Module &F) override;
public:
- static char ID;
+ static const char ID;
BPFCheckAndAdjustIR() : ModulePass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -59,7 +59,7 @@ class BPFCheckAndAdjustIR final : public ModulePass {
};
} // End anonymous namespace
-char BPFCheckAndAdjustIR::ID = 0;
+const char BPFCheckAndAdjustIR::ID = 0;
INITIALIZE_PASS(BPFCheckAndAdjustIR, DEBUG_TYPE, "BPF Check And Adjust IR",
false, false)
diff --git a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
index dadba52de4627..a6b13d2d3398a 100644
--- a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
+++ b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
@@ -91,13 +91,13 @@ class BPFDAGToDAGISel : public SelectionDAGISel {
class BPFDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
BPFDAGToDAGISelLegacy(BPFTargetMachine &TM)
: SelectionDAGISelLegacy(ID, std::make_unique<BPFDAGToDAGISel>(TM)) {}
};
} // namespace
-char BPFDAGToDAGISelLegacy::ID = 0;
+const char BPFDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(BPFDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/BPF/BPFMIChecking.cpp b/llvm/lib/Target/BPF/BPFMIChecking.cpp
index 5668e85377a2a..d8a518a46d2c3 100644
--- a/llvm/lib/Target/BPF/BPFMIChecking.cpp
+++ b/llvm/lib/Target/BPF/BPFMIChecking.cpp
@@ -28,7 +28,7 @@ namespace {
struct BPFMIPreEmitChecking : public MachineFunctionPass {
- static char ID;
+ static const char ID;
MachineFunction *MF;
const TargetRegisterInfo *TRI;
@@ -173,7 +173,7 @@ void BPFMIPreEmitChecking::processAtomicInsts() {
INITIALIZE_PASS(BPFMIPreEmitChecking, "bpf-mi-pemit-checking",
"BPF PreEmit Checking", false, false)
-char BPFMIPreEmitChecking::ID = 0;
+const char BPFMIPreEmitChecking::ID = 0;
FunctionPass *llvm::createBPFMIPreEmitCheckingPass() {
return new BPFMIPreEmitChecking();
}
diff --git a/llvm/lib/Target/BPF/BPFMIPeephole.cpp b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
index b8e4db78955f5..d9d4e6a42b11a 100644
--- a/llvm/lib/Target/BPF/BPFMIPeephole.cpp
+++ b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
@@ -46,7 +46,7 @@ namespace {
struct BPFMIPeephole : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const BPFInstrInfo *TII;
MachineFunction *MF;
MachineRegisterInfo *MRI;
@@ -296,7 +296,7 @@ INITIALIZE_PASS(BPFMIPeephole, DEBUG_TYPE,
"BPF MachineSSA Peephole Optimization For ZEXT Eliminate",
false, false)
-char BPFMIPeephole::ID = 0;
+const char BPFMIPeephole::ID = 0;
FunctionPass* llvm::createBPFMIPeepholePass() { return new BPFMIPeephole(); }
STATISTIC(RedundantMovElemNum, "Number of redundant moves eliminated");
@@ -305,7 +305,7 @@ namespace {
struct BPFMIPreEmitPeephole : public MachineFunctionPass {
- static char ID;
+ static const char ID;
MachineFunction *MF;
const TargetRegisterInfo *TRI;
const BPFInstrInfo *TII;
@@ -757,7 +757,7 @@ bool BPFMIPreEmitPeephole::addExitAfterUnreachable() {
INITIALIZE_PASS(BPFMIPreEmitPeephole, "bpf-mi-pemit-peephole",
"BPF PreEmit Peephole Optimization", false, false)
-char BPFMIPreEmitPeephole::ID = 0;
+const char BPFMIPreEmitPeephole::ID = 0;
FunctionPass* llvm::createBPFMIPreEmitPeepholePass()
{
return new BPFMIPreEmitPeephole();
diff --git a/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp b/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
index 9d6de2044b2b6..502ab01f402c3 100644
--- a/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
+++ b/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
@@ -46,7 +46,7 @@ namespace {
struct BPFMISimplifyPatchable : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const BPFInstrInfo *TII;
MachineFunction *MF;
@@ -370,7 +370,7 @@ bool BPFMISimplifyPatchable::removeLD() {
INITIALIZE_PASS(BPFMISimplifyPatchable, DEBUG_TYPE,
"BPF PreEmit SimplifyPatchable", false, false)
-char BPFMISimplifyPatchable::ID = 0;
+const char BPFMISimplifyPatchable::ID = 0;
FunctionPass *llvm::createBPFMISimplifyPatchablePass() {
return new BPFMISimplifyPatchable();
}
diff --git a/llvm/lib/Target/CSKY/CSKYConstantIslandPass.cpp b/llvm/lib/Target/CSKY/CSKYConstantIslandPass.cpp
index a2cf0a57675c7..cd50c8bba68f9 100644
--- a/llvm/lib/Target/CSKY/CSKYConstantIslandPass.cpp
+++ b/llvm/lib/Target/CSKY/CSKYConstantIslandPass.cpp
@@ -208,7 +208,7 @@ class CSKYConstantIslands : public MachineFunctionPass {
unsigned createPICLabelUId() { return PICLabelUId++; }
public:
- static char ID;
+ static const char ID;
CSKYConstantIslands() : MachineFunctionPass(ID) {}
@@ -258,7 +258,7 @@ class CSKYConstantIslands : public MachineFunctionPass {
};
} // end anonymous namespace
-char CSKYConstantIslands::ID = 0;
+const char CSKYConstantIslands::ID = 0;
bool CSKYConstantIslands::isOffsetInRange(unsigned UserOffset,
unsigned TrialOffset,
diff --git a/llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp b/llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp
index 22da80b3eddcc..f6e1580e2b8b7 100644
--- a/llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp
+++ b/llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp
@@ -55,7 +55,7 @@ class CSKYDAGToDAGISel : public SelectionDAGISel {
class CSKYDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit CSKYDAGToDAGISelLegacy(CSKYTargetMachine &TM,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -63,7 +63,7 @@ class CSKYDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
};
} // namespace
-char CSKYDAGToDAGISelLegacy::ID = 0;
+const char CSKYDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(CSKYDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/DirectX/DXContainerGlobals.cpp b/llvm/lib/Target/DirectX/DXContainerGlobals.cpp
index 95577dd668e1e..b2d5998ef8c70 100644
--- a/llvm/lib/Target/DirectX/DXContainerGlobals.cpp
+++ b/llvm/lib/Target/DirectX/DXContainerGlobals.cpp
@@ -50,7 +50,7 @@ class DXContainerGlobals : public llvm::ModulePass {
SmallVector<GlobalValue *> &Globals);
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
DXContainerGlobals() : ModulePass(ID) {}
StringRef getPassName() const override {
@@ -307,7 +307,7 @@ void DXContainerGlobals::addPipelineStateValidationInfo(
Globals.emplace_back(buildContainerGlobal(M, Constant, "dx.psv0", "PSV0"));
}
-char DXContainerGlobals::ID = 0;
+const char DXContainerGlobals::ID = 0;
INITIALIZE_PASS_BEGIN(DXContainerGlobals, "dxil-globals",
"DXContainer Global Emitter", false, true)
INITIALIZE_PASS_DEPENDENCY(ShaderFlagsAnalysisWrapper)
diff --git a/llvm/lib/Target/DirectX/DXILCBufferAccess.cpp b/llvm/lib/Target/DirectX/DXILCBufferAccess.cpp
index 56245321a522a..a3cf87206a590 100644
--- a/llvm/lib/Target/DirectX/DXILCBufferAccess.cpp
+++ b/llvm/lib/Target/DirectX/DXILCBufferAccess.cpp
@@ -79,9 +79,9 @@ class DXILCBufferAccessLegacy : public ModulePass {
StringRef getPassName() const override { return "DXIL CBuffer Access"; }
DXILCBufferAccessLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char DXILCBufferAccessLegacy::ID = 0;
+const char DXILCBufferAccessLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(DXILCBufferAccessLegacy, DEBUG_TYPE, "DXIL CBuffer Access",
diff --git a/llvm/lib/Target/DirectX/DXILDataScalarization.cpp b/llvm/lib/Target/DirectX/DXILDataScalarization.cpp
index 1e069e24e0ade..57cb0596b33cb 100644
--- a/llvm/lib/Target/DirectX/DXILDataScalarization.cpp
+++ b/llvm/lib/Target/DirectX/DXILDataScalarization.cpp
@@ -35,7 +35,7 @@ class DXILDataScalarizationLegacy : public ModulePass {
bool runOnModule(Module &M) override;
DXILDataScalarizationLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
static bool findAndReplaceVectors(Module &M);
@@ -462,7 +462,7 @@ bool DXILDataScalarizationLegacy::runOnModule(Module &M) {
return findAndReplaceVectors(M);
}
-char DXILDataScalarizationLegacy::ID = 0;
+const char DXILDataScalarizationLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILDataScalarizationLegacy, DEBUG_TYPE,
"DXIL Data Scalarization", false, false)
diff --git a/llvm/lib/Target/DirectX/DXILFinalizeLinkage.cpp b/llvm/lib/Target/DirectX/DXILFinalizeLinkage.cpp
index aa16e795dc768..084de55fd3d58 100644
--- a/llvm/lib/Target/DirectX/DXILFinalizeLinkage.cpp
+++ b/llvm/lib/Target/DirectX/DXILFinalizeLinkage.cpp
@@ -68,7 +68,7 @@ bool DXILFinalizeLinkageLegacy::runOnModule(Module &M) {
return finalizeLinkage(M);
}
-char DXILFinalizeLinkageLegacy::ID = 0;
+const char DXILFinalizeLinkageLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILFinalizeLinkageLegacy, DEBUG_TYPE,
"DXIL Finalize Linkage", false, false)
diff --git a/llvm/lib/Target/DirectX/DXILFinalizeLinkage.h b/llvm/lib/Target/DirectX/DXILFinalizeLinkage.h
index aab1bc3f7a28e..f33bc71e3920c 100644
--- a/llvm/lib/Target/DirectX/DXILFinalizeLinkage.h
+++ b/llvm/lib/Target/DirectX/DXILFinalizeLinkage.h
@@ -32,7 +32,7 @@ class DXILFinalizeLinkageLegacy : public ModulePass {
DXILFinalizeLinkageLegacy() : ModulePass(ID) {}
bool runOnModule(Module &M) override;
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
} // namespace llvm
diff --git a/llvm/lib/Target/DirectX/DXILFlattenArrays.cpp b/llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
index 7e1436e05a34a..b00632a77cbae 100644
--- a/llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
+++ b/llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
@@ -38,7 +38,7 @@ class DXILFlattenArraysLegacy : public ModulePass {
bool runOnModule(Module &M) override;
DXILFlattenArraysLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
struct GEPInfo {
@@ -503,7 +503,7 @@ bool DXILFlattenArraysLegacy::runOnModule(Module &M) {
return flattenArrays(M);
}
-char DXILFlattenArraysLegacy::ID = 0;
+const char DXILFlattenArraysLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILFlattenArraysLegacy, DEBUG_TYPE,
"DXIL Array Flattener", false, false)
diff --git a/llvm/lib/Target/DirectX/DXILForwardHandleAccesses.cpp b/llvm/lib/Target/DirectX/DXILForwardHandleAccesses.cpp
index 695eacbb2fadc..a9bdddd7b2a3d 100644
--- a/llvm/lib/Target/DirectX/DXILForwardHandleAccesses.cpp
+++ b/llvm/lib/Target/DirectX/DXILForwardHandleAccesses.cpp
@@ -203,9 +203,9 @@ class DXILForwardHandleAccessesLegacy : public FunctionPass {
DXILForwardHandleAccessesLegacy() : FunctionPass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char DXILForwardHandleAccessesLegacy::ID = 0;
+const char DXILForwardHandleAccessesLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(DXILForwardHandleAccessesLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp b/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
index b1723f77b0e69..76da90fda0138 100644
--- a/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
+++ b/llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp
@@ -40,7 +40,7 @@ class DXILIntrinsicExpansionLegacy : public ModulePass {
bool runOnModule(Module &M) override;
DXILIntrinsicExpansionLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
static bool resourceAccessNeeds64BitExpansion(Module *M, Type *OverloadTy,
@@ -1181,7 +1181,7 @@ bool DXILIntrinsicExpansionLegacy::runOnModule(Module &M) {
return expansionIntrinsics(M);
}
-char DXILIntrinsicExpansionLegacy::ID = 0;
+const char DXILIntrinsicExpansionLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILIntrinsicExpansionLegacy, DEBUG_TYPE,
"DXIL Intrinsic Expansion", false, false)
diff --git a/llvm/lib/Target/DirectX/DXILLegalizePass.cpp b/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
index 61b10574cb506..683efe6229e4e 100644
--- a/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
+++ b/llvm/lib/Target/DirectX/DXILLegalizePass.cpp
@@ -510,7 +510,7 @@ class DXILLegalizeLegacy : public FunctionPass {
bool runOnFunction(Function &F) override;
DXILLegalizeLegacy() : FunctionPass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
} // namespace
@@ -529,7 +529,7 @@ bool DXILLegalizeLegacy::runOnFunction(Function &F) {
return DXLegalize.runLegalizationPipeline(F);
}
-char DXILLegalizeLegacy::ID = 0;
+const char DXILLegalizeLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILLegalizeLegacy, DEBUG_TYPE, "DXIL Legalizer", false,
false)
diff --git a/llvm/lib/Target/DirectX/DXILMemIntrinsics.cpp b/llvm/lib/Target/DirectX/DXILMemIntrinsics.cpp
index fa8b7dae6c76a..98b398903a6c2 100644
--- a/llvm/lib/Target/DirectX/DXILMemIntrinsics.cpp
+++ b/llvm/lib/Target/DirectX/DXILMemIntrinsics.cpp
@@ -224,9 +224,9 @@ class DXILMemIntrinsicsLegacy : public ModulePass {
bool runOnModule(Module &M) override { return eliminateMemIntrinsics(M); }
DXILMemIntrinsicsLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char DXILMemIntrinsicsLegacy::ID = 0;
+const char DXILMemIntrinsicsLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILMemIntrinsicsLegacy, DEBUG_TYPE,
"DXIL Memory Intrinsic Elimination", false, false)
diff --git a/llvm/lib/Target/DirectX/DXILOpLowering.cpp b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
index 0c0830cc92aa7..0c8dd8c419ac1 100644
--- a/llvm/lib/Target/DirectX/DXILOpLowering.cpp
+++ b/llvm/lib/Target/DirectX/DXILOpLowering.cpp
@@ -1051,7 +1051,7 @@ class DXILOpLoweringLegacy : public ModulePass {
StringRef getPassName() const override { return "DXIL Op Lowering"; }
DXILOpLoweringLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.addRequired<DXILResourceTypeWrapperPass>();
AU.addRequired<DXILResourceWrapperPass>();
@@ -1062,7 +1062,7 @@ class DXILOpLoweringLegacy : public ModulePass {
AU.addPreserved<RootSignatureAnalysisWrapper>();
}
};
-char DXILOpLoweringLegacy::ID = 0;
+const char DXILOpLoweringLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(DXILOpLoweringLegacy, DEBUG_TYPE, "DXIL Op Lowering",
diff --git a/llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp b/llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp
index 6e95a4232fabe..9d225d1ec0855 100644
--- a/llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp
+++ b/llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp
@@ -363,7 +363,7 @@ class DXILPostOptimizationValidationLegacy : public ModulePass {
}
DXILPostOptimizationValidationLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.addRequired<DXILResourceWrapperPass>();
AU.addRequired<DXILResourceBindingWrapperPass>();
@@ -377,7 +377,7 @@ class DXILPostOptimizationValidationLegacy : public ModulePass {
AU.addPreserved<RootSignatureAnalysisWrapper>();
}
};
-char DXILPostOptimizationValidationLegacy::ID = 0;
+const char DXILPostOptimizationValidationLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(DXILPostOptimizationValidationLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/DirectX/DXILPrepare.cpp b/llvm/lib/Target/DirectX/DXILPrepare.cpp
index d6fa65fe54b50..906efdf09f1b1 100644
--- a/llvm/lib/Target/DirectX/DXILPrepare.cpp
+++ b/llvm/lib/Target/DirectX/DXILPrepare.cpp
@@ -258,9 +258,9 @@ class DXILPrepareModule : public ModulePass {
AU.addPreserved<RootSignatureAnalysisWrapper>();
AU.addPreserved<ShaderFlagsAnalysisWrapper>();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char DXILPrepareModule::ID = 0;
+const char DXILPrepareModule::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
index 9da3bdb8d59b2..8a019a263bf72 100644
--- a/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
+++ b/llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
@@ -264,7 +264,7 @@ class DXILPrettyPrinterLegacy : public llvm::ModulePass {
raw_ostream &OS; // raw_ostream to print to.
public:
- static char ID;
+ static const char ID;
explicit DXILPrettyPrinterLegacy(raw_ostream &O) : ModulePass(ID), OS(O) {}
@@ -281,7 +281,7 @@ class DXILPrettyPrinterLegacy : public llvm::ModulePass {
};
} // namespace
-char DXILPrettyPrinterLegacy::ID = 0;
+const char DXILPrettyPrinterLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(DXILPrettyPrinterLegacy, "dxil-pretty-printer",
"DXIL Metadata Pretty Printer", true, true)
INITIALIZE_PASS_DEPENDENCY(DXILResourceTypeWrapperPass)
diff --git a/llvm/lib/Target/DirectX/DXILResourceAccess.cpp b/llvm/lib/Target/DirectX/DXILResourceAccess.cpp
index 3d75d7455101f..aefda46205512 100644
--- a/llvm/lib/Target/DirectX/DXILResourceAccess.cpp
+++ b/llvm/lib/Target/DirectX/DXILResourceAccess.cpp
@@ -616,13 +616,13 @@ class DXILResourceAccessLegacy : public FunctionPass {
StringRef getPassName() const override { return "DXIL Resource Access"; }
DXILResourceAccessLegacy() : FunctionPass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.addRequired<DXILResourceTypeWrapperPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
}
};
-char DXILResourceAccessLegacy::ID = 0;
+const char DXILResourceAccessLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(DXILResourceAccessLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/DirectX/DXILResourceImplicitBinding.cpp b/llvm/lib/Target/DirectX/DXILResourceImplicitBinding.cpp
index b0d9ad8da10e9..74a70c95648e4 100644
--- a/llvm/lib/Target/DirectX/DXILResourceImplicitBinding.cpp
+++ b/llvm/lib/Target/DirectX/DXILResourceImplicitBinding.cpp
@@ -165,7 +165,7 @@ class DXILResourceImplicitBindingLegacy : public ModulePass {
return false;
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.addRequired<DXILResourceTypeWrapperPass>();
AU.addRequired<DXILResourceBindingWrapperPass>();
@@ -174,7 +174,7 @@ class DXILResourceImplicitBindingLegacy : public ModulePass {
}
};
-char DXILResourceImplicitBindingLegacy::ID = 0;
+const char DXILResourceImplicitBindingLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(DXILResourceImplicitBindingLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/DirectX/DXILRootSignature.cpp b/llvm/lib/Target/DirectX/DXILRootSignature.cpp
index ac3c7dde6b892..04f8d1dafa0fa 100644
--- a/llvm/lib/Target/DirectX/DXILRootSignature.cpp
+++ b/llvm/lib/Target/DirectX/DXILRootSignature.cpp
@@ -249,7 +249,7 @@ void RootSignatureAnalysisWrapper::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<DXILMetadataAnalysisWrapperPass>();
}
-char RootSignatureAnalysisWrapper::ID = 0;
+const char RootSignatureAnalysisWrapper::ID = 0;
INITIALIZE_PASS_BEGIN(RootSignatureAnalysisWrapper,
"dxil-root-signature-analysis",
diff --git a/llvm/lib/Target/DirectX/DXILRootSignature.h b/llvm/lib/Target/DirectX/DXILRootSignature.h
index ec82aa93dd07c..a20f9bc3f36a8 100644
--- a/llvm/lib/Target/DirectX/DXILRootSignature.h
+++ b/llvm/lib/Target/DirectX/DXILRootSignature.h
@@ -71,7 +71,7 @@ class RootSignatureAnalysisWrapper : public ModulePass {
std::unique_ptr<RootSignatureBindingInfo> FuncToRsMap;
public:
- static char ID;
+ static const char ID;
RootSignatureAnalysisWrapper() : ModulePass(ID) {}
RootSignatureBindingInfo &getRSInfo() { return *FuncToRsMap; }
diff --git a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
index 54cf56f92277b..0713511fab0c0 100644
--- a/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
+++ b/llvm/lib/Target/DirectX/DXILShaderFlags.cpp
@@ -449,7 +449,7 @@ void ShaderFlagsAnalysisWrapper::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DXILMetadataAnalysisWrapperPass>();
}
-char ShaderFlagsAnalysisWrapper::ID = 0;
+const char ShaderFlagsAnalysisWrapper::ID = 0;
INITIALIZE_PASS_BEGIN(ShaderFlagsAnalysisWrapper, "dx-shader-flag-analysis",
"DXIL Shader Flag Analysis", true, true)
diff --git a/llvm/lib/Target/DirectX/DXILShaderFlags.h b/llvm/lib/Target/DirectX/DXILShaderFlags.h
index a0820572e5fed..524de4e4ce0e8 100644
--- a/llvm/lib/Target/DirectX/DXILShaderFlags.h
+++ b/llvm/lib/Target/DirectX/DXILShaderFlags.h
@@ -137,7 +137,7 @@ class ShaderFlagsAnalysisWrapper : public ModulePass {
ModuleShaderFlags MSFI;
public:
- static char ID;
+ static const char ID;
ShaderFlagsAnalysisWrapper() : ModulePass(ID) {}
diff --git a/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp b/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp
index e1a472fe57642..99b8b8c915a03 100644
--- a/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp
+++ b/llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp
@@ -631,7 +631,7 @@ bool DXILTranslateMetadataLegacy::runOnModule(Module &M) {
return true;
}
-char DXILTranslateMetadataLegacy::ID = 0;
+const char DXILTranslateMetadataLegacy::ID = 0;
ModulePass *llvm::createDXILTranslateMetadataLegacyPass() {
return new DXILTranslateMetadataLegacy();
diff --git a/llvm/lib/Target/DirectX/DXILTranslateMetadata.h b/llvm/lib/Target/DirectX/DXILTranslateMetadata.h
index cfb8aaa8f98b5..0ba41a1ed6a41 100644
--- a/llvm/lib/Target/DirectX/DXILTranslateMetadata.h
+++ b/llvm/lib/Target/DirectX/DXILTranslateMetadata.h
@@ -27,7 +27,7 @@ class DXILTranslateMetadata : public PassInfoMixin<DXILTranslateMetadata> {
/// passes which run through the legacy pass manager.
class DXILTranslateMetadataLegacy : public ModulePass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit DXILTranslateMetadataLegacy() : ModulePass(ID) {}
StringRef getPassName() const override { return "DXIL Translate Metadata"; }
diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
index 725f2b1e7c76c..79ca086950014 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
@@ -37,7 +37,7 @@ class WriteDXILPass : public llvm::ModulePass {
raw_ostream &OS; // raw_ostream to print on
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WriteDXILPass() : ModulePass(ID), OS(dbgs()) {
initializeWriteDXILPassPass(*PassRegistry::getPassRegistry());
}
@@ -138,7 +138,7 @@ static void removeLifetimeIntrinsics(Module &M) {
class EmbedDXILPass : public llvm::ModulePass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
EmbedDXILPass() : ModulePass(ID) {
initializeEmbedDXILPassPass(*PassRegistry::getPassRegistry());
}
@@ -177,7 +177,7 @@ class EmbedDXILPass : public llvm::ModulePass {
};
} // namespace
-char WriteDXILPass::ID = 0;
+const char WriteDXILPass::ID = 0;
INITIALIZE_PASS_BEGIN(WriteDXILPass, "dxil-write-bitcode", "Write Bitcode",
false, true)
INITIALIZE_PASS_DEPENDENCY(ModuleSummaryIndexWrapperPass)
@@ -188,7 +188,7 @@ ModulePass *llvm::createDXILWriterPass(raw_ostream &Str) {
return new WriteDXILPass(Str);
}
-char EmbedDXILPass::ID = 0;
+const char EmbedDXILPass::ID = 0;
INITIALIZE_PASS(EmbedDXILPass, "dxil-embed", "Embed DXIL", false, true)
ModulePass *llvm::createDXILEmbedderPass() { return new EmbedDXILPass(); }
diff --git a/llvm/lib/Target/Hexagon/Hexagon.h b/llvm/lib/Target/Hexagon/Hexagon.h
index 422ab20891b94..6c64d0da2b07f 100644
--- a/llvm/lib/Target/Hexagon/Hexagon.h
+++ b/llvm/lib/Target/Hexagon/Hexagon.h
@@ -23,9 +23,9 @@ class PassRegistry;
class FunctionPass;
class Pass;
-extern char &HexagonCopyHoistingID;
-extern char &HexagonExpandCondsetsID;
-extern char &HexagonTfrCleanupID;
+extern const char &HexagonCopyHoistingID;
+extern const char &HexagonExpandCondsetsID;
+extern const char &HexagonTfrCleanupID;
void initializeHexagonAsmPrinterPass(PassRegistry &);
void initializeHexagonBitSimplifyPass(PassRegistry &);
void initializeHexagonBranchRelaxationPass(PassRegistry &);
diff --git a/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp b/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
index f22852d1ef557..f42382213ac99 100644
--- a/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
@@ -854,7 +854,7 @@ void HexagonAsmPrinter::LowerPATCHABLE_TAIL_CALL(const MachineInstr &MI) {
EmitSled(MI, SledKind::TAIL_CALL);
}
-char HexagonAsmPrinter::ID = 0;
+const char HexagonAsmPrinter::ID = 0;
INITIALIZE_PASS(HexagonAsmPrinter, "hexagon-asm-printer",
"Hexagon Assembly Printer", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h b/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h
index 8e34d2bf9209b..d3fa7bcfe7d0b 100644
--- a/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h
+++ b/llvm/lib/Target/Hexagon/HexagonAsmPrinter.h
@@ -28,7 +28,7 @@ class TargetMachine;
class HexagonAsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
const HexagonSubtarget *Subtarget = nullptr;
diff --git a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp
index 2e48fe64d15ae..46f1db7b24c42 100644
--- a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp
@@ -187,7 +187,7 @@ namespace {
class HexagonBitSimplify : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonBitSimplify() : MachineFunctionPass(ID) {}
@@ -258,7 +258,7 @@ namespace {
} // end anonymous namespace
-char HexagonBitSimplify::ID = 0;
+const char HexagonBitSimplify::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonBitSimplify, "hexagon-bit-simplify",
"Hexagon bit simplification", false, false)
@@ -2893,7 +2893,7 @@ namespace {
class HexagonLoopRescheduling : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonLoopRescheduling() : MachineFunctionPass(ID) {}
@@ -2938,7 +2938,7 @@ namespace {
} // end anonymous namespace
-char HexagonLoopRescheduling::ID = 0;
+const char HexagonLoopRescheduling::ID = 0;
INITIALIZE_PASS(HexagonLoopRescheduling, "hexagon-loop-resched-pass",
"Hexagon Loop Rescheduling", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp b/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
index 4246603a0b929..5e88034470f5f 100644
--- a/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
@@ -41,7 +41,7 @@ namespace {
struct HexagonBranchRelaxation : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonBranchRelaxation() : MachineFunctionPass(ID) {}
@@ -69,7 +69,7 @@ namespace {
DenseMap<MachineBasicBlock*, unsigned> &BlockToInstOffset);
};
- char HexagonBranchRelaxation::ID = 0;
+ const char HexagonBranchRelaxation::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
index 75f2e1b5605d3..1de96299ae326 100644
--- a/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp
@@ -32,7 +32,7 @@ class HexagonCFGOptimizer : public MachineFunctionPass {
bool isOnFallThroughPath(MachineBasicBlock *MBB);
public:
- static char ID;
+ static const char ID;
HexagonCFGOptimizer() : MachineFunctionPass(ID) {}
@@ -46,7 +46,7 @@ class HexagonCFGOptimizer : public MachineFunctionPass {
} // end anonymous namespace
-char HexagonCFGOptimizer::ID = 0;
+const char HexagonCFGOptimizer::ID = 0;
static bool IsConditionalBranch(int Opc) {
switch (Opc) {
diff --git a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
index 9087f9dd82071..3a01ca8780679 100644
--- a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
@@ -91,7 +91,7 @@ namespace {
class HexagonCommonGEP : public FunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonCommonGEP() : FunctionPass(ID) {}
@@ -154,7 +154,7 @@ namespace {
} // end anonymous namespace
-char HexagonCommonGEP::ID = 0;
+const char HexagonCommonGEP::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonCommonGEP, "hcommgep", "Hexagon Common GEP",
false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
index a3296e0796412..c57682cc5c175 100644
--- a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
@@ -205,7 +205,7 @@ namespace {
};
struct HexagonConstExtenders : public MachineFunctionPass {
- static char ID;
+ static const char ID;
HexagonConstExtenders() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -562,7 +562,7 @@ INITIALIZE_PASS_END(HexagonConstExtenders, "hexagon-cext-opt",
static unsigned ReplaceCounter = 0;
-char HCE::ID = 0;
+const char HCE::ID = 0;
#ifndef NDEBUG
LLVM_DUMP_METHOD void RangeTree::dump() const {
diff --git a/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp b/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp
index 1c887667f8858..2e1eb50dbefa3 100644
--- a/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp
@@ -1886,7 +1886,7 @@ namespace {
class HexagonConstPropagation : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonConstPropagation() : MachineFunctionPass(ID) {}
@@ -1906,7 +1906,7 @@ namespace {
} // end anonymous namespace
-char HexagonConstPropagation::ID = 0;
+const char HexagonConstPropagation::ID = 0;
INITIALIZE_PASS(HexagonConstPropagation, "hexagon-constp",
"Hexagon Constant Propagation", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonCopyHoisting.cpp b/llvm/lib/Target/Hexagon/HexagonCopyHoisting.cpp
index 79863e1c3cb74..5b7b141efdd2f 100644
--- a/llvm/lib/Target/Hexagon/HexagonCopyHoisting.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCopyHoisting.cpp
@@ -33,7 +33,7 @@ namespace {
class HexagonCopyHoisting : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonCopyHoisting() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "Hexagon Copy Hoisting"; }
@@ -64,10 +64,10 @@ class HexagonCopyHoisting : public MachineFunctionPass {
} // namespace
-char HexagonCopyHoisting::ID = 0;
+const char HexagonCopyHoisting::ID = 0;
namespace llvm {
-char &HexagonCopyHoistingID = HexagonCopyHoisting::ID;
+const char &HexagonCopyHoistingID = HexagonCopyHoisting::ID;
} // namespace llvm
bool HexagonCopyHoisting::runOnMachineFunction(MachineFunction &Fn) {
diff --git a/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp b/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp
index 1dabcf32fa8e8..ef84114daeb7c 100644
--- a/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp
@@ -60,7 +60,7 @@ class HexagonCopyToCombine : public MachineFunctionPass {
SmallVector<MachineInstr *, 8> DbgMItoMove;
public:
- static char ID;
+ static const char ID;
HexagonCopyToCombine() : MachineFunctionPass(ID) {}
@@ -110,7 +110,7 @@ class HexagonCopyToCombine : public MachineFunctionPass {
} // End anonymous namespace.
-char HexagonCopyToCombine::ID = 0;
+const char HexagonCopyToCombine::ID = 0;
INITIALIZE_PASS(HexagonCopyToCombine, "hexagon-copy-combine",
"Hexagon Copy-To-Combine Pass", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp b/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp
index 6ff384cc26052..3eadeaa593280 100644
--- a/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp
@@ -144,7 +144,7 @@ namespace {
class HexagonEarlyIfConversion : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonEarlyIfConversion() : MachineFunctionPass(ID) {}
@@ -214,7 +214,7 @@ namespace {
} // end anonymous namespace
-char HexagonEarlyIfConversion::ID = 0;
+const char HexagonEarlyIfConversion::ID = 0;
INITIALIZE_PASS(HexagonEarlyIfConversion, "hexagon-early-if",
"Hexagon early if conversion", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
index fe1d714c76d97..18c972591eaa7 100644
--- a/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
@@ -133,7 +133,7 @@ namespace {
class HexagonExpandCondsets : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonExpandCondsets() : MachineFunctionPass(ID) {
if (OptCoaLimit.getPosition())
@@ -237,8 +237,8 @@ namespace {
} // end anonymous namespace
-char HexagonExpandCondsets::ID = 0;
-char &llvm::HexagonExpandCondsetsID = HexagonExpandCondsets::ID;
+const char HexagonExpandCondsets::ID = 0;
+const char &llvm::HexagonExpandCondsetsID = HexagonExpandCondsets::ID;
INITIALIZE_PASS_BEGIN(HexagonExpandCondsets, "expand-condsets",
"Hexagon Expand Condsets", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp b/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp
index 882a44a07b34c..10acbdf247f52 100644
--- a/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp
@@ -31,7 +31,7 @@ static cl::opt<unsigned> MaxLoopRange(
namespace {
struct HexagonFixupHwLoops : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonFixupHwLoops() : MachineFunctionPass(ID) {}
@@ -62,7 +62,7 @@ namespace {
MachineBasicBlock::iterator &MII);
};
- char HexagonFixupHwLoops::ID = 0;
+ const char HexagonFixupHwLoops::ID = 0;
}
INITIALIZE_PASS(HexagonFixupHwLoops, "hwloopsfixup",
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index df612262def5e..29e8d79fef31a 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -200,7 +200,7 @@ namespace {
class HexagonCallFrameInformation : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonCallFrameInformation() : MachineFunctionPass(ID) {}
@@ -211,7 +211,7 @@ namespace {
}
};
- char HexagonCallFrameInformation::ID = 0;
+ const char HexagonCallFrameInformation::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp b/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp
index 1322c627ecfb7..1e4d7869b2347 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp
@@ -48,7 +48,7 @@ namespace {
class HexagonGenExtract : public FunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonGenExtract() : FunctionPass(ID) {}
@@ -74,7 +74,7 @@ namespace {
} // end anonymous namespace
-char HexagonGenExtract::ID = 0;
+const char HexagonGenExtract::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonGenExtract, "hextract", "Hexagon generate "
"\"extract\" instructions", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp
index e5f8cab15cd75..1294263054e00 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp
@@ -496,7 +496,7 @@ namespace {
class HexagonGenInsert : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonGenInsert() : MachineFunctionPass(ID) {}
@@ -569,7 +569,7 @@ namespace {
} // end anonymous namespace
-char HexagonGenInsert::ID = 0;
+const char HexagonGenInsert::ID = 0;
void HexagonGenInsert::dump_map() const {
for (const auto &I : IFMap) {
diff --git a/llvm/lib/Target/Hexagon/HexagonGenMemAbsolute.cpp b/llvm/lib/Target/Hexagon/HexagonGenMemAbsolute.cpp
index 3fd34c6daad94..458b0a224d825 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenMemAbsolute.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenMemAbsolute.cpp
@@ -39,7 +39,7 @@ class HexagonGenMemAbsolute : public MachineFunctionPass {
const TargetRegisterInfo *TRI = nullptr;
public:
- static char ID;
+ static const char ID;
HexagonGenMemAbsolute() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -60,7 +60,7 @@ class HexagonGenMemAbsolute : public MachineFunctionPass {
};
} // namespace
-char HexagonGenMemAbsolute::ID = 0;
+const char HexagonGenMemAbsolute::ID = 0;
INITIALIZE_PASS(HexagonGenMemAbsolute, "hexagon-gen-load-absolute",
"Hexagon Generate Load/Store Set Absolute Address Instruction",
diff --git a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
index c6fffde84af58..33fdc8951ec87 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
@@ -57,7 +57,7 @@ namespace {
class HexagonGenMux : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonGenMux() : MachineFunctionPass(ID) {}
@@ -129,7 +129,7 @@ namespace {
} // end anonymous namespace
-char HexagonGenMux::ID = 0;
+const char HexagonGenMux::ID = 0;
INITIALIZE_PASS(HexagonGenMux, "hexagon-gen-mux",
"Hexagon generate mux instructions", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp b/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp
index db72ae58c2966..c68349f1db7bd 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp
@@ -58,7 +58,7 @@ raw_ostream &operator<<(raw_ostream &OS, const PrintRegister &PR) {
class HexagonGenPredicate : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonGenPredicate() : MachineFunctionPass(ID) {}
@@ -100,7 +100,7 @@ raw_ostream &operator<<(raw_ostream &OS, const PrintRegister &PR) {
} // end anonymous namespace
-char HexagonGenPredicate::ID = 0;
+const char HexagonGenPredicate::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonGenPredicate, "hexagon-gen-pred-pass",
"Hexagon generate predicate operations", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp b/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
index bc6b73645b94f..03f001dd8a951 100644
--- a/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
@@ -102,7 +102,7 @@ namespace {
#endif
public:
- static char ID;
+ static const char ID;
HexagonHardwareLoops() : MachineFunctionPass(ID) {}
@@ -295,7 +295,7 @@ namespace {
MachineBasicBlock *createPreheaderForLoop(MachineLoop *L);
};
- char HexagonHardwareLoops::ID = 0;
+ const char HexagonHardwareLoops::ID = 0;
#ifndef NDEBUG
int HexagonHardwareLoops::Counter = 0;
#endif
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
index 017a4fe85002e..95f43e2a00ace 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
@@ -69,7 +69,7 @@ HexagonDAGToDAGISelLegacy::HexagonDAGToDAGISelLegacy(HexagonTargetMachine &tm,
: SelectionDAGISelLegacy(
ID, std::make_unique<HexagonDAGToDAGISel>(tm, OptLevel)) {}
-char HexagonDAGToDAGISelLegacy::ID = 0;
+const char HexagonDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(HexagonDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h
index 2d23aeecda6d8..c7508edcdad9a 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h
+++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h
@@ -164,7 +164,7 @@ class HexagonDAGToDAGISel : public SelectionDAGISel {
class HexagonDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit HexagonDAGToDAGISelLegacy(HexagonTargetMachine &tm,
CodeGenOptLevel OptLevel);
};
diff --git a/llvm/lib/Target/Hexagon/HexagonLoadStoreWidening.cpp b/llvm/lib/Target/Hexagon/HexagonLoadStoreWidening.cpp
index 54969b2317ef4..a3318d8a53b80 100644
--- a/llvm/lib/Target/Hexagon/HexagonLoadStoreWidening.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonLoadStoreWidening.cpp
@@ -124,7 +124,7 @@ struct HexagonLoadStoreWidening {
};
struct HexagonStoreWidening : public MachineFunctionPass {
- static char ID;
+ static const char ID;
HexagonStoreWidening() : MachineFunctionPass(ID) {}
@@ -151,7 +151,7 @@ struct HexagonStoreWidening : public MachineFunctionPass {
};
struct HexagonLoadWidening : public MachineFunctionPass {
- static char ID;
+ static const char ID;
HexagonLoadWidening() : MachineFunctionPass(ID) {}
@@ -176,8 +176,8 @@ struct HexagonLoadWidening : public MachineFunctionPass {
}
};
-char HexagonStoreWidening::ID = 0;
-char HexagonLoadWidening::ID = 0;
+const char HexagonStoreWidening::ID = 0;
+const char HexagonLoadWidening::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp b/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp
index bcd51fcd611c3..c951f1d2475b4 100644
--- a/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonLoopAlign.cpp
@@ -60,7 +60,7 @@ class HexagonLoopAlign : public MachineFunctionPass {
const HexagonInstrInfo *HII = nullptr;
public:
- static char ID;
+ static const char ID;
HexagonLoopAlign() : MachineFunctionPass(ID) {}
bool shouldBalignLoop(MachineBasicBlock &BB, bool AboveThres);
bool isSingleLoop(MachineBasicBlock &MBB);
@@ -76,7 +76,7 @@ class HexagonLoopAlign : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
};
-char HexagonLoopAlign::ID = 0;
+const char HexagonLoopAlign::ID = 0;
bool HexagonLoopAlign::shouldBalignLoop(MachineBasicBlock &BB,
bool AboveThres) {
diff --git a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
index a55f7970ba2e1..3442fa49b5a05 100644
--- a/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
@@ -138,7 +138,7 @@ class HexagonLoopIdiomRecognize {
class HexagonLoopIdiomRecognizeLegacyPass : public LoopPass {
public:
- static char ID;
+ static const char ID;
explicit HexagonLoopIdiomRecognizeLegacyPass() : LoopPass(ID) {}
@@ -255,7 +255,7 @@ struct Simplifier {
} // end anonymous namespace
-char HexagonLoopIdiomRecognizeLegacyPass::ID = 0;
+const char HexagonLoopIdiomRecognizeLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonLoopIdiomRecognizeLegacyPass, "hexagon-loop-idiom",
"Recognize Hexagon-specific loop idioms", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonMask.cpp b/llvm/lib/Target/Hexagon/HexagonMask.cpp
index 9d7776d2d96f8..2b237b3d2d9ed 100644
--- a/llvm/lib/Target/Hexagon/HexagonMask.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonMask.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
class HexagonMask : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonMask() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -40,7 +40,7 @@ class HexagonMask : public MachineFunctionPass {
};
} // end anonymous namespace
-char HexagonMask::ID = 0;
+const char HexagonMask::ID = 0;
void HexagonMask::replaceConstExtTransferImmWithMask(MachineFunction &MF) {
for (auto &MBB : MF) {
diff --git a/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp b/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp
index 5a1d5bc669169..9d991240f93cf 100644
--- a/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp
@@ -66,7 +66,7 @@ static cl::opt<bool> DisableNewValueJumps("disable-nvjump", cl::Hidden,
namespace {
struct HexagonNewValueJump : public MachineFunctionPass {
- static char ID;
+ static const char ID;
HexagonNewValueJump() : MachineFunctionPass(ID) {}
@@ -95,7 +95,7 @@ namespace {
} // end anonymous namespace
-char HexagonNewValueJump::ID = 0;
+const char HexagonNewValueJump::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonNewValueJump, "hexagon-nvj",
"Hexagon NewValueJump", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp b/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
index f266678071b5b..94e43c93a64c4 100644
--- a/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
@@ -54,7 +54,7 @@ namespace {
class HexagonOptAddrMode : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonOptAddrMode() : MachineFunctionPass(ID) {}
@@ -123,7 +123,7 @@ class HexagonOptAddrMode : public MachineFunctionPass {
} // end anonymous namespace
-char HexagonOptAddrMode::ID = 0;
+const char HexagonOptAddrMode::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonOptAddrMode, "amode-opt",
"Optimize addressing mode", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp b/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
index 889e2642847c6..97c23e530d4b3 100644
--- a/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
struct HexagonOptimizeSZextends : public FunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonOptimizeSZextends() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
@@ -41,7 +41,7 @@ namespace {
};
}
-char HexagonOptimizeSZextends::ID = 0;
+const char HexagonOptimizeSZextends::ID = 0;
INITIALIZE_PASS(HexagonOptimizeSZextends, "reargs",
"Remove Sign and Zero Extends for Args", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonPeephole.cpp b/llvm/lib/Target/Hexagon/HexagonPeephole.cpp
index 67f5589137bbd..b8899ce793ae9 100644
--- a/llvm/lib/Target/Hexagon/HexagonPeephole.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonPeephole.cpp
@@ -75,7 +75,7 @@ namespace {
const MachineRegisterInfo *MRI;
public:
- static char ID;
+ static const char ID;
HexagonPeephole() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -90,7 +90,7 @@ namespace {
};
}
-char HexagonPeephole::ID = 0;
+const char HexagonPeephole::ID = 0;
INITIALIZE_PASS(HexagonPeephole, "hexagon-peephole", "Hexagon Peephole",
false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp b/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp
index dbc8a05496ac0..9a9c26e37b6e2 100644
--- a/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonQFPOptimizer.cpp
@@ -115,7 +115,7 @@ const std::map<unsigned short, unsigned short> QFPInstMap{
namespace {
struct HexagonQFPOptimizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonQFPOptimizer() : MachineFunctionPass(ID) {}
@@ -140,7 +140,7 @@ struct HexagonQFPOptimizer : public MachineFunctionPass {
const MachineRegisterInfo *MRI = nullptr;
};
-char HexagonQFPOptimizer::ID = 0;
+const char HexagonQFPOptimizer::ID = 0;
} // namespace
INITIALIZE_PASS(HexagonQFPOptimizer, "hexagon-qfp-optimizer",
diff --git a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
index 9e8ab8392e3af..904a5a5cc1ce0 100644
--- a/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
@@ -72,7 +72,7 @@ namespace {
return MachineFunctionProperties().setNoVRegs();
}
- static char ID;
+ static const char ID;
private:
MachineDominatorTree *MDT;
@@ -97,7 +97,7 @@ struct HexagonDCE : public DeadCodeElimination {
} // end anonymous namespace
-char HexagonRDFOpt::ID = 0;
+const char HexagonRDFOpt::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonRDFOpt, "hexagon-rdf-opt",
"Hexagon RDF optimizations", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp b/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp
index 9e3b0133c052b..cd36d8ea6a7de 100644
--- a/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp
@@ -33,7 +33,7 @@ using namespace llvm;
namespace {
class HexagonSplitConst32AndConst64 : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonSplitConst32AndConst64() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
return "Hexagon Split Const32s and Const64s";
@@ -45,7 +45,7 @@ namespace {
};
}
-char HexagonSplitConst32AndConst64::ID = 0;
+const char HexagonSplitConst32AndConst64::ID = 0;
INITIALIZE_PASS(HexagonSplitConst32AndConst64, "split-const-for-sdata",
"Hexagon Split Const32s and Const64s", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
index 6a901013106d8..94ff9cb10eed4 100644
--- a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
@@ -56,7 +56,7 @@ namespace {
class HexagonSplitDoubleRegs : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonSplitDoubleRegs() : MachineFunctionPass(ID) {}
@@ -118,7 +118,7 @@ namespace {
} // end anonymous namespace
-char HexagonSplitDoubleRegs::ID;
+const char HexagonSplitDoubleRegs::ID = 0;
int HexagonSplitDoubleRegs::Counter = 0;
const TargetRegisterClass *const HexagonSplitDoubleRegs::DoubleRC =
&Hexagon::DoubleRegsRegClass;
diff --git a/llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp b/llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp
index 5a85f348fdaf7..8dfefd7a259e6 100644
--- a/llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonTfrCleanup.cpp
@@ -42,7 +42,7 @@ using namespace llvm;
namespace {
class HexagonTfrCleanup : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonTfrCleanup() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "Hexagon TFR Cleanup"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -66,10 +66,10 @@ class HexagonTfrCleanup : public MachineFunctionPass {
};
} // namespace
-char HexagonTfrCleanup::ID = 0;
+const char HexagonTfrCleanup::ID = 0;
namespace llvm {
-char &HexagonTfrCleanupID = HexagonTfrCleanup::ID;
+const char &HexagonTfrCleanupID = HexagonTfrCleanup::ID;
}
bool HexagonTfrCleanup::isIntReg(unsigned Reg, bool &Is32) {
diff --git a/llvm/lib/Target/Hexagon/HexagonVExtract.cpp b/llvm/lib/Target/Hexagon/HexagonVExtract.cpp
index 3b3d25d4c22c5..8ba1e946a212d 100644
--- a/llvm/lib/Target/Hexagon/HexagonVExtract.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVExtract.cpp
@@ -34,7 +34,7 @@ static cl::opt<unsigned> VExtractThreshold(
namespace {
class HexagonVExtract : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonVExtract() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -53,7 +53,7 @@ namespace {
MachineRegisterInfo &MRI);
};
- char HexagonVExtract::ID = 0;
+ const char HexagonVExtract::ID = 0;
}
INITIALIZE_PASS(HexagonVExtract, "hexagon-vextract",
diff --git a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
index d39b79a86753a..b6d2b5b22cbd0 100644
--- a/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
@@ -81,7 +81,7 @@ namespace {
class HexagonPacketizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonPacketizer(bool Min = false)
: MachineFunctionPass(ID), Minimal(Min) {}
@@ -112,7 +112,7 @@ namespace {
} // end anonymous namespace
-char HexagonPacketizer::ID = 0;
+const char HexagonPacketizer::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonPacketizer, "hexagon-packetizer",
"Hexagon Packetizer", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index 93cb628becc6e..113774a555504 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -4056,7 +4056,7 @@ auto HexagonVectorCombine::getElementRange(IRBuilderBase &Builder, Value *Lo,
namespace {
class HexagonVectorCombineLegacy : public FunctionPass {
public:
- static char ID;
+ static const char ID;
HexagonVectorCombineLegacy() : FunctionPass(ID) {}
@@ -4090,7 +4090,7 @@ class HexagonVectorCombineLegacy : public FunctionPass {
};
} // namespace
-char HexagonVectorCombineLegacy::ID = 0;
+const char HexagonVectorCombineLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonVectorCombineLegacy, DEBUG_TYPE,
"Hexagon Vector Combine", false, false)
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
index 40c10c27ae4a2..9b4faae90d72f 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
@@ -154,7 +154,7 @@ namespace {
class HexagonVectorLoopCarriedReuseLegacyPass : public LoopPass {
public:
- static char ID;
+ static const char ID;
explicit HexagonVectorLoopCarriedReuseLegacyPass() : LoopPass(ID) {}
@@ -198,7 +198,7 @@ namespace {
} // end anonymous namespace
-char HexagonVectorLoopCarriedReuseLegacyPass::ID = 0;
+const char HexagonVectorLoopCarriedReuseLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(HexagonVectorLoopCarriedReuseLegacyPass, "hexagon-vlcr",
"Hexagon-specific predictive commoning for HVX vectors",
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp
index 2982313d4a0eb..3b7c159ef485c 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp
@@ -49,7 +49,7 @@ class HexagonVectorPrint : public MachineFunctionPass {
const HexagonRegisterInfo *QRI = nullptr;
public:
- static char ID;
+ static const char ID;
HexagonVectorPrint() : MachineFunctionPass(ID) {}
@@ -60,7 +60,7 @@ class HexagonVectorPrint : public MachineFunctionPass {
} // end anonymous namespace
-char HexagonVectorPrint::ID = 0;
+const char HexagonVectorPrint::ID = 0;
static bool isVecReg(unsigned Reg) {
return (Reg >= Hexagon::V0 && Reg <= Hexagon::V31) ||
diff --git a/llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp b/llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp
index 24e4fc3f53e63..72f6646ac533a 100644
--- a/llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp
+++ b/llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp
@@ -55,7 +55,7 @@ class LanaiAsmPrinter : public AsmPrinter {
void emitCallInstruction(const MachineInstr *MI);
public:
- static char ID;
+ static const char ID;
};
} // end of anonymous namespace
@@ -237,7 +237,7 @@ bool LanaiAsmPrinter::isBlockOnlyReachableByFallthrough(
return !I->isBarrier();
}
-char LanaiAsmPrinter::ID = 0;
+const char LanaiAsmPrinter::ID = 0;
INITIALIZE_PASS(LanaiAsmPrinter, "lanai-asm-printer", "Lanai Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp b/llvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp
index c1aa1221ea134..eadcad1ce4a3b 100644
--- a/llvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp
+++ b/llvm/lib/Target/Lanai/LanaiDelaySlotFiller.cpp
@@ -38,7 +38,7 @@ struct Filler : public MachineFunctionPass {
const TargetRegisterInfo *TRI;
MachineBasicBlock::instr_iterator LastFiller;
- static char ID;
+ static const char ID;
explicit Filler() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "Lanai Delay Slot Filler"; }
@@ -74,7 +74,7 @@ struct Filler : public MachineFunctionPass {
MachineBasicBlock::instr_iterator Slot,
MachineBasicBlock::instr_iterator &Filler);
};
-char Filler::ID = 0;
+const char Filler::ID = 0;
} // end of anonymous namespace
// createLanaiDelaySlotFillerPass - Returns a pass that fills in delay
diff --git a/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp b/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp
index 73a162ffca75a..363d799b44256 100644
--- a/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp
@@ -84,14 +84,14 @@ bool canBeRepresentedAsSls(const ConstantSDNode &CN) {
class LanaiDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit LanaiDAGToDAGISelLegacy(LanaiTargetMachine &TM)
: SelectionDAGISelLegacy(ID, std::make_unique<LanaiDAGToDAGISel>(TM)) {}
};
} // namespace
-char LanaiDAGToDAGISelLegacy::ID = 0;
+const char LanaiDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(LanaiDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp b/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp
index 086c7f7d5e5cb..d7bc251ef4af7 100644
--- a/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp
+++ b/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp
@@ -51,7 +51,7 @@ typedef MachineFunction::iterator MfIterator;
class LanaiMemAluCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
explicit LanaiMemAluCombiner() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -79,7 +79,7 @@ class LanaiMemAluCombiner : public MachineFunctionPass {
};
} // namespace
-char LanaiMemAluCombiner::ID = 0;
+const char LanaiMemAluCombiner::ID = 0;
INITIALIZE_PASS(LanaiMemAluCombiner, DEBUG_TYPE,
"Lanai memory ALU combiner pass", false, false)
diff --git a/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp b/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
index 4b5cba716c638..3ab301427cf42 100644
--- a/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
@@ -304,7 +304,7 @@ bool LoongArchAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
return true;
}
-char LoongArchAsmPrinter::ID = 0;
+const char LoongArchAsmPrinter::ID = 0;
INITIALIZE_PASS(LoongArchAsmPrinter, "loongarch-asm-printer",
"LoongArch Assembly Printer", false, false)
diff --git a/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h b/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
index b2373a9a1670b..502c9269781d8 100644
--- a/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
+++ b/llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
@@ -23,7 +23,7 @@ namespace llvm {
class LLVM_LIBRARY_VISIBILITY LoongArchAsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
const MCSubtargetInfo *STI;
diff --git a/llvm/lib/Target/LoongArch/LoongArchDeadRegisterDefinitions.cpp b/llvm/lib/Target/LoongArch/LoongArchDeadRegisterDefinitions.cpp
index 6358e348fe424..0049525e07460 100644
--- a/llvm/lib/Target/LoongArch/LoongArchDeadRegisterDefinitions.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchDeadRegisterDefinitions.cpp
@@ -27,7 +27,7 @@ STATISTIC(NumDeadDefsReplaced, "Number of dead definitions replaced");
namespace {
class LoongArchDeadRegisterDefinitions : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
LoongArchDeadRegisterDefinitions() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -46,7 +46,7 @@ class LoongArchDeadRegisterDefinitions : public MachineFunctionPass {
};
} // end anonymous namespace
-char LoongArchDeadRegisterDefinitions::ID = 0;
+const char LoongArchDeadRegisterDefinitions::ID = 0;
INITIALIZE_PASS(LoongArchDeadRegisterDefinitions, DEBUG_TYPE,
LoongArch_DEAD_REG_DEF_NAME, false, false)
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
index 73874fccc0308..2ce4a4cd8e2c9 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandAtomicPseudoInsts.cpp
@@ -31,7 +31,7 @@ namespace {
class LoongArchExpandAtomicPseudo : public MachineFunctionPass {
public:
const LoongArchInstrInfo *TII;
- static char ID;
+ static const char ID;
LoongArchExpandAtomicPseudo() : MachineFunctionPass(ID) {}
@@ -61,7 +61,7 @@ class LoongArchExpandAtomicPseudo : public MachineFunctionPass {
MachineBasicBlock::iterator &NextMBBI);
};
-char LoongArchExpandAtomicPseudo::ID = 0;
+const char LoongArchExpandAtomicPseudo::ID = 0;
bool LoongArchExpandAtomicPseudo::runOnMachineFunction(MachineFunction &MF) {
TII =
diff --git a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
index b3167174454a3..a78729bbf72ae 100644
--- a/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
@@ -39,7 +39,7 @@ namespace {
class LoongArchPreRAExpandPseudo : public MachineFunctionPass {
public:
const LoongArchInstrInfo *TII;
- static char ID;
+ static const char ID;
LoongArchPreRAExpandPseudo() : MachineFunctionPass(ID) {}
@@ -107,7 +107,7 @@ class LoongArchPreRAExpandPseudo : public MachineFunctionPass {
MachineBasicBlock::iterator MBBI);
};
-char LoongArchPreRAExpandPseudo::ID = 0;
+const char LoongArchPreRAExpandPseudo::ID = 0;
bool LoongArchPreRAExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
TII =
@@ -752,7 +752,7 @@ void LoongArchPreRAExpandPseudo::annotateTableJump(
class LoongArchExpandPseudo : public MachineFunctionPass {
public:
const LoongArchInstrInfo *TII;
- static char ID;
+ static const char ID;
LoongArchExpandPseudo() : MachineFunctionPass(ID) {}
@@ -774,7 +774,7 @@ class LoongArchExpandPseudo : public MachineFunctionPass {
bool IsTailCall);
};
-char LoongArchExpandPseudo::ID = 0;
+const char LoongArchExpandPseudo::ID = 0;
bool LoongArchExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
TII =
diff --git a/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp b/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
index 442f0a46a4983..4a803be9c5eda 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
#define DEBUG_TYPE "loongarch-isel"
#define PASS_NAME "LoongArch DAG->DAG Pattern Instruction Selection"
-char LoongArchDAGToDAGISelLegacy::ID;
+const char LoongArchDAGToDAGISelLegacy::ID = 0;
LoongArchDAGToDAGISelLegacy::LoongArchDAGToDAGISelLegacy(
LoongArchTargetMachine &TM, CodeGenOptLevel OptLevel)
diff --git a/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h b/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
index 4c8dcb8fa48af..d2e60aeb3a3f2 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
+++ b/llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
@@ -94,7 +94,7 @@ class LoongArchDAGToDAGISel : public SelectionDAGISel {
class LoongArchDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit LoongArchDAGToDAGISelLegacy(LoongArchTargetMachine &TM,
CodeGenOptLevel OptLevel);
};
diff --git a/llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp b/llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
index 3b111d29316d6..ac1f6db7f263f 100644
--- a/llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchMergeBaseOffset.cpp
@@ -32,7 +32,7 @@ class LoongArchMergeBaseOffsetOpt : public MachineFunctionPass {
MachineRegisterInfo *MRI;
public:
- static char ID;
+ static const char ID;
bool runOnMachineFunction(MachineFunction &Fn) override;
bool detectFoldable(MachineInstr &Hi20, MachineInstr *&Lo12,
MachineInstr *&Lo20, MachineInstr *&Hi12,
@@ -72,7 +72,7 @@ class LoongArchMergeBaseOffsetOpt : public MachineFunctionPass {
};
} // end anonymous namespace
-char LoongArchMergeBaseOffsetOpt::ID = 0;
+const char LoongArchMergeBaseOffsetOpt::ID = 0;
INITIALIZE_PASS(LoongArchMergeBaseOffsetOpt, DEBUG_TYPE,
LoongArch_MERGE_BASE_OFFSET_NAME, false, false)
diff --git a/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp b/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp
index b91724e0112a9..f12c06949d84f 100644
--- a/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp
@@ -59,7 +59,7 @@ namespace {
class LoongArchOptWInstrs : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
LoongArchOptWInstrs() : MachineFunctionPass(ID) {}
@@ -84,7 +84,7 @@ class LoongArchOptWInstrs : public MachineFunctionPass {
} // end anonymous namespace
-char LoongArchOptWInstrs::ID = 0;
+const char LoongArchOptWInstrs::ID = 0;
INITIALIZE_PASS(LoongArchOptWInstrs, DEBUG_TYPE, LOONGARCH_OPT_W_INSTRS_NAME,
false, false)
diff --git a/llvm/lib/Target/M68k/M68kAsmPrinter.cpp b/llvm/lib/Target/M68k/M68kAsmPrinter.cpp
index 1853b2bbe9291..ce2f75566f034 100644
--- a/llvm/lib/Target/M68k/M68kAsmPrinter.cpp
+++ b/llvm/lib/Target/M68k/M68kAsmPrinter.cpp
@@ -191,7 +191,7 @@ void M68kAsmPrinter::emitFunctionBodyEnd() {}
void M68kAsmPrinter::emitEndOfAsmFile(Module &M) {}
-char M68kAsmPrinter::ID = 0;
+const char M68kAsmPrinter::ID = 0;
INITIALIZE_PASS(M68kAsmPrinter, "m68k-asm-printer", "M68k Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/M68k/M68kAsmPrinter.h b/llvm/lib/Target/M68k/M68kAsmPrinter.h
index f027f5fa91dfb..8bd7611effc87 100644
--- a/llvm/lib/Target/M68k/M68kAsmPrinter.h
+++ b/llvm/lib/Target/M68k/M68kAsmPrinter.h
@@ -49,7 +49,7 @@ class LLVM_LIBRARY_VISIBILITY M68kAsmPrinter
void printAbsMem(const MachineInstr *MI, unsigned OpNum, raw_ostream &OS);
public:
- static char ID;
+ static const char ID;
const M68kSubtarget *Subtarget;
const M68kMachineFunctionInfo *MMFI;
diff --git a/llvm/lib/Target/M68k/M68kCollapseMOVEMPass.cpp b/llvm/lib/Target/M68k/M68kCollapseMOVEMPass.cpp
index 38770a95d2815..03f2b8dd59eb5 100644
--- a/llvm/lib/Target/M68k/M68kCollapseMOVEMPass.cpp
+++ b/llvm/lib/Target/M68k/M68kCollapseMOVEMPass.cpp
@@ -161,7 +161,7 @@ class MOVEMState {
/// redundant `MOVEM` instructions.
class M68kCollapseMOVEM : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
const M68kSubtarget *STI;
const M68kInstrInfo *TII;
@@ -302,7 +302,7 @@ class M68kCollapseMOVEM : public MachineFunctionPass {
}
};
-char M68kCollapseMOVEM::ID = 0;
+const char M68kCollapseMOVEM::ID = 0;
} // anonymous namespace.
INITIALIZE_PASS(M68kCollapseMOVEM, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/M68k/M68kExpandPseudo.cpp b/llvm/lib/Target/M68k/M68kExpandPseudo.cpp
index 8fafff3d52adc..5e5d036aa15b9 100644
--- a/llvm/lib/Target/M68k/M68kExpandPseudo.cpp
+++ b/llvm/lib/Target/M68k/M68kExpandPseudo.cpp
@@ -34,7 +34,7 @@ using namespace llvm;
namespace {
class M68kExpandPseudo : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
M68kExpandPseudo() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -60,7 +60,7 @@ class M68kExpandPseudo : public MachineFunctionPass {
bool ExpandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
bool ExpandMBB(MachineBasicBlock &MBB);
};
-char M68kExpandPseudo::ID = 0;
+const char M68kExpandPseudo::ID = 0;
} // End anonymous namespace.
INITIALIZE_PASS(M68kExpandPseudo, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp b/llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
index 6c667b61f91ac..f5d20a909e246 100644
--- a/llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
+++ b/llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
@@ -402,12 +402,12 @@ class M68kDAGToDAGISel : public SelectionDAGISel {
class M68kDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit M68kDAGToDAGISelLegacy(M68kTargetMachine &TM)
: SelectionDAGISelLegacy(ID, std::make_unique<M68kDAGToDAGISel>(TM)) {}
};
-char M68kDAGToDAGISelLegacy::ID;
+const char M68kDAGToDAGISelLegacy::ID = 0;
} // namespace
diff --git a/llvm/lib/Target/M68k/M68kInstrInfo.cpp b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
index 3a9f88269f42c..cdd4ebbd7a013 100644
--- a/llvm/lib/Target/M68k/M68kInstrInfo.cpp
+++ b/llvm/lib/Target/M68k/M68kInstrInfo.cpp
@@ -910,7 +910,7 @@ M68kInstrInfo::getSerializableDirectMachineOperandTargetFlags() const {
namespace {
/// This initializes the PIC global base register
struct M68kGlobalBaseReg : public MachineFunctionPass {
- static char ID;
+ static const char ID;
M68kGlobalBaseReg() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -941,7 +941,7 @@ struct M68kGlobalBaseReg : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}
};
-char M68kGlobalBaseReg::ID = 0;
+const char M68kGlobalBaseReg::ID = 0;
} // namespace
INITIALIZE_PASS(M68kGlobalBaseReg, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp b/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
index 44eea8149c594..23934ae5941d9 100644
--- a/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
+++ b/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
@@ -56,7 +56,7 @@ namespace {
void EmitInterruptVectorSection(MachineFunction &ISR);
- static char ID;
+ static const char ID;
};
} // end of anonymous namespace
@@ -184,7 +184,7 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
return false;
}
-char MSP430AsmPrinter::ID = 0;
+const char MSP430AsmPrinter::ID = 0;
INITIALIZE_PASS(MSP430AsmPrinter, "msp430-asm-printer",
"MSP430 Assembly Printer", false, false)
diff --git a/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp b/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp
index 75cceaf72b894..2beecb27b62e3 100644
--- a/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp
+++ b/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp
@@ -47,7 +47,7 @@ class MSP430BSel : public MachineFunctionPass {
bool expandBranches(OffsetVector &BlockOffsets);
public:
- static char ID;
+ static const char ID;
MSP430BSel() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -58,7 +58,7 @@ class MSP430BSel : public MachineFunctionPass {
StringRef getPassName() const override { return "MSP430 Branch Selector"; }
};
-char MSP430BSel::ID = 0;
+const char MSP430BSel::ID = 0;
}
static bool isInRage(int DistanceInBytes) {
diff --git a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
index 2834a2ebb0cc6..f5f8fcc68580b 100644
--- a/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
@@ -116,14 +116,14 @@ namespace {
class MSP430DAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
MSP430DAGToDAGISelLegacy(MSP430TargetMachine &TM, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
ID, std::make_unique<MSP430DAGToDAGISel>(TM, OptLevel)) {}
};
} // end anonymous namespace
-char MSP430DAGToDAGISelLegacy::ID;
+const char MSP430DAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(MSP430DAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp b/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp
index 4633df5d1b6a5..91279a81a51d4 100644
--- a/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp
+++ b/llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp
@@ -134,7 +134,7 @@ typedef llvm::SmallVector<ReduceEntry, 32> ReduceEntryVector;
class MicroMipsSizeReduce : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MicroMipsSizeReduce();
static const MipsInstrInfo *MipsII;
@@ -201,7 +201,7 @@ class MicroMipsSizeReduce : public MachineFunctionPass {
static ReduceEntryVector ReduceTable;
};
-char MicroMipsSizeReduce::ID = 0;
+const char MicroMipsSizeReduce::ID = 0;
const MipsInstrInfo *MicroMipsSizeReduce::MipsII;
// This table must be sorted by WideOpc as a main criterion and
diff --git a/llvm/lib/Target/Mips/Mips16HardFloat.cpp b/llvm/lib/Target/Mips/Mips16HardFloat.cpp
index 9ba1840cfb72b..721c83df5b0af 100644
--- a/llvm/lib/Target/Mips/Mips16HardFloat.cpp
+++ b/llvm/lib/Target/Mips/Mips16HardFloat.cpp
@@ -27,7 +27,7 @@ namespace {
class Mips16HardFloat : public ModulePass {
public:
- static char ID;
+ static const char ID;
Mips16HardFloat() : ModulePass(ID) {}
@@ -54,7 +54,7 @@ static void emitInlineAsm(LLVMContext &C, BasicBlock *BB, StringRef AsmText) {
CallInst::Create(IA, AsmArgs, "", BB);
}
-char Mips16HardFloat::ID = 0;
+const char Mips16HardFloat::ID = 0;
//
// Return types that matter for hard float are:
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index a0e5872da5e6e..015023a8d8737 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -1265,7 +1265,7 @@ bool MipsAsmPrinter::isLongBranchPseudo(int Opcode) const {
|| Opcode == Mips::LONG_BRANCH_DADDiu2Op);
}
-char MipsAsmPrinter::ID = 0;
+const char MipsAsmPrinter::ID = 0;
INITIALIZE_PASS(MipsAsmPrinter, "mips-asm-printer", "Mips Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.h b/llvm/lib/Target/Mips/MipsAsmPrinter.h
index 6d45ad551db72..eae7275807e45 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.h
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.h
@@ -116,7 +116,7 @@ class LLVM_LIBRARY_VISIBILITY MipsAsmPrinter : public AsmPrinter {
bool isLongBranchPseudo(int Opcode) const;
public:
- static char ID;
+ static const char ID;
const MipsSubtarget *Subtarget;
const MipsFunctionInfo *MipsFI;
diff --git a/llvm/lib/Target/Mips/MipsBranchExpansion.cpp b/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
index 3720c936643b4..9e37645ad7554 100644
--- a/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
+++ b/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
@@ -132,7 +132,7 @@ struct MBBInfo {
class MipsBranchExpansion : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MipsBranchExpansion()
: MachineFunctionPass(ID), ABI(MipsABIInfo::Unknown()) {}
@@ -179,7 +179,7 @@ class MipsBranchExpansion : public MachineFunctionPass {
} // end of anonymous namespace
-char MipsBranchExpansion::ID = 0;
+const char MipsBranchExpansion::ID = 0;
INITIALIZE_PASS(MipsBranchExpansion, DEBUG_TYPE,
"Expand out of range branch instructions and fix forbidden"
diff --git a/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp b/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
index 1a844ad64eeea..fee697d0c9210 100644
--- a/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
+++ b/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp
@@ -354,7 +354,7 @@ namespace {
}
public:
- static char ID;
+ static const char ID;
MipsConstantIslands() : MachineFunctionPass(ID) {}
@@ -408,7 +408,7 @@ namespace {
} // end anonymous namespace
-char MipsConstantIslands::ID = 0;
+const char MipsConstantIslands::ID = 0;
bool MipsConstantIslands::isOffsetInRange
(unsigned UserOffset, unsigned TrialOffset,
diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
index f04ce53340c5d..e539c52876766 100644
--- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -218,7 +218,7 @@ namespace {
MachineFunctionPass::getAnalysisUsage(AU);
}
- static char ID;
+ static const char ID;
private:
bool runOnMachineBasicBlock(MachineBasicBlock &MBB);
@@ -274,7 +274,7 @@ namespace {
} // end anonymous namespace
-char MipsDelaySlotFiller::ID = 0;
+const char MipsDelaySlotFiller::ID = 0;
static bool hasUnoccupiedSlot(const MachineInstr *MI) {
return MI->hasDelaySlot() && !MI->isBundledWithSucc();
diff --git a/llvm/lib/Target/Mips/MipsExpandPseudo.cpp b/llvm/lib/Target/Mips/MipsExpandPseudo.cpp
index 78f2e5db40f9d..d77b0f17aad0d 100644
--- a/llvm/lib/Target/Mips/MipsExpandPseudo.cpp
+++ b/llvm/lib/Target/Mips/MipsExpandPseudo.cpp
@@ -32,7 +32,7 @@ using namespace llvm;
namespace {
class MipsExpandPseudo : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MipsExpandPseudo() : MachineFunctionPass(ID) {}
const MipsInstrInfo *TII;
@@ -67,7 +67,7 @@ namespace {
MachineBasicBlock::iterator &NMBB);
bool expandMBB(MachineBasicBlock &MBB);
};
- char MipsExpandPseudo::ID = 0;
+ const char MipsExpandPseudo::ID = 0;
}
bool MipsExpandPseudo::expandAtomicCmpSwapSubword(
diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
index 36706243232c0..2692744ce5adc 100644
--- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
@@ -303,7 +303,7 @@ bool MipsDAGToDAGISel::isUnneededShiftMask(SDNode *N,
return (Known.Zero | RHS).countr_one() >= ShAmtBits;
}
-char MipsDAGToDAGISelLegacy::ID = 0;
+const char MipsDAGToDAGISelLegacy::ID = 0;
MipsDAGToDAGISelLegacy::MipsDAGToDAGISelLegacy(
std::unique_ptr<SelectionDAGISel> S)
diff --git a/llvm/lib/Target/Mips/MipsISelDAGToDAG.h b/llvm/lib/Target/Mips/MipsISelDAGToDAG.h
index f19d72d94f806..dd2af04d50129 100644
--- a/llvm/lib/Target/Mips/MipsISelDAGToDAG.h
+++ b/llvm/lib/Target/Mips/MipsISelDAGToDAG.h
@@ -148,7 +148,7 @@ class MipsDAGToDAGISel : public SelectionDAGISel {
class MipsDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
MipsDAGToDAGISelLegacy(std::unique_ptr<SelectionDAGISel> S);
void getAnalysisUsage(AnalysisUsage &AU) const override;
};
diff --git a/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
index 2c23d3b72dc66..d99fd7076d9b5 100644
--- a/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
@@ -23,7 +23,7 @@ using namespace llvm;
namespace {
class MipsModuleDAGToDAGISel : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MipsModuleDAGToDAGISel() : MachineFunctionPass(ID) {}
@@ -41,7 +41,7 @@ namespace {
bool runOnMachineFunction(MachineFunction &MF) override;
};
- char MipsModuleDAGToDAGISel::ID = 0;
+ const char MipsModuleDAGToDAGISel::ID = 0;
}
bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) {
diff --git a/llvm/lib/Target/Mips/MipsMulMulBugPass.cpp b/llvm/lib/Target/Mips/MipsMulMulBugPass.cpp
index 8ca6d07def596..f268b5450f187 100644
--- a/llvm/lib/Target/Mips/MipsMulMulBugPass.cpp
+++ b/llvm/lib/Target/Mips/MipsMulMulBugPass.cpp
@@ -45,7 +45,7 @@ class MipsMulMulBugFix : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
private:
bool fixMulMulBB(MachineBasicBlock &MBB, const MipsInstrInfo &MipsII);
@@ -56,7 +56,7 @@ class MipsMulMulBugFix : public MachineFunctionPass {
INITIALIZE_PASS(MipsMulMulBugFix, "mips-vr4300-mulmul-fix",
"Mips VR4300 mulmul bugfix", false, false)
-char MipsMulMulBugFix::ID = 0;
+const char MipsMulMulBugFix::ID = 0;
bool MipsMulMulBugFix::runOnMachineFunction(MachineFunction &MF) {
const MipsInstrInfo &MipsII =
diff --git a/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp b/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp
index 7ceb97642bba1..6cd20d87e2a0b 100644
--- a/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp
+++ b/llvm/lib/Target/Mips/MipsOptimizePICCall.cpp
@@ -112,12 +112,12 @@ class OptimizePICCall : public MachineFunctionPass {
ScopedHTType ScopedHT;
- static char ID;
+ static const char ID;
};
} // end of anonymous namespace
-char OptimizePICCall::ID = 0;
+const char OptimizePICCall::ID = 0;
/// Return the first MachineOperand of MI if it is a used virtual register.
static MachineOperand *getCallTargetRegOpnd(MachineInstr &MI) {
diff --git a/llvm/lib/Target/Mips/MipsOs16.cpp b/llvm/lib/Target/Mips/MipsOs16.cpp
index f6346a8bbc8bc..6f7391f7bcffb 100644
--- a/llvm/lib/Target/Mips/MipsOs16.cpp
+++ b/llvm/lib/Target/Mips/MipsOs16.cpp
@@ -31,7 +31,7 @@ static cl::opt<std::string> Mips32FunctionMask(
namespace {
class MipsOs16 : public ModulePass {
public:
- static char ID;
+ static const char ID;
MipsOs16() : ModulePass(ID) {}
@@ -40,7 +40,7 @@ namespace {
bool runOnModule(Module &M) override;
};
- char MipsOs16::ID = 0;
+ const char MipsOs16::ID = 0;
}
// Figure out if we need float point based on the function signature.
diff --git a/llvm/lib/Target/Mips/MipsPostLegalizerCombiner.cpp b/llvm/lib/Target/Mips/MipsPostLegalizerCombiner.cpp
index d28129663e72e..5facc1d3b5201 100644
--- a/llvm/lib/Target/Mips/MipsPostLegalizerCombiner.cpp
+++ b/llvm/lib/Target/Mips/MipsPostLegalizerCombiner.cpp
@@ -86,7 +86,7 @@ MipsPostLegalizerCombinerImpl::MipsPostLegalizerCombinerImpl(
class MipsPostLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MipsPostLegalizerCombiner(bool IsOptNone = false);
@@ -145,7 +145,7 @@ bool MipsPostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char MipsPostLegalizerCombiner::ID = 0;
+const char MipsPostLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(MipsPostLegalizerCombiner, DEBUG_TYPE,
"Combine Mips machine instrs after legalization", false,
false)
diff --git a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
index c3a2668182b28..0c671d14dc54d 100644
--- a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
@@ -87,7 +87,7 @@ class MipsPreLegalizerCombinerImpl : public Combiner {
class MipsPreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
MipsPreLegalizerCombiner();
@@ -128,7 +128,7 @@ bool MipsPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char MipsPreLegalizerCombiner::ID = 0;
+const char MipsPreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(MipsPreLegalizerCombiner, DEBUG_TYPE,
"Combine Mips machine instrs before legalization", false,
false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp b/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp
index a579783802aa2..9e7b480f1a036 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.cpp
@@ -28,8 +28,8 @@ static cl::opt<unsigned> TraverseAddressSpacesLimit(
AnalysisKey NVPTXAA::Key;
-char NVPTXAAWrapperPass::ID = 0;
-char NVPTXExternalAAWrapper::ID = 0;
+const char NVPTXAAWrapperPass::ID = 0;
+const char NVPTXExternalAAWrapper::ID = 0;
INITIALIZE_PASS(NVPTXAAWrapperPass, "nvptx-aa",
"NVPTX Address space based Alias Analysis", false, true)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h b/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h
index b832b82cbc30c..6a5c64dc18020 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h
+++ b/llvm/lib/Target/NVPTX/NVPTXAliasAnalysis.h
@@ -63,7 +63,7 @@ class NVPTXAAWrapperPass : public ImmutablePass {
std::unique_ptr<NVPTXAAResult> Result;
public:
- static char ID;
+ static const char ID;
NVPTXAAWrapperPass();
@@ -88,7 +88,7 @@ class NVPTXAAWrapperPass : public ImmutablePass {
// Note that NVPTXAA will run before BasicAA for compile time considerations.
class NVPTXExternalAAWrapper : public ExternalAAWrapperPass {
public:
- static char ID;
+ static const char ID;
NVPTXExternalAAWrapper()
: ExternalAAWrapperPass(
diff --git a/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp b/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
index 8a8e423a2eb71..813b6d1bf7567 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
@@ -23,7 +23,7 @@ namespace {
// block.
class NVPTXAllocaHoisting : public FunctionPass {
public:
- static char ID; // Pass ID
+ static const char ID; // Pass ID
NVPTXAllocaHoisting() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -56,7 +56,7 @@ bool NVPTXAllocaHoisting::runOnFunction(Function &function) {
return functionModified;
}
-char NVPTXAllocaHoisting::ID = 0;
+const char NVPTXAllocaHoisting::ID = 0;
INITIALIZE_PASS(
NVPTXAllocaHoisting, "alloca-hoisting",
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index b18d6239f0026..2edcd13964d8a 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1960,7 +1960,7 @@ void NVPTXAsmPrinter::printMemOperand(const MachineInstr *MI, unsigned OpNum,
}
}
-char NVPTXAsmPrinter::ID = 0;
+const char NVPTXAsmPrinter::ID = 0;
INITIALIZE_PASS(NVPTXAsmPrinter, "nvptx-asm-printer", "NVPTX Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
index ebdfac93c04f4..b3e374564eb76 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
@@ -146,7 +146,7 @@ class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter {
friend class AggBuffer;
public:
- static char ID;
+ static const char ID;
StringRef getPassName() const override { return "NVPTX Assembly Printer"; }
diff --git a/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp b/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
index 5efbf2f1faceb..3f937604eaa61 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
@@ -29,14 +29,14 @@ namespace {
/// NVPTXAssignValidGlobalNames
class NVPTXAssignValidGlobalNames : public ModulePass {
public:
- static char ID;
+ static const char ID;
NVPTXAssignValidGlobalNames() : ModulePass(ID) {}
bool runOnModule(Module &M) override;
};
} // namespace
-char NVPTXAssignValidGlobalNames::ID = 0;
+const char NVPTXAssignValidGlobalNames::ID = 0;
INITIALIZE_PASS(NVPTXAssignValidGlobalNames, "nvptx-assign-valid-global-names",
"Assign valid PTX names to globals", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAtomicLower.cpp b/llvm/lib/Target/NVPTX/NVPTXAtomicLower.cpp
index 918daf6c04ecd..4484008267b27 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAtomicLower.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAtomicLower.cpp
@@ -26,7 +26,7 @@ namespace {
// block.
class NVPTXAtomicLower : public FunctionPass {
public:
- static char ID; // Pass ID
+ static const char ID; // Pass ID
NVPTXAtomicLower() : FunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -54,7 +54,7 @@ bool NVPTXAtomicLower::runOnFunction(Function &F) {
return Changed;
}
-char NVPTXAtomicLower::ID = 0;
+const char NVPTXAtomicLower::ID = 0;
INITIALIZE_PASS(NVPTXAtomicLower, "nvptx-atomic-lower",
"Lower atomics of local memory to simple load/stores", false,
diff --git a/llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp
index ef0035fa9da4d..85c576b8ada8e 100644
--- a/llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp
@@ -243,7 +243,7 @@ static bool lowerCtorsAndDtors(Module &M) {
class NVPTXCtorDtorLoweringLegacy final : public ModulePass {
public:
- static char ID;
+ static const char ID;
NVPTXCtorDtorLoweringLegacy() : ModulePass(ID) {}
bool runOnModule(Module &M) override { return lowerCtorsAndDtors(M); }
};
@@ -256,7 +256,7 @@ PreservedAnalyses NVPTXCtorDtorLoweringPass::run(Module &M,
: PreservedAnalyses::all();
}
-char NVPTXCtorDtorLoweringLegacy::ID = 0;
+const char NVPTXCtorDtorLoweringLegacy::ID = 0;
INITIALIZE_PASS(NVPTXCtorDtorLoweringLegacy, DEBUG_TYPE,
"Lower ctors and dtors for NVPTX", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp b/llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp
index c8b53571c1e59..8e4e39e773485 100644
--- a/llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXForwardParams.cpp
@@ -129,7 +129,7 @@ static bool forwardDeviceParams(MachineFunction &MF) {
namespace {
struct NVPTXForwardParamsPass : public MachineFunctionPass {
- static char ID;
+ static const char ID;
NVPTXForwardParamsPass() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -140,7 +140,7 @@ struct NVPTXForwardParamsPass : public MachineFunctionPass {
};
} // namespace
-char NVPTXForwardParamsPass::ID = 0;
+const char NVPTXForwardParamsPass::ID = 0;
INITIALIZE_PASS(NVPTXForwardParamsPass, "nvptx-forward-params",
"NVPTX Forward Params", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp b/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
index 7f190f33da808..a6737714d9432 100644
--- a/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
@@ -269,7 +269,7 @@ Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
namespace {
class GenericToNVVMLegacyPass : public ModulePass {
public:
- static char ID;
+ static const char ID;
GenericToNVVMLegacyPass() : ModulePass(ID) {}
@@ -277,7 +277,7 @@ class GenericToNVVMLegacyPass : public ModulePass {
};
} // namespace
-char GenericToNVVMLegacyPass::ID = 0;
+const char GenericToNVVMLegacyPass::ID = 0;
ModulePass *llvm::createGenericToNVVMLegacyPass() {
return new GenericToNVVMLegacyPass();
diff --git a/llvm/lib/Target/NVPTX/NVPTXIRPeephole.cpp b/llvm/lib/Target/NVPTX/NVPTXIRPeephole.cpp
index bd16c7213b1e7..f9002c4b55a3f 100644
--- a/llvm/lib/Target/NVPTX/NVPTXIRPeephole.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXIRPeephole.cpp
@@ -139,14 +139,14 @@ static bool foldFMA(Function &F) {
namespace {
struct NVPTXIRPeephole : public FunctionPass {
- static char ID;
+ static const char ID;
NVPTXIRPeephole() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
};
} // namespace
-char NVPTXIRPeephole::ID = 0;
+const char NVPTXIRPeephole::ID = 0;
INITIALIZE_PASS(NVPTXIRPeephole, "nvptx-ir-peephole", "NVPTX IR Peephole",
false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
index 99982ff3181b3..297c48977716b 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
@@ -58,7 +58,7 @@ NVPTXDAGToDAGISelLegacy::NVPTXDAGToDAGISelLegacy(NVPTXTargetMachine &tm,
: SelectionDAGISelLegacy(
ID, std::make_unique<NVPTXDAGToDAGISel>(tm, OptLevel)) {}
-char NVPTXDAGToDAGISelLegacy::ID = 0;
+const char NVPTXDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(NVPTXDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h
index fcb5700dcb6d4..9e6dd32729d57 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h
+++ b/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h
@@ -120,7 +120,7 @@ class LLVM_LIBRARY_VISIBILITY NVPTXDAGToDAGISel : public SelectionDAGISel {
class NVPTXDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit NVPTXDAGToDAGISelLegacy(NVPTXTargetMachine &tm,
CodeGenOptLevel OptLevel);
};
diff --git a/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp b/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
index b10b086177e04..090757ed62a8e 100644
--- a/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
class NVPTXImageOptimizer : public FunctionPass {
private:
- static char ID;
+ static const char ID;
SmallVector<Instruction*, 4> InstrToDelete;
public:
@@ -45,7 +45,7 @@ class NVPTXImageOptimizer : public FunctionPass {
};
}
-char NVPTXImageOptimizer::ID = 0;
+const char NVPTXImageOptimizer::ID = 0;
NVPTXImageOptimizer::NVPTXImageOptimizer()
: FunctionPass(ID) {}
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
index d0b50d2610bd5..22cc4cd7fc50a 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
@@ -35,7 +35,7 @@ namespace {
// actual analysis class, which is a functionpass
struct NVPTXLowerAggrCopies : public FunctionPass {
- static char ID;
+ static const char ID;
NVPTXLowerAggrCopies() : FunctionPass(ID) {}
@@ -53,7 +53,7 @@ struct NVPTXLowerAggrCopies : public FunctionPass {
}
};
-char NVPTXLowerAggrCopies::ID = 0;
+const char NVPTXLowerAggrCopies::ID = 0;
bool NVPTXLowerAggrCopies::runOnFunction(Function &F) {
SmallVector<LoadInst *, 4> AggrLoads;
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
index 1583d45eeb3a6..7dedaf143caee 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
@@ -38,7 +38,7 @@ class NVPTXLowerAlloca : public FunctionPass {
bool runOnFunction(Function &F) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
NVPTXLowerAlloca() : FunctionPass(ID) {}
StringRef getPassName() const override {
return "convert address space of alloca'ed memory to local";
@@ -46,7 +46,7 @@ class NVPTXLowerAlloca : public FunctionPass {
};
} // namespace
-char NVPTXLowerAlloca::ID = 1;
+const char NVPTXLowerAlloca::ID = 1;
INITIALIZE_PASS(NVPTXLowerAlloca, "nvptx-lower-alloca", "Lower Alloca", false,
false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
index e2bbe57c0085c..b53b068c992ef 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
@@ -166,7 +166,7 @@ class NVPTXLowerArgsLegacyPass : public FunctionPass {
bool runOnFunction(Function &F) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
NVPTXLowerArgsLegacyPass() : FunctionPass(ID) {}
StringRef getPassName() const override {
return "Lower pointer arguments of CUDA kernels";
@@ -177,7 +177,7 @@ class NVPTXLowerArgsLegacyPass : public FunctionPass {
};
} // namespace
-char NVPTXLowerArgsLegacyPass::ID = 1;
+const char NVPTXLowerArgsLegacyPass::ID = 1;
INITIALIZE_PASS_BEGIN(NVPTXLowerArgsLegacyPass, "nvptx-lower-args",
"Lower arguments (NVPTX)", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp
index 00a12bf818897..2f5b87169393c 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp
@@ -85,7 +85,7 @@ class NVPTXLowerUnreachable : public FunctionPass {
bool isLoweredToTrap(const UnreachableInst &I) const;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
NVPTXLowerUnreachable(bool TrapUnreachable, bool NoTrapAfterNoreturn)
: FunctionPass(ID), TrapUnreachable(TrapUnreachable),
NoTrapAfterNoreturn(NoTrapAfterNoreturn) {}
@@ -96,7 +96,7 @@ class NVPTXLowerUnreachable : public FunctionPass {
};
} // namespace
-char NVPTXLowerUnreachable::ID = 1;
+const char NVPTXLowerUnreachable::ID = 1;
INITIALIZE_PASS(NVPTXLowerUnreachable, "nvptx-lower-unreachable",
"Lower Unreachable", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp b/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
index e9b0aaeca4964..82da00513afc6 100644
--- a/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
@@ -47,13 +47,13 @@ using namespace llvm;
namespace {
struct NVPTXPeephole : public MachineFunctionPass {
public:
- static char ID;
- NVPTXPeephole() : MachineFunctionPass(ID) {}
+ static const char ID;
+ NVPTXPeephole() : MachineFunctionPass(ID) {}
- bool runOnMachineFunction(MachineFunction &MF) override;
+ bool runOnMachineFunction(MachineFunction &MF) override;
- StringRef getPassName() const override {
- return "NVPTX optimize redundant cvta.to.local instruction";
+ StringRef getPassName() const override {
+ return "NVPTX optimize redundant cvta.to.local instruction";
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -62,7 +62,7 @@ struct NVPTXPeephole : public MachineFunctionPass {
};
}
-char NVPTXPeephole::ID = 0;
+const char NVPTXPeephole::ID = 0;
INITIALIZE_PASS(NVPTXPeephole, "nvptx-peephole", "NVPTX Peephole", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
index ababc66cc5d26..827de2f0f1f21 100644
--- a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
@@ -31,7 +31,7 @@ using namespace llvm;
namespace {
class NVPTXPrologEpilogPass : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
NVPTXPrologEpilogPass() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -47,7 +47,7 @@ MachineFunctionPass *llvm::createNVPTXPrologEpilogPass() {
return new NVPTXPrologEpilogPass();
}
-char NVPTXPrologEpilogPass::ID = 0;
+const char NVPTXPrologEpilogPass::ID = 0;
INITIALIZE_PASS(NVPTXPrologEpilogPass, DEBUG_TYPE,
"NVPTX Prologue/Epilogue Insertion", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp b/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp
index bac036f3a93ae..0ebe42ebda9b9 100644
--- a/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXProxyRegErasure.cpp
@@ -27,7 +27,7 @@ using namespace llvm;
namespace {
struct NVPTXProxyRegErasure : public MachineFunctionPass {
- static char ID;
+ static const char ID;
NVPTXProxyRegErasure() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -43,7 +43,7 @@ struct NVPTXProxyRegErasure : public MachineFunctionPass {
} // namespace
-char NVPTXProxyRegErasure::ID = 0;
+const char NVPTXProxyRegErasure::ID = 0;
INITIALIZE_PASS(NVPTXProxyRegErasure, "nvptx-proxyreg-erasure",
"NVPTX ProxyReg Erasure", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp b/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
index 4bbf49f93f43b..2e179738ac628 100644
--- a/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
class NVPTXReplaceImageHandles : public MachineFunctionPass {
private:
- static char ID;
+ static const char ID;
DenseSet<MachineInstr *> InstrsToRemove;
public:
@@ -43,7 +43,7 @@ class NVPTXReplaceImageHandles : public MachineFunctionPass {
};
} // namespace
-char NVPTXReplaceImageHandles::ID = 0;
+const char NVPTXReplaceImageHandles::ID = 0;
NVPTXReplaceImageHandles::NVPTXReplaceImageHandles()
: MachineFunctionPass(ID) {}
diff --git a/llvm/lib/Target/NVPTX/NVPTXTagInvariantLoads.cpp b/llvm/lib/Target/NVPTX/NVPTXTagInvariantLoads.cpp
index f1774a7c5572e..4f6774d5d938e 100644
--- a/llvm/lib/Target/NVPTX/NVPTXTagInvariantLoads.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXTagInvariantLoads.cpp
@@ -82,7 +82,7 @@ static bool tagInvariantLoads(Function &F) {
namespace {
struct NVPTXTagInvariantLoadLegacyPass : public FunctionPass {
- static char ID;
+ static const char ID;
NVPTXTagInvariantLoadLegacyPass() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
@@ -97,7 +97,7 @@ bool NVPTXTagInvariantLoadLegacyPass::runOnFunction(Function &F) {
return tagInvariantLoads(F);
}
-char NVPTXTagInvariantLoadLegacyPass::ID = 0;
+const char NVPTXTagInvariantLoadLegacyPass::ID = 0;
FunctionPass *llvm::createNVPTXTagInvariantLoadsPass() {
return new NVPTXTagInvariantLoadLegacyPass();
diff --git a/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp b/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp
index 2c81989932a97..f6a4a5b7c8b7d 100644
--- a/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp
+++ b/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp
@@ -28,7 +28,7 @@ using namespace llvm;
namespace {
class NVVMIntrRange : public FunctionPass {
public:
- static char ID;
+ static const char ID;
NVVMIntrRange() : FunctionPass(ID) {}
bool runOnFunction(Function &) override;
@@ -37,7 +37,7 @@ class NVVMIntrRange : public FunctionPass {
FunctionPass *llvm::createNVVMIntrRangePass() { return new NVVMIntrRange(); }
-char NVVMIntrRange::ID = 0;
+const char NVVMIntrRange::ID = 0;
INITIALIZE_PASS(NVVMIntrRange, "nvvm-intr-range",
"Add !range metadata to NVVM intrinsics.", false, false)
diff --git a/llvm/lib/Target/NVPTX/NVVMReflect.cpp b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
index 208bab52284a3..4b5f1b9dfa53e 100644
--- a/llvm/lib/Target/NVPTX/NVVMReflect.cpp
+++ b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
@@ -73,7 +73,7 @@ class NVVMReflectLegacyPass : public ModulePass {
NVVMReflect Impl;
public:
- static char ID;
+ static const char ID;
NVVMReflectLegacyPass(unsigned SmVersion) : ModulePass(ID), Impl(SmVersion) {}
bool runOnModule(Module &M) override;
};
@@ -87,7 +87,7 @@ static cl::opt<bool>
NVVMReflectEnabled("nvvm-reflect-enable", cl::init(true), cl::Hidden,
cl::desc("NVVM reflection, enabled by default"));
-char NVVMReflectLegacyPass::ID = 0;
+const char NVVMReflectLegacyPass::ID = 0;
INITIALIZE_PASS(NVVMReflectLegacyPass, "nvvm-reflect",
"Replace occurrences of __nvvm_reflect() calls with 0/1", false,
false)
diff --git a/llvm/lib/Target/PowerPC/PPC.h b/llvm/lib/Target/PowerPC/PPC.h
index 88a54ac33f5a9..2400a7e1d22a9 100644
--- a/llvm/lib/Target/PowerPC/PPC.h
+++ b/llvm/lib/Target/PowerPC/PPC.h
@@ -83,15 +83,15 @@ class ModulePass;
void initializePPCLinuxAsmPrinterPass(PassRegistry &);
void initializePPCAIXAsmPrinterPass(PassRegistry &);
- extern char &PPCVSXFMAMutateID;
+ extern const char &PPCVSXFMAMutateID;
ModulePass *createPPCLowerMASSVEntriesPass();
void initializePPCLowerMASSVEntriesPass(PassRegistry &);
- extern char &PPCLowerMASSVEntriesID;
+ extern const char &PPCLowerMASSVEntriesID;
ModulePass *createPPCGenScalarMASSEntriesPass();
void initializePPCGenScalarMASSEntriesPass(PassRegistry &);
- extern char &PPCGenScalarMASSEntriesID;
+ extern const char &PPCGenScalarMASSEntriesID;
InstructionSelector *
createPPCInstructionSelector(const PPCTargetMachine &, const PPCSubtarget &,
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 64102e7b6fdae..563f957acc1c5 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -176,7 +176,7 @@ class PPCAsmPrinter : public AsmPrinter {
public:
explicit PPCAsmPrinter(TargetMachine &TM,
- std::unique_ptr<MCStreamer> Streamer, char &ID)
+ std::unique_ptr<MCStreamer> Streamer, const char &ID)
: AsmPrinter(TM, std::move(Streamer), ID) {}
StringRef getPassName() const override { return "PowerPC Assembly Printer"; }
@@ -232,7 +232,7 @@ class PPCAsmPrinter : public AsmPrinter {
/// PPCLinuxAsmPrinter - PowerPC assembly printer, customized for Linux
class PPCLinuxAsmPrinter : public PPCAsmPrinter {
public:
- static char ID;
+ static const char ID;
explicit PPCLinuxAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
@@ -280,7 +280,7 @@ class PPCAIXAsmPrinter : public PPCAsmPrinter {
uint64_t getAliasOffset(const Constant *C);
public:
- static char ID;
+ static const char ID;
PPCAIXAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
: PPCAsmPrinter(TM, std::move(Streamer), ID) {
@@ -2265,7 +2265,7 @@ void PPCLinuxAsmPrinter::emitFunctionBodyEnd() {
}
}
-char PPCLinuxAsmPrinter::ID = 0;
+const char PPCLinuxAsmPrinter::ID = 0;
INITIALIZE_PASS(PPCLinuxAsmPrinter, "ppc-linux-asm-printer",
"Linux PPC Assembly Printer", false, false)
@@ -3672,7 +3672,7 @@ void PPCAIXAsmPrinter::emitGlobalIFunc(Module &M, const GlobalIFunc &GI) {
*Subtarget);
}
-char PPCAIXAsmPrinter::ID = 0;
+const char PPCAIXAsmPrinter::ID = 0;
INITIALIZE_PASS(PPCAIXAsmPrinter, "ppc-aix-asm-printer",
"AIX PPC Assembly Printer", false, false)
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index 6fe7688224d39..8274277d4e73d 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -174,40 +174,40 @@ class PPCBoolRetToInt : public FunctionPass {
typedef DenseMap<Value *, Value *> B2IMap;
public:
- static char ID;
-
- PPCBoolRetToInt() : FunctionPass(ID) {}
-
- bool runOnFunction(Function &F) override {
- if (skipFunction(F))
- return false;
-
- auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
- if (!TPC)
- return false;
-
- auto &TM = TPC->getTM<PPCTargetMachine>();
- ST = TM.getSubtargetImpl(F);
- Func = &F;
-
- PHINodeSet PromotablePHINodes = getPromotablePHINodes(F);
- B2IMap Bool2IntMap;
- bool Changed = false;
- for (auto &BB : F) {
- for (auto &I : BB) {
- if (auto *R = dyn_cast<ReturnInst>(&I))
- if (F.getReturnType()->isIntegerTy(1))
- Changed |=
- runOnUse(R->getOperandUse(0), PromotablePHINodes, Bool2IntMap);
-
- if (auto *CI = dyn_cast<CallInst>(&I))
- for (auto &U : CI->operands())
- if (U->getType()->isIntegerTy(1))
- Changed |= runOnUse(U, PromotablePHINodes, Bool2IntMap);
- }
- }
-
- return Changed;
+ static const char ID;
+
+ PPCBoolRetToInt() : FunctionPass(ID) {}
+
+ bool runOnFunction(Function &F) override {
+ if (skipFunction(F))
+ return false;
+
+ auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
+ if (!TPC)
+ return false;
+
+ auto &TM = TPC->getTM<PPCTargetMachine>();
+ ST = TM.getSubtargetImpl(F);
+ Func = &F;
+
+ PHINodeSet PromotablePHINodes = getPromotablePHINodes(F);
+ B2IMap Bool2IntMap;
+ bool Changed = false;
+ for (auto &BB : F) {
+ for (auto &I : BB) {
+ if (auto *R = dyn_cast<ReturnInst>(&I))
+ if (F.getReturnType()->isIntegerTy(1))
+ Changed |=
+ runOnUse(R->getOperandUse(0), PromotablePHINodes, Bool2IntMap);
+
+ if (auto *CI = dyn_cast<CallInst>(&I))
+ for (auto &U : CI->operands())
+ if (U->getType()->isIntegerTy(1))
+ Changed |= runOnUse(U, PromotablePHINodes, Bool2IntMap);
+ }
+ }
+
+ return Changed;
}
bool runOnUse(Use &U, const PHINodeSet &PromotablePHINodes,
@@ -278,7 +278,7 @@ class PPCBoolRetToInt : public FunctionPass {
} // end anonymous namespace
-char PPCBoolRetToInt::ID = 0;
+const char PPCBoolRetToInt::ID = 0;
INITIALIZE_PASS(PPCBoolRetToInt, "ppc-bool-ret-to-int",
"Convert i1 constants to i32/i64 if they are returned", false,
false)
diff --git a/llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp b/llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp
index 3644e75609fc3..f3aa4a9791931 100644
--- a/llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp
@@ -158,7 +158,7 @@ class PPCBranchCoalescing : public MachineFunctionPass {
CoalescingCandidateInfo &TargetRegion) const;
public:
- static char ID;
+ static const char ID;
PPCBranchCoalescing() : MachineFunctionPass(ID) {}
@@ -184,7 +184,7 @@ class PPCBranchCoalescing : public MachineFunctionPass {
};
} // End anonymous namespace.
-char PPCBranchCoalescing::ID = 0;
+const char PPCBranchCoalescing::ID = 0;
/// createPPCBranchCoalescingPass - returns an instance of the Branch Coalescing
/// Pass
FunctionPass *llvm::createPPCBranchCoalescingPass() {
diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
index 5cb64e3c03ae7..fb0aa1ef93acc 100644
--- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
@@ -36,7 +36,7 @@ STATISTIC(NumPrefixedAligned,
namespace {
struct PPCBSel : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCBSel() : MachineFunctionPass(ID) {}
// The sizes of the basic blocks in the function (the first
@@ -63,7 +63,7 @@ namespace {
StringRef getPassName() const override { return "PowerPC Branch Selector"; }
};
- char PPCBSel::ID = 0;
+ const char PPCBSel::ID = 0;
}
INITIALIZE_PASS(PPCBSel, "ppc-branch-select", "PowerPC Branch Selector",
diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
index ef5f93d170408..76c029929e816 100644
--- a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
+++ b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
@@ -54,7 +54,7 @@ STATISTIC(NumNormalLoops, "Number of normal compare + branch loops generated");
namespace {
class PPCCTRLoops : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PPCCTRLoops() : MachineFunctionPass(ID) {}
@@ -77,7 +77,7 @@ class PPCCTRLoops : public MachineFunctionPass {
};
} // namespace
-char PPCCTRLoops::ID = 0;
+const char PPCCTRLoops::ID = 0;
INITIALIZE_PASS_BEGIN(PPCCTRLoops, DEBUG_TYPE, "PowerPC CTR loops generation",
false, false)
diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoopsVerify.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoopsVerify.cpp
index 6aa2f0c96d1dc..c58163a3028be 100644
--- a/llvm/lib/Target/PowerPC/PPCCTRLoopsVerify.cpp
+++ b/llvm/lib/Target/PowerPC/PPCCTRLoopsVerify.cpp
@@ -45,7 +45,7 @@ namespace {
struct PPCCTRLoopsVerify : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PPCCTRLoopsVerify() : MachineFunctionPass(ID) {
initializePPCCTRLoopsVerifyPass(*PassRegistry::getPassRegistry());
@@ -62,7 +62,7 @@ namespace {
MachineDominatorTree *MDT;
};
- char PPCCTRLoopsVerify::ID = 0;
+ const char PPCCTRLoopsVerify::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS_BEGIN(PPCCTRLoopsVerify, "ppc-ctr-loops-verify",
diff --git a/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp b/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp
index bb4178ba95daf..9188bb5f754c4 100644
--- a/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp
+++ b/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp
@@ -32,7 +32,7 @@ namespace {
// returns up, and create conditional returns, to avoid unnecessary
// branch-to-blr sequences.
struct PPCEarlyReturn : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCEarlyReturn() : MachineFunctionPass(ID) {}
const TargetInstrInfo *TII;
@@ -193,6 +193,6 @@ namespace {
INITIALIZE_PASS(PPCEarlyReturn, DEBUG_TYPE,
"PowerPC Early-Return Creation", false, false)
-char PPCEarlyReturn::ID = 0;
+const char PPCEarlyReturn::ID = 0;
FunctionPass*
llvm::createPPCEarlyReturnPass() { return new PPCEarlyReturn(); }
diff --git a/llvm/lib/Target/PowerPC/PPCExpandAtomicPseudoInsts.cpp b/llvm/lib/Target/PowerPC/PPCExpandAtomicPseudoInsts.cpp
index 0e095cc692caa..fe43d8324801d 100644
--- a/llvm/lib/Target/PowerPC/PPCExpandAtomicPseudoInsts.cpp
+++ b/llvm/lib/Target/PowerPC/PPCExpandAtomicPseudoInsts.cpp
@@ -30,7 +30,7 @@ class PPCExpandAtomicPseudo : public MachineFunctionPass {
public:
const PPCInstrInfo *TII;
const PPCRegisterInfo *TRI;
- static char ID;
+ static const char ID;
PPCExpandAtomicPseudo() : MachineFunctionPass(ID) {}
@@ -293,7 +293,7 @@ bool PPCExpandAtomicPseudo::expandAtomicCmpSwap128(
INITIALIZE_PASS(PPCExpandAtomicPseudo, DEBUG_TYPE, "PowerPC Expand Atomic",
false, false)
-char PPCExpandAtomicPseudo::ID = 0;
+const char PPCExpandAtomicPseudo::ID = 0;
FunctionPass *llvm::createPPCExpandAtomicPseudoPass() {
return new PPCExpandAtomicPseudo();
}
diff --git a/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp b/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
index be96d4d497f76..ab3916188be97 100644
--- a/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
+++ b/llvm/lib/Target/PowerPC/PPCGenScalarMASSEntries.cpp
@@ -29,7 +29,7 @@ namespace {
class PPCGenScalarMASSEntries : public ModulePass {
public:
- static char ID;
+ static const char ID;
PPCGenScalarMASSEntries() : ModulePass(ID) {
ScalarMASSFuncs = {
@@ -134,9 +134,9 @@ bool PPCGenScalarMASSEntries::runOnModule(Module &M) {
return Changed;
}
-char PPCGenScalarMASSEntries::ID = 0;
+const char PPCGenScalarMASSEntries::ID = 0;
-char &llvm::PPCGenScalarMASSEntriesID = PPCGenScalarMASSEntries::ID;
+const char &llvm::PPCGenScalarMASSEntriesID = PPCGenScalarMASSEntries::ID;
INITIALIZE_PASS(PPCGenScalarMASSEntries, DEBUG_TYPE,
"Generate Scalar MASS entries", false, false)
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index c34f4809278ae..a99fec11acc12 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -448,7 +448,7 @@ namespace {
class PPCDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit PPCDAGToDAGISelLegacy(PPCTargetMachine &tm,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -456,7 +456,7 @@ namespace {
};
} // end anonymous namespace
-char PPCDAGToDAGISelLegacy::ID = 0;
+const char PPCDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(PPCDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
index c8f96bf6f3044..61a4d7f1dda54 100644
--- a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -218,7 +218,7 @@ namespace {
class PPCLoopInstrFormPrep : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
PPCLoopInstrFormPrep(PPCTargetMachine &TM) : FunctionPass(ID), TM(&TM) {}
@@ -327,7 +327,7 @@ namespace {
} // end anonymous namespace
-char PPCLoopInstrFormPrep::ID = 0;
+const char PPCLoopInstrFormPrep::ID = 0;
static const char *name = "Prepare loop for ppc preferred instruction forms";
INITIALIZE_PASS_BEGIN(PPCLoopInstrFormPrep, DEBUG_TYPE, name, false, false)
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
diff --git a/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp b/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp
index 9c2b58a47392f..3dcc39f45cb62 100644
--- a/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp
@@ -37,7 +37,7 @@ static StringRef MASSVFuncs[] = {
class PPCLowerMASSVEntries : public ModulePass {
public:
- static char ID;
+ static const char ID;
PPCLowerMASSVEntries() : ModulePass(ID) {}
@@ -187,9 +187,9 @@ bool PPCLowerMASSVEntries::runOnModule(Module &M) {
return Changed;
}
-char PPCLowerMASSVEntries::ID = 0;
+const char PPCLowerMASSVEntries::ID = 0;
-char &llvm::PPCLowerMASSVEntriesID = PPCLowerMASSVEntries::ID;
+const char &llvm::PPCLowerMASSVEntriesID = PPCLowerMASSVEntries::ID;
INITIALIZE_PASS(PPCLowerMASSVEntries, DEBUG_TYPE, "Lower MASSV entries", false,
false)
diff --git a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
index 20df2210e33dd..10abab6ab92d9 100644
--- a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
@@ -107,7 +107,7 @@ namespace {
struct PPCMIPeephole : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const PPCInstrInfo *TII;
MachineFunction *MF;
MachineRegisterInfo *MRI;
@@ -2080,6 +2080,6 @@ INITIALIZE_PASS_DEPENDENCY(LiveVariablesWrapperPass)
INITIALIZE_PASS_END(PPCMIPeephole, DEBUG_TYPE,
"PowerPC MI Peephole Optimization", false, false)
-char PPCMIPeephole::ID = 0;
+const char PPCMIPeephole::ID = 0;
FunctionPass*
llvm::createPPCMIPeepholePass() { return new PPCMIPeephole(); }
diff --git a/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp b/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp
index e5f3ed8fc319a..ad9b23083560d 100644
--- a/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp
+++ b/llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp
@@ -94,7 +94,7 @@ static bool hasPCRelativeForm(MachineInstr &Use) {
class PPCPreEmitPeephole : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
PPCPreEmitPeephole() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -597,7 +597,7 @@ static bool hasPCRelativeForm(MachineInstr &Use) {
INITIALIZE_PASS(PPCPreEmitPeephole, DEBUG_TYPE, "PowerPC Pre-Emit Peephole",
false, false)
-char PPCPreEmitPeephole::ID = 0;
+const char PPCPreEmitPeephole::ID = 0;
FunctionPass *llvm::createPPCPreEmitPeepholePass() {
return new PPCPreEmitPeephole();
diff --git a/llvm/lib/Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp b/llvm/lib/Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp
index 5b6a6d6b95c52..8a8a5653dabfb 100644
--- a/llvm/lib/Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp
+++ b/llvm/lib/Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp
@@ -30,7 +30,7 @@ STATISTIC(NumIFuncs, "Number of IFuncs prepared");
namespace {
class PPCPrepareIFuncsOnAIX : public ModulePass {
public:
- static char ID;
+ static const char ID;
PPCPrepareIFuncsOnAIX() : ModulePass(ID) {}
@@ -42,7 +42,7 @@ class PPCPrepareIFuncsOnAIX : public ModulePass {
};
} // namespace
-char PPCPrepareIFuncsOnAIX::ID = 0;
+const char PPCPrepareIFuncsOnAIX::ID = 0;
INITIALIZE_PASS(PPCPrepareIFuncsOnAIX, DEBUG_TYPE,
"PPC Prepare for AIX IFunc lowering", false, false)
diff --git a/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp b/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
index e885767854b66..06c127cea610f 100644
--- a/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
+++ b/llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp
@@ -360,7 +360,7 @@ namespace {
class PPCReduceCRLogicals : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
struct CRLogicalOpInfo {
MachineInstr *MI;
// FIXME: If chains of copies are to be handled, this should be a vector.
@@ -735,6 +735,6 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(PPCReduceCRLogicals, DEBUG_TYPE,
"PowerPC Reduce CR logical Operation", false, false)
-char PPCReduceCRLogicals::ID = 0;
+const char PPCReduceCRLogicals::ID = 0;
FunctionPass*
llvm::createPPCReduceCRLogicalsPass() { return new PPCReduceCRLogicals(); }
diff --git a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
index 9b6ea276e1303..dbb45b2418cbc 100644
--- a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
@@ -37,7 +37,7 @@ using namespace llvm;
namespace {
struct PPCTLSDynamicCall : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCTLSDynamicCall() : MachineFunctionPass(ID) {}
const PPCInstrInfo *TII;
@@ -336,6 +336,6 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
INITIALIZE_PASS_END(PPCTLSDynamicCall, DEBUG_TYPE,
"PowerPC TLS Dynamic Call Fixup", false, false)
-char PPCTLSDynamicCall::ID = 0;
+const char PPCTLSDynamicCall::ID = 0;
FunctionPass*
llvm::createPPCTLSDynamicCallPass() { return new PPCTLSDynamicCall(); }
diff --git a/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp b/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp
index 5a45df736fdc1..9718054cb3594 100644
--- a/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp
@@ -79,7 +79,7 @@ namespace {
// returns up, and create conditional returns, to avoid unnecessary
// branch-to-blr sequences.
struct PPCTOCRegDeps : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCTOCRegDeps() : MachineFunctionPass(ID) {}
protected:
@@ -136,7 +136,7 @@ namespace {
INITIALIZE_PASS(PPCTOCRegDeps, DEBUG_TYPE,
"PowerPC TOC Register Dependencies", false, false)
-char PPCTOCRegDeps::ID = 0;
+const char PPCTOCRegDeps::ID = 0;
FunctionPass*
llvm::createPPCTOCRegDepsPass() { return new PPCTOCRegDeps(); }
diff --git a/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp b/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp
index 7e3ea606087b3..ca8febad4f918 100644
--- a/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp
+++ b/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp
@@ -55,7 +55,7 @@ namespace {
// (Altivec and scalar floating-point registers), we need to transform the
// copies into subregister copies with other restrictions.
struct PPCVSXFMAMutate : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCVSXFMAMutate() : MachineFunctionPass(ID) {}
LiveIntervals *LIS;
@@ -369,9 +369,9 @@ INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(PPCVSXFMAMutate, DEBUG_TYPE,
"PowerPC VSX FMA Mutation", false, false)
-char &llvm::PPCVSXFMAMutateID = PPCVSXFMAMutate::ID;
+const char &llvm::PPCVSXFMAMutateID = PPCVSXFMAMutate::ID;
-char PPCVSXFMAMutate::ID = 0;
+const char PPCVSXFMAMutate::ID = 0;
FunctionPass *llvm::createPPCVSXFMAMutatePass() {
return new PPCVSXFMAMutate();
}
diff --git a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
index 85a90992816e5..223b3365ff882 100644
--- a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+++ b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
@@ -94,7 +94,7 @@ enum SHValues {
struct PPCVSXSwapRemoval : public MachineFunctionPass {
- static char ID;
+ static const char ID;
const PPCInstrInfo *TII;
MachineFunction *MF;
MachineRegisterInfo *MRI;
@@ -1061,6 +1061,6 @@ INITIALIZE_PASS_BEGIN(PPCVSXSwapRemoval, DEBUG_TYPE,
INITIALIZE_PASS_END(PPCVSXSwapRemoval, DEBUG_TYPE,
"PowerPC VSX Swap Removal", false, false)
-char PPCVSXSwapRemoval::ID = 0;
+const char PPCVSXSwapRemoval::ID = 0;
FunctionPass*
llvm::createPPCVSXSwapRemovalPass() { return new PPCVSXSwapRemoval(); }
diff --git a/llvm/lib/Target/PowerPC/PPCVSXWACCCopy.cpp b/llvm/lib/Target/PowerPC/PPCVSXWACCCopy.cpp
index 741aa20eab479..a4ad6c0a224da 100644
--- a/llvm/lib/Target/PowerPC/PPCVSXWACCCopy.cpp
+++ b/llvm/lib/Target/PowerPC/PPCVSXWACCCopy.cpp
@@ -33,7 +33,7 @@ namespace {
// (Altivec and scalar floating-point registers), we need to transform the
// copies into subregister copies with other restrictions.
struct PPCVSXWACCCopy : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PPCVSXWACCCopy() : MachineFunctionPass(ID) {}
const TargetInstrInfo *TII;
@@ -176,5 +176,5 @@ struct PPCVSXWACCCopy : public MachineFunctionPass {
INITIALIZE_PASS(PPCVSXWACCCopy, DEBUG_TYPE, "PowerPC VSX Copy Legalization",
false, false)
-char PPCVSXWACCCopy::ID = 0;
+const char PPCVSXWACCCopy::ID = 0;
FunctionPass *llvm::createPPCVSXWACCCopyPass() { return new PPCVSXWACCCopy(); }
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp b/llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
index 895c3dbcb2c18..bb4aa5ef6b472 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
@@ -82,7 +82,7 @@ RISCVO0PreLegalizerCombinerImpl::RISCVO0PreLegalizerCombinerImpl(
class RISCVO0PreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVO0PreLegalizerCombiner();
@@ -137,7 +137,7 @@ bool RISCVO0PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char RISCVO0PreLegalizerCombiner::ID = 0;
+const char RISCVO0PreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(RISCVO0PreLegalizerCombiner, DEBUG_TYPE,
"Combine RISC-V machine instrs before legalization",
false, false)
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp b/llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
index f2b216be1db15..126afebb56f8d 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
@@ -138,7 +138,7 @@ RISCVPostLegalizerCombinerImpl::RISCVPostLegalizerCombinerImpl(
class RISCVPostLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVPostLegalizerCombiner();
@@ -201,7 +201,7 @@ bool RISCVPostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char RISCVPostLegalizerCombiner::ID = 0;
+const char RISCVPostLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(RISCVPostLegalizerCombiner, DEBUG_TYPE,
"Combine RISC-V MachineInstrs after legalization", false,
false)
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVPreLegalizerCombiner.cpp b/llvm/lib/Target/RISCV/GISel/RISCVPreLegalizerCombiner.cpp
index d955205d066d4..5dc9cc2762a12 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVPreLegalizerCombiner.cpp
@@ -86,7 +86,7 @@ RISCVPreLegalizerCombinerImpl::RISCVPreLegalizerCombinerImpl(
class RISCVPreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVPreLegalizerCombiner();
@@ -154,7 +154,7 @@ bool RISCVPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char RISCVPreLegalizerCombiner::ID = 0;
+const char RISCVPreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(RISCVPreLegalizerCombiner, DEBUG_TYPE,
"Combine RISC-V machine instrs before legalization", false,
false)
diff --git a/llvm/lib/Target/RISCV/RISCV.h b/llvm/lib/Target/RISCV/RISCV.h
index 048db205e2289..ad051ab0e83d4 100644
--- a/llvm/lib/Target/RISCV/RISCV.h
+++ b/llvm/lib/Target/RISCV/RISCV.h
@@ -81,7 +81,7 @@ void initializeRISCVExpandAtomicPseudoPass(PassRegistry &);
FunctionPass *createRISCVInsertVSETVLIPass();
void initializeRISCVInsertVSETVLIPass(PassRegistry &);
-extern char &RISCVInsertVSETVLIID;
+extern const char &RISCVInsertVSETVLIID;
FunctionPass *createRISCVPostRAExpandPseudoPass();
void initializeRISCVPostRAExpandPseudoPass(PassRegistry &);
diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
index 9740123d3859e..73277d341624a 100644
--- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
@@ -58,7 +58,7 @@ extern const SubtargetFeatureKV RISCVFeatureKV[RISCV::NumSubtargetFeatures];
namespace {
class RISCVAsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
const RISCVSubtarget *STI;
@@ -1221,7 +1221,7 @@ void RISCVAsmPrinter::emitMachineConstantPoolValue(
OutStreamer->emitValue(Expr, Size);
}
-char RISCVAsmPrinter::ID = 0;
+const char RISCVAsmPrinter::ID = 0;
INITIALIZE_PASS(RISCVAsmPrinter, "riscv-asm-printer", "RISC-V Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp b/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
index 1ee4c66a5bde5..df54b283f7aed 100644
--- a/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
+++ b/llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
@@ -55,7 +55,7 @@ class RISCVCodeGenPrepare : public InstVisitor<RISCVCodeGenPrepare, bool> {
namespace {
class RISCVCodeGenPrepareLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVCodeGenPrepareLegacyPass() : FunctionPass(ID) {}
@@ -309,7 +309,7 @@ INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_END(RISCVCodeGenPrepareLegacyPass, DEBUG_TYPE, PASS_NAME, false,
false)
-char RISCVCodeGenPrepareLegacyPass::ID = 0;
+const char RISCVCodeGenPrepareLegacyPass::ID = 0;
FunctionPass *llvm::createRISCVCodeGenPrepareLegacyPass() {
return new RISCVCodeGenPrepareLegacyPass();
diff --git a/llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp b/llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp
index 5d3d9b5c4cf03..30e17b6d9ccb6 100644
--- a/llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp
+++ b/llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp
@@ -27,7 +27,7 @@ STATISTIC(NumDeadDefsReplaced, "Number of dead definitions replaced");
namespace {
class RISCVDeadRegisterDefinitions : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVDeadRegisterDefinitions() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -46,7 +46,7 @@ class RISCVDeadRegisterDefinitions : public MachineFunctionPass {
};
} // end anonymous namespace
-char RISCVDeadRegisterDefinitions::ID = 0;
+const char RISCVDeadRegisterDefinitions::ID = 0;
INITIALIZE_PASS(RISCVDeadRegisterDefinitions, DEBUG_TYPE,
RISCV_DEAD_REG_DEF_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp b/llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp
index 9bd66a43717e7..3e7896a060289 100644
--- a/llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp
+++ b/llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp
@@ -32,7 +32,7 @@ class RISCVExpandAtomicPseudo : public MachineFunctionPass {
public:
const RISCVSubtarget *STI;
const RISCVInstrInfo *TII;
- static char ID;
+ static const char ID;
RISCVExpandAtomicPseudo() : MachineFunctionPass(ID) {}
@@ -68,7 +68,7 @@ class RISCVExpandAtomicPseudo : public MachineFunctionPass {
#endif
};
-char RISCVExpandAtomicPseudo::ID = 0;
+const char RISCVExpandAtomicPseudo::ID = 0;
bool RISCVExpandAtomicPseudo::runOnMachineFunction(MachineFunction &MF) {
STI = &MF.getSubtarget<RISCVSubtarget>();
diff --git a/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp b/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
index 8376a9c2e2236..a0e69a6372f25 100644
--- a/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
@@ -32,7 +32,7 @@ class RISCVExpandPseudo : public MachineFunctionPass {
public:
const RISCVSubtarget *STI;
const RISCVInstrInfo *TII;
- static char ID;
+ static const char ID;
RISCVExpandPseudo() : MachineFunctionPass(ID) {}
@@ -71,7 +71,7 @@ class RISCVExpandPseudo : public MachineFunctionPass {
#endif
};
-char RISCVExpandPseudo::ID = 0;
+const char RISCVExpandPseudo::ID = 0;
bool RISCVExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
STI = &MF.getSubtarget<RISCVSubtarget>();
@@ -586,7 +586,7 @@ class RISCVPreRAExpandPseudo : public MachineFunctionPass {
public:
const RISCVSubtarget *STI;
const RISCVInstrInfo *TII;
- static char ID;
+ static const char ID;
RISCVPreRAExpandPseudo() : MachineFunctionPass(ID) {}
@@ -635,7 +635,7 @@ class RISCVPreRAExpandPseudo : public MachineFunctionPass {
#endif
};
-char RISCVPreRAExpandPseudo::ID = 0;
+const char RISCVPreRAExpandPseudo::ID = 0;
bool RISCVPreRAExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
STI = &MF.getSubtarget<RISCVSubtarget>();
diff --git a/llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp b/llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
index 87c08a500545a..83c4ee50debe9 100644
--- a/llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFoldMemOffset.cpp
@@ -29,7 +29,7 @@ namespace {
class RISCVFoldMemOffset : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVFoldMemOffset() : MachineFunctionPass(ID) {}
@@ -72,7 +72,7 @@ class FoldableOffset {
} // end anonymous namespace
-char RISCVFoldMemOffset::ID = 0;
+const char RISCVFoldMemOffset::ID = 0;
INITIALIZE_PASS(RISCVFoldMemOffset, DEBUG_TYPE, RISCV_FOLD_MEM_OFFSET_NAME,
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp b/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
index 25b5af8324e64..634a8b2a0afa9 100644
--- a/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
@@ -46,7 +46,7 @@ class RISCVGatherScatterLowering : public FunctionPass {
DenseMap<GetElementPtrInst *, std::pair<Value *, Value *>> StridedAddrs;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
RISCVGatherScatterLowering() : FunctionPass(ID) {}
@@ -75,7 +75,7 @@ class RISCVGatherScatterLowering : public FunctionPass {
} // end anonymous namespace
-char RISCVGatherScatterLowering::ID = 0;
+const char RISCVGatherScatterLowering::ID = 0;
INITIALIZE_PASS(RISCVGatherScatterLowering, DEBUG_TYPE,
"RISC-V gather/scatter lowering pass", false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index b51ed9cddbeb2..a8d289c716385 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -4633,7 +4633,7 @@ FunctionPass *llvm::createRISCVISelDag(RISCVTargetMachine &TM,
return new RISCVDAGToDAGISelLegacy(TM, OptLevel);
}
-char RISCVDAGToDAGISelLegacy::ID = 0;
+const char RISCVDAGToDAGISelLegacy::ID = 0;
RISCVDAGToDAGISelLegacy::RISCVDAGToDAGISelLegacy(RISCVTargetMachine &TM,
CodeGenOptLevel OptLevel)
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
index 19ee103af1425..700c641d46634 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
@@ -206,7 +206,7 @@ class RISCVDAGToDAGISel : public SelectionDAGISel {
class RISCVDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit RISCVDAGToDAGISelLegacy(RISCVTargetMachine &TargetMachine,
CodeGenOptLevel OptLevel);
};
diff --git a/llvm/lib/Target/RISCV/RISCVIndirectBranchTracking.cpp b/llvm/lib/Target/RISCV/RISCVIndirectBranchTracking.cpp
index 0fc139a30ae76..26aabaa44ef5c 100644
--- a/llvm/lib/Target/RISCV/RISCVIndirectBranchTracking.cpp
+++ b/llvm/lib/Target/RISCV/RISCVIndirectBranchTracking.cpp
@@ -33,7 +33,7 @@ cl::opt<uint32_t> PreferredLandingPadLabel(
namespace {
class RISCVIndirectBranchTracking : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVIndirectBranchTracking() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return PASS_NAME; }
@@ -49,7 +49,7 @@ class RISCVIndirectBranchTracking : public MachineFunctionPass {
INITIALIZE_PASS(RISCVIndirectBranchTracking, DEBUG_TYPE, PASS_NAME, false,
false)
-char RISCVIndirectBranchTracking::ID = 0;
+const char RISCVIndirectBranchTracking::ID = 0;
FunctionPass *llvm::createRISCVIndirectBranchTrackingPass() {
return new RISCVIndirectBranchTracking();
diff --git a/llvm/lib/Target/RISCV/RISCVInsertReadWriteCSR.cpp b/llvm/lib/Target/RISCV/RISCVInsertReadWriteCSR.cpp
index 7b9e9fb988bc6..818fa3a7aaea6 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertReadWriteCSR.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertReadWriteCSR.cpp
@@ -34,7 +34,7 @@ class RISCVInsertReadWriteCSR : public MachineFunctionPass {
const TargetInstrInfo *TII;
public:
- static char ID;
+ static const char ID;
RISCVInsertReadWriteCSR() : MachineFunctionPass(ID) {}
@@ -56,7 +56,7 @@ class RISCVInsertReadWriteCSR : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVInsertReadWriteCSR::ID = 0;
+const char RISCVInsertReadWriteCSR::ID = 0;
INITIALIZE_PASS(RISCVInsertReadWriteCSR, DEBUG_TYPE,
RISCV_INSERT_READ_WRITE_CSR_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index 8ba00c815fa0e..1d01ea3c4e2b8 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -100,7 +100,7 @@ class RISCVInsertVSETVLI : public MachineFunctionPass {
std::queue<const MachineBasicBlock *> WorkList;
public:
- static char ID;
+ static const char ID;
RISCVInsertVSETVLI() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -145,8 +145,8 @@ class RISCVInsertVSETVLI : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVInsertVSETVLI::ID = 0;
-char &llvm::RISCVInsertVSETVLIID = RISCVInsertVSETVLI::ID;
+const char RISCVInsertVSETVLI::ID = 0;
+const char &llvm::RISCVInsertVSETVLIID = RISCVInsertVSETVLI::ID;
INITIALIZE_PASS(RISCVInsertVSETVLI, DEBUG_TYPE, RISCV_INSERT_VSETVLI_NAME,
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp b/llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp
index c58a5c07a34f7..db781118ae357 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp
@@ -198,7 +198,7 @@ class RISCVInsertWriteVXRM : public MachineFunctionPass {
std::queue<const MachineBasicBlock *> WorkList;
public:
- static char ID;
+ static const char ID;
RISCVInsertWriteVXRM() : MachineFunctionPass(ID) {}
@@ -222,7 +222,7 @@ class RISCVInsertWriteVXRM : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVInsertWriteVXRM::ID = 0;
+const char RISCVInsertWriteVXRM::ID = 0;
INITIALIZE_PASS(RISCVInsertWriteVXRM, DEBUG_TYPE, RISCV_INSERT_WRITE_VXRM_NAME,
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVLandingPadSetup.cpp b/llvm/lib/Target/RISCV/RISCVLandingPadSetup.cpp
index 072694e123084..1bc8deb2853a6 100644
--- a/llvm/lib/Target/RISCV/RISCVLandingPadSetup.cpp
+++ b/llvm/lib/Target/RISCV/RISCVLandingPadSetup.cpp
@@ -28,7 +28,7 @@ namespace {
class RISCVLandingPadSetup : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVLandingPadSetup() : MachineFunctionPass(ID) {}
@@ -81,7 +81,7 @@ bool RISCVLandingPadSetup::runOnMachineFunction(MachineFunction &MF) {
INITIALIZE_PASS(RISCVLandingPadSetup, DEBUG_TYPE, PASS_NAME, false, false)
-char RISCVLandingPadSetup::ID = 0;
+const char RISCVLandingPadSetup::ID = 0;
FunctionPass *llvm::createRISCVLandingPadSetupPass() {
return new RISCVLandingPadSetup();
diff --git a/llvm/lib/Target/RISCV/RISCVLateBranchOpt.cpp b/llvm/lib/Target/RISCV/RISCVLateBranchOpt.cpp
index 28fb0b2da09d5..21cda2f1c37ff 100644
--- a/llvm/lib/Target/RISCV/RISCVLateBranchOpt.cpp
+++ b/llvm/lib/Target/RISCV/RISCVLateBranchOpt.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
namespace {
struct RISCVLateBranchOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
RISCVLateBranchOpt() : MachineFunctionPass(ID) {}
@@ -41,7 +41,7 @@ struct RISCVLateBranchOpt : public MachineFunctionPass {
};
} // namespace
-char RISCVLateBranchOpt::ID = 0;
+const char RISCVLateBranchOpt::ID = 0;
INITIALIZE_PASS(RISCVLateBranchOpt, "riscv-late-branch-opt",
RISCV_LATE_BRANCH_OPT_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp
index 6c80735c5ca73..621f86384457a 100644
--- a/llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp
@@ -49,7 +49,7 @@ STATISTIC(NumSD2SW, "Number of SD instructions split back to SW");
namespace {
struct RISCVLoadStoreOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
bool runOnMachineFunction(MachineFunction &Fn) override;
RISCVLoadStoreOpt() : MachineFunctionPass(ID) {}
@@ -106,7 +106,7 @@ struct RISCVLoadStoreOpt : public MachineFunctionPass {
};
} // end anonymous namespace
-char RISCVLoadStoreOpt::ID = 0;
+const char RISCVLoadStoreOpt::ID = 0;
INITIALIZE_PASS(RISCVLoadStoreOpt, DEBUG_TYPE, RISCV_LOAD_STORE_OPT_NAME, false,
false)
diff --git a/llvm/lib/Target/RISCV/RISCVMakeCompressible.cpp b/llvm/lib/Target/RISCV/RISCVMakeCompressible.cpp
index 68a752534d4fa..f9d4d4537d4a8 100644
--- a/llvm/lib/Target/RISCV/RISCVMakeCompressible.cpp
+++ b/llvm/lib/Target/RISCV/RISCVMakeCompressible.cpp
@@ -80,7 +80,7 @@ using namespace llvm;
namespace {
struct RISCVMakeCompressibleOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -90,7 +90,7 @@ struct RISCVMakeCompressibleOpt : public MachineFunctionPass {
};
} // namespace
-char RISCVMakeCompressibleOpt::ID = 0;
+const char RISCVMakeCompressibleOpt::ID = 0;
INITIALIZE_PASS(RISCVMakeCompressibleOpt, "riscv-make-compressible",
RISCV_COMPRESS_INSTRS_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp b/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
index be15f17e84298..9b51b7735971f 100644
--- a/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+++ b/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
@@ -30,7 +30,7 @@ class RISCVMergeBaseOffsetOpt : public MachineFunctionPass {
MachineRegisterInfo *MRI;
public:
- static char ID;
+ static const char ID;
bool runOnMachineFunction(MachineFunction &Fn) override;
bool detectFoldable(MachineInstr &Hi, MachineInstr *&Lo);
@@ -61,7 +61,7 @@ class RISCVMergeBaseOffsetOpt : public MachineFunctionPass {
};
} // end anonymous namespace
-char RISCVMergeBaseOffsetOpt::ID = 0;
+const char RISCVMergeBaseOffsetOpt::ID = 0;
INITIALIZE_PASS(RISCVMergeBaseOffsetOpt, DEBUG_TYPE,
RISCV_MERGE_BASE_OFFSET_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVMoveMerger.cpp b/llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
index efea1b422d582..d53287deb6b83 100644
--- a/llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+++ b/llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
namespace {
struct RISCVMoveMerge : public MachineFunctionPass {
- static char ID;
+ static const char ID;
RISCVMoveMerge() : MachineFunctionPass(ID) {}
@@ -52,7 +52,7 @@ struct RISCVMoveMerge : public MachineFunctionPass {
StringRef getPassName() const override { return RISCV_MOVE_MERGE_NAME; }
};
-char RISCVMoveMerge::ID = 0;
+const char RISCVMoveMerge::ID = 0;
} // end of anonymous namespace
diff --git a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
index 8baae84111a9c..afedcbe9843fb 100644
--- a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+++ b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
@@ -62,7 +62,7 @@ namespace {
class RISCVOptWInstrs : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVOptWInstrs() : MachineFunctionPass(ID) {}
@@ -83,7 +83,7 @@ class RISCVOptWInstrs : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVOptWInstrs::ID = 0;
+const char RISCVOptWInstrs::ID = 0;
INITIALIZE_PASS(RISCVOptWInstrs, DEBUG_TYPE, RISCV_OPT_W_INSTRS_NAME, false,
false)
diff --git a/llvm/lib/Target/RISCV/RISCVPostRAExpandPseudoInsts.cpp b/llvm/lib/Target/RISCV/RISCVPostRAExpandPseudoInsts.cpp
index 08e2b835547ca..d8c8bf88b07a6 100644
--- a/llvm/lib/Target/RISCV/RISCVPostRAExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/RISCV/RISCVPostRAExpandPseudoInsts.cpp
@@ -27,7 +27,7 @@ namespace {
class RISCVPostRAExpandPseudo : public MachineFunctionPass {
public:
const RISCVInstrInfo *TII;
- static char ID;
+ static const char ID;
RISCVPostRAExpandPseudo() : MachineFunctionPass(ID) {}
@@ -45,7 +45,7 @@ class RISCVPostRAExpandPseudo : public MachineFunctionPass {
bool expandMovAddr(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
};
-char RISCVPostRAExpandPseudo::ID = 0;
+const char RISCVPostRAExpandPseudo::ID = 0;
bool RISCVPostRAExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
TII = static_cast<const RISCVInstrInfo *>(MF.getSubtarget().getInstrInfo());
diff --git a/llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp b/llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
index bf1f69f8e8d93..fa8c52ebdac6b 100644
--- a/llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
+++ b/llvm/lib/Target/RISCV/RISCVPromoteConstant.cpp
@@ -43,7 +43,7 @@ namespace {
class RISCVPromoteConstant : public ModulePass {
public:
- static char ID;
+ static const char ID;
RISCVPromoteConstant() : ModulePass(ID) {}
StringRef getPassName() const override { return RISCV_PROMOTE_CONSTANT_NAME; }
@@ -75,7 +75,7 @@ class RISCVPromoteConstant : public ModulePass {
};
} // end anonymous namespace
-char RISCVPromoteConstant::ID = 0;
+const char RISCVPromoteConstant::ID = 0;
INITIALIZE_PASS(RISCVPromoteConstant, DEBUG_TYPE, RISCV_PROMOTE_CONSTANT_NAME,
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
index eae7e8697f0ad..8eebad8dc4f7d 100644
--- a/llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
@@ -21,7 +21,7 @@ using namespace llvm;
namespace {
struct RISCVPushPopOpt : public MachineFunctionPass {
- static char ID;
+ static const char ID;
RISCVPushPopOpt() : MachineFunctionPass(ID) {}
@@ -39,7 +39,7 @@ struct RISCVPushPopOpt : public MachineFunctionPass {
StringRef getPassName() const override { return RISCV_PUSH_POP_OPT_NAME; }
};
-char RISCVPushPopOpt::ID = 0;
+const char RISCVPushPopOpt::ID = 0;
} // end of anonymous namespace
diff --git a/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp b/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
index ccdeb22b29226..23dddf0031ed4 100644
--- a/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
+++ b/llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
@@ -45,7 +45,7 @@ class RISCVRedundantCopyElimination : public MachineFunctionPass {
const TargetInstrInfo *TII;
public:
- static char ID;
+ static const char ID;
RISCVRedundantCopyElimination() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -63,7 +63,7 @@ class RISCVRedundantCopyElimination : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVRedundantCopyElimination::ID = 0;
+const char RISCVRedundantCopyElimination::ID = 0;
INITIALIZE_PASS(RISCVRedundantCopyElimination, "riscv-copyelim",
"RISC-V Redundant Copy Elimination", false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 638bf12e423a1..e9c92332e5325 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -67,7 +67,7 @@ class RISCVVLOptimizer : public MachineFunctionPass {
const TargetInstrInfo *TII;
public:
- static char ID;
+ static const char ID;
RISCVVLOptimizer() : MachineFunctionPass(ID) {}
@@ -147,7 +147,7 @@ struct OperandInfo {
} // end anonymous namespace
-char RISCVVLOptimizer::ID = 0;
+const char RISCVVLOptimizer::ID = 0;
INITIALIZE_PASS_BEGIN(RISCVVLOptimizer, DEBUG_TYPE, PASS_NAME, false, false)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_END(RISCVVLOptimizer, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp b/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp
index d72d27c983ada..30cfb5460c336 100644
--- a/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVMV0Elimination.cpp
@@ -44,7 +44,7 @@ namespace {
class RISCVVMV0Elimination : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVVMV0Elimination() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -64,7 +64,7 @@ class RISCVVMV0Elimination : public MachineFunctionPass {
} // namespace
-char RISCVVMV0Elimination::ID = 0;
+const char RISCVVMV0Elimination::ID = 0;
INITIALIZE_PASS(RISCVVMV0Elimination, DEBUG_TYPE, "RISC-V VMV0 Elimination",
false, false)
diff --git a/llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp b/llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
index b00244af1a875..bb0bc56b0f20e 100644
--- a/llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
@@ -42,7 +42,7 @@ namespace {
class RISCVVectorPeephole : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
const TargetInstrInfo *TII;
MachineRegisterInfo *MRI;
const TargetRegisterInfo *TRI;
@@ -80,7 +80,7 @@ class RISCVVectorPeephole : public MachineFunctionPass {
} // namespace
-char RISCVVectorPeephole::ID = 0;
+const char RISCVVectorPeephole::ID = 0;
INITIALIZE_PASS(RISCVVectorPeephole, DEBUG_TYPE, "RISC-V Fold Masks", false,
false)
diff --git a/llvm/lib/Target/RISCV/RISCVZacasABIFix.cpp b/llvm/lib/Target/RISCV/RISCVZacasABIFix.cpp
index 613b434e9222a..44af87653d997 100644
--- a/llvm/lib/Target/RISCV/RISCVZacasABIFix.cpp
+++ b/llvm/lib/Target/RISCV/RISCVZacasABIFix.cpp
@@ -35,7 +35,7 @@ class RISCVZacasABIFix : public FunctionPass,
const RISCVSubtarget *ST;
public:
- static char ID;
+ static const char ID;
RISCVZacasABIFix() : FunctionPass(ID) {}
@@ -87,7 +87,7 @@ INITIALIZE_PASS_BEGIN(RISCVZacasABIFix, DEBUG_TYPE, PASS_NAME, false, false)
INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
INITIALIZE_PASS_END(RISCVZacasABIFix, DEBUG_TYPE, PASS_NAME, false, false)
-char RISCVZacasABIFix::ID = 0;
+const char RISCVZacasABIFix::ID = 0;
FunctionPass *llvm::createRISCVZacasABIFixPass() {
return new RISCVZacasABIFix();
diff --git a/llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp
index c7bcee5a37cbc..970b37320fea1 100644
--- a/llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp
@@ -62,7 +62,7 @@ namespace {
//===----------------------------------------------------------------------===//
class RISCVPreAllocZilsdOpt : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
RISCVPreAllocZilsdOpt() : MachineFunctionPass(ID) {}
@@ -115,7 +115,7 @@ class RISCVPreAllocZilsdOpt : public MachineFunctionPass {
} // end anonymous namespace
-char RISCVPreAllocZilsdOpt::ID = 0;
+const char RISCVPreAllocZilsdOpt::ID = 0;
INITIALIZE_PASS_BEGIN(RISCVPreAllocZilsdOpt, "riscv-prera-zilsd-opt",
"RISC-V pre-allocation Zilsd optimization", false, false)
diff --git a/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp b/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp
index 0798483462e18..c8554cb0c1743 100644
--- a/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.cpp
@@ -311,7 +311,7 @@ ConvergenceRegionInfo llvm::SPIRV::getConvergenceRegions(Function &F,
return Analyzer.analyze();
}
-char SPIRVConvergenceRegionAnalysisWrapperPass::ID = 0;
+const char SPIRVConvergenceRegionAnalysisWrapperPass::ID = 0;
SPIRVConvergenceRegionAnalysisWrapperPass::
SPIRVConvergenceRegionAnalysisWrapperPass()
diff --git a/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.h b/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.h
index 7f4e1a1791e9e..96f825f3a0c4d 100644
--- a/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.h
+++ b/llvm/lib/Target/SPIRV/Analysis/SPIRVConvergenceRegionAnalysis.h
@@ -147,7 +147,7 @@ class SPIRVConvergenceRegionAnalysisWrapperPass : public FunctionPass {
SPIRV::ConvergenceRegionInfo CRI;
public:
- static char ID;
+ static const char ID;
SPIRVConvergenceRegionAnalysisWrapperPass();
diff --git a/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp b/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
index 970b83de5ee33..c1b909601523f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
@@ -52,7 +52,7 @@ class SPIRVAsmPrinter : public AsmPrinter {
std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer), ID), ModuleSectionsEmitted(false),
ST(nullptr), TII(nullptr), MAI(nullptr) {}
- static char ID;
+ static const char ID;
bool ModuleSectionsEmitted;
const SPIRVSubtarget *ST;
const SPIRVInstrInfo *TII;
@@ -867,7 +867,7 @@ bool SPIRVAsmPrinter::doInitialization(Module &M) {
return AsmPrinter::doInitialization(M);
}
-char SPIRVAsmPrinter::ID = 0;
+const char SPIRVAsmPrinter::ID = 0;
INITIALIZE_PASS(SPIRVAsmPrinter, "spirv-asm-printer", "SPIRV Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVCBufferAccess.cpp b/llvm/lib/Target/SPIRV/SPIRVCBufferAccess.cpp
index 227d8716d974a..f2ed7d8f21258 100644
--- a/llvm/lib/Target/SPIRV/SPIRVCBufferAccess.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVCBufferAccess.cpp
@@ -138,9 +138,9 @@ class SPIRVCBufferAccessLegacy : public ModulePass {
StringRef getPassName() const override { return "SPIRV CBuffer Access"; }
SPIRVCBufferAccessLegacy() : ModulePass(ID) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char SPIRVCBufferAccessLegacy::ID = 0;
+const char SPIRVCBufferAccessLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(SPIRVCBufferAccessLegacy, DEBUG_TYPE, "SPIRV CBuffer Access",
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index bf6d1d7a7328c..05ae045b8ec5a 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -246,7 +246,7 @@ class SPIRVEmitIntrinsics
Instruction *buildLogicalAccessChainFromGEP(GetElementPtrInst &GEP);
public:
- static char ID;
+ static const char ID;
SPIRVEmitIntrinsics(SPIRVTargetMachine *TM = nullptr)
: ModulePass(ID), TM(TM) {}
Instruction *visitInstruction(Instruction &I) { return &I; }
@@ -310,7 +310,7 @@ Value *getPointerRoot(Value *I) {
} // namespace
-char SPIRVEmitIntrinsics::ID = 0;
+const char SPIRVEmitIntrinsics::ID = 0;
INITIALIZE_PASS(SPIRVEmitIntrinsics, "emit-intrinsics", "SPIRV emit intrinsics",
false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
index 318ef0679ba03..f42085e4c5207 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
@@ -30,7 +30,7 @@ using namespace llvm;
namespace {
struct SPIRVEmitNonSemanticDI : public MachineFunctionPass {
- static char ID;
+ static const char ID;
SPIRVTargetMachine *TM;
SPIRVEmitNonSemanticDI(SPIRVTargetMachine *TM = nullptr)
: MachineFunctionPass(ID), TM(TM) {}
@@ -46,7 +46,7 @@ struct SPIRVEmitNonSemanticDI : public MachineFunctionPass {
INITIALIZE_PASS(SPIRVEmitNonSemanticDI, DEBUG_TYPE,
"SPIRV NonSemantic.Shader.DebugInfo.100 emitter", false, false)
-char SPIRVEmitNonSemanticDI::ID = 0;
+const char SPIRVEmitNonSemanticDI::ID = 0;
MachineFunctionPass *
llvm::createSPIRVEmitNonSemanticDIPass(SPIRVTargetMachine *TM) {
diff --git a/llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp b/llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp
index f7be2a1bef7b5..b56a2c4d5d702 100644
--- a/llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.cpp
@@ -30,7 +30,7 @@ using namespace llvm;
namespace {
class SPIRVLegalizeImplicitBinding : public ModulePass {
public:
- static char ID;
+ static const char ID;
SPIRVLegalizeImplicitBinding() : ModulePass(ID) {}
StringRef getPassName() const override {
return "SPIRV Legalize Implicit Binding";
@@ -214,7 +214,7 @@ bool SPIRVLegalizeImplicitBinding::runOnModule(Module &M) {
}
} // namespace
-char SPIRVLegalizeImplicitBinding::ID = 0;
+const char SPIRVLegalizeImplicitBinding::ID = 0;
INITIALIZE_PASS(SPIRVLegalizeImplicitBinding, "legalize-spirv-implicit-binding",
"Legalize SPIR-V implicit bindings", false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp b/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
index 7d745847468d1..1d66107b5202f 100644
--- a/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
@@ -456,11 +456,11 @@ class SPIRVLegalizePointerCast : public FunctionPass {
std::vector<Instruction *> DeadInstructions;
public:
- static char ID;
+ static const char ID;
};
} // namespace
-char SPIRVLegalizePointerCast::ID = 0;
+const char SPIRVLegalizePointerCast::ID = 0;
INITIALIZE_PASS(SPIRVLegalizePointerCast, "spirv-legalize-bitcast",
"SPIRV legalize bitcast pass", false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp b/llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp
index ac51aa9ea93a8..1890665b17dbd 100644
--- a/llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp
@@ -86,7 +86,7 @@ class SPIRVLegalizeZeroSizeArraysImpl
class SPIRVLegalizeZeroSizeArraysLegacy : public ModulePass {
public:
- static char ID;
+ static const char ID;
SPIRVLegalizeZeroSizeArraysLegacy(const SPIRVTargetMachine &TM)
: ModulePass(ID), TM(TM) {}
StringRef getPassName() const override {
@@ -346,7 +346,7 @@ PreservedAnalyses SPIRVLegalizeZeroSizeArrays::run(Module &M,
return PreservedAnalyses::all();
}
-char SPIRVLegalizeZeroSizeArraysLegacy::ID = 0;
+const char SPIRVLegalizeZeroSizeArraysLegacy::ID = 0;
INITIALIZE_PASS(SPIRVLegalizeZeroSizeArraysLegacy,
"spirv-legalize-zero-size-arrays",
diff --git a/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp b/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
index aba9cf7962e68..34cfc0f9cee5a 100644
--- a/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp
@@ -33,7 +33,7 @@ namespace {
class SPIRVMergeRegionExitTargets : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVMergeRegionExitTargets() : FunctionPass(ID) {}
@@ -267,7 +267,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
};
} // namespace
-char SPIRVMergeRegionExitTargets::ID = 0;
+const char SPIRVMergeRegionExitTargets::ID = 0;
INITIALIZE_PASS_BEGIN(SPIRVMergeRegionExitTargets, "split-region-exit-blocks",
"SPIRV split region exit blocks", false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index ecdf1c47d6926..89c92758f8d67 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -51,7 +51,7 @@ struct AvoidCapabilitiesSet {
AvoidCapabilitiesSet() { S.insert_range(AvoidCapabilities); }
};
-char llvm::SPIRVModuleAnalysis::ID = 0;
+const char llvm::SPIRVModuleAnalysis::ID = 0;
INITIALIZE_PASS(SPIRVModuleAnalysis, DEBUG_TYPE, "SPIRV module analysis", true,
true)
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
index 44b6c66d361bf..ee49b0ce181d2 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
@@ -219,7 +219,7 @@ using InstrTraces = std::set<InstrSignature>;
using InstrGRegsMap = std::map<SmallVector<size_t>, unsigned>;
struct SPIRVModuleAnalysis : public ModulePass {
- static char ID;
+ static const char ID;
public:
SPIRVModuleAnalysis()
diff --git a/llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp b/llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
index 198654b0564b1..7aa417305f2dd 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
@@ -29,7 +29,7 @@ using namespace llvm;
namespace {
class SPIRVPostLegalizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVPostLegalizer() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
};
@@ -583,7 +583,7 @@ bool SPIRVPostLegalizer::runOnMachineFunction(MachineFunction &MF) {
INITIALIZE_PASS(SPIRVPostLegalizer, DEBUG_TYPE, "SPIRV post legalizer", false,
false)
-char SPIRVPostLegalizer::ID = 0;
+const char SPIRVPostLegalizer::ID = 0;
FunctionPass *llvm::createSPIRVPostLegalizerPass() {
return new SPIRVPostLegalizer();
diff --git a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
index 9ddbeee92ffb6..24a3d8933951d 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
@@ -29,7 +29,7 @@ using namespace llvm;
namespace {
class SPIRVPreLegalizer : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVPreLegalizer() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
@@ -1054,7 +1054,7 @@ bool SPIRVPreLegalizer::runOnMachineFunction(MachineFunction &MF) {
INITIALIZE_PASS(SPIRVPreLegalizer, DEBUG_TYPE, "SPIRV pre legalizer", false,
false)
-char SPIRVPreLegalizer::ID = 0;
+const char SPIRVPreLegalizer::ID = 0;
FunctionPass *llvm::createSPIRVPreLegalizerPass() {
return new SPIRVPreLegalizer();
diff --git a/llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp b/llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
index 48f4047851858..471333daefcdb 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
@@ -93,7 +93,7 @@ bool SPIRVPreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
class SPIRVPreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVPreLegalizerCombiner();
@@ -155,7 +155,7 @@ bool SPIRVPreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char SPIRVPreLegalizerCombiner::ID = 0;
+const char SPIRVPreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(SPIRVPreLegalizerCombiner, DEBUG_TYPE,
"Combine SPIRV machine instrs before legalization", false,
false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp b/llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
index 54f8b58114f7f..03dd1a8205fdb 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
@@ -47,7 +47,7 @@ class SPIRVPrepareFunctions : public ModulePass {
bool removeAggregateTypesFromCalls(Function *F);
public:
- static char ID;
+ static const char ID;
SPIRVPrepareFunctions(const SPIRVTargetMachine &TM)
: ModulePass(ID), TM(TM) {}
@@ -69,7 +69,7 @@ static cl::list<std::string> SPVAllowUnknownIntrinsics(
cl::value_desc("intrinsic_prefix_0,intrinsic_prefix_1"), cl::ValueOptional);
} // namespace
-char SPIRVPrepareFunctions::ID = 0;
+const char SPIRVPrepareFunctions::ID = 0;
INITIALIZE_PASS(SPIRVPrepareFunctions, "prepare-functions",
"SPIRV prepare functions", false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp b/llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp
index c3cb7c5f9126d..eac86585888c8 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
namespace {
struct SPIRVPrepareGlobals : public ModulePass {
- static char ID;
+ static const char ID;
SPIRVPrepareGlobals() : ModulePass(ID) {}
StringRef getPassName() const override {
@@ -80,7 +80,7 @@ bool SPIRVPrepareGlobals::runOnModule(Module &M) {
return Changed;
}
-char SPIRVPrepareGlobals::ID = 0;
+const char SPIRVPrepareGlobals::ID = 0;
} // namespace
diff --git a/llvm/lib/Target/SPIRV/SPIRVPushConstantAccess.cpp b/llvm/lib/Target/SPIRV/SPIRVPushConstantAccess.cpp
index 8ec05271fc8fb..6198d0a1780a5 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPushConstantAccess.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPushConstantAccess.cpp
@@ -87,9 +87,9 @@ class SPIRVPushConstantAccessLegacy : public ModulePass {
SPIRVPushConstantAccessLegacy(SPIRVTargetMachine *TM)
: ModulePass(ID), TM(TM) {}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
};
-char SPIRVPushConstantAccessLegacy::ID = 0;
+const char SPIRVPushConstantAccessLegacy::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(SPIRVPushConstantAccessLegacy, DEBUG_TYPE,
diff --git a/llvm/lib/Target/SPIRV/SPIRVRegularizer.cpp b/llvm/lib/Target/SPIRV/SPIRVRegularizer.cpp
index c864556783a2a..d4ba0e7eb6dec 100644
--- a/llvm/lib/Target/SPIRV/SPIRVRegularizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVRegularizer.cpp
@@ -27,7 +27,7 @@ using namespace llvm;
namespace {
struct SPIRVRegularizer : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVRegularizer() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
StringRef getPassName() const override { return "SPIR-V Regularizer"; }
@@ -42,7 +42,7 @@ struct SPIRVRegularizer : public FunctionPass {
};
} // namespace
-char SPIRVRegularizer::ID = 0;
+const char SPIRVRegularizer::ID = 0;
INITIALIZE_PASS(SPIRVRegularizer, DEBUG_TYPE, "SPIR-V Regularizer", false,
false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVStripConvergentIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVStripConvergentIntrinsics.cpp
index b1a8d1ab8a297..4ce4525843d32 100644
--- a/llvm/lib/Target/SPIRV/SPIRVStripConvergentIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVStripConvergentIntrinsics.cpp
@@ -24,7 +24,7 @@ using namespace llvm;
namespace {
class SPIRVStripConvergentIntrinsics : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SPIRVStripConvergentIntrinsics() : FunctionPass(ID) {}
@@ -77,7 +77,7 @@ class SPIRVStripConvergentIntrinsics : public FunctionPass {
};
} // namespace
-char SPIRVStripConvergentIntrinsics::ID = 0;
+const char SPIRVStripConvergentIntrinsics::ID = 0;
INITIALIZE_PASS(SPIRVStripConvergentIntrinsics, "strip-convergent-intrinsics",
"SPIRV strip convergent intrinsics", false, false)
diff --git a/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp b/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
index ea634fb616f10..8d48bea25be0e 100644
--- a/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
@@ -1109,7 +1109,7 @@ class SPIRVStructurizer : public FunctionPass {
}
public:
- static char ID;
+ static const char ID;
SPIRVStructurizer() : FunctionPass(ID) {}
@@ -1209,7 +1209,7 @@ class SPIRVStructurizer : public FunctionPass {
};
} // anonymous namespace
-char SPIRVStructurizer::ID = 0;
+const char SPIRVStructurizer::ID = 0;
INITIALIZE_PASS_BEGIN(SPIRVStructurizer, "spirv-structurizer",
"structurize SPIRV", false, false)
diff --git a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
index 7d7aa20869c20..3d551a6aacfff 100644
--- a/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
+++ b/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
@@ -38,7 +38,7 @@ namespace {
struct Filler : public MachineFunctionPass {
const SparcSubtarget *Subtarget = nullptr;
- static char ID;
+ static const char ID;
Filler() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "SPARC Delay Slot Filler"; }
@@ -86,7 +86,7 @@ namespace {
MachineBasicBlock::iterator MBBI);
};
- char Filler::ID = 0;
+ const char Filler::ID = 0;
} // end of anonymous namespace
/// createSparcDelaySlotFillerPass - Returns a pass that fills in delay
diff --git a/llvm/lib/Target/Sparc/LeonPasses.cpp b/llvm/lib/Target/Sparc/LeonPasses.cpp
index 018d8126f7a7e..7cec5fe6944e2 100644
--- a/llvm/lib/Target/Sparc/LeonPasses.cpp
+++ b/llvm/lib/Target/Sparc/LeonPasses.cpp
@@ -19,7 +19,7 @@
using namespace llvm;
-char ErrataWorkaround::ID = 0;
+const char ErrataWorkaround::ID = 0;
ErrataWorkaround::ErrataWorkaround() : MachineFunctionPass(ID) {
initializeErrataWorkaroundPass(*PassRegistry::getPassRegistry());
@@ -323,7 +323,7 @@ bool ErrataWorkaround::runOnMachineFunction(MachineFunction &MF) {
return Changed;
}
-LEONMachineFunctionPass::LEONMachineFunctionPass(char &ID)
+LEONMachineFunctionPass::LEONMachineFunctionPass(const char &ID)
: MachineFunctionPass(ID) {}
//*****************************************************************************
@@ -336,7 +336,7 @@ LEONMachineFunctionPass::LEONMachineFunctionPass(char &ID)
//
// This pass inserts a NOP after any LD or LDF instruction.
//
-char InsertNOPLoad::ID = 0;
+const char InsertNOPLoad::ID = 0;
InsertNOPLoad::InsertNOPLoad() : LEONMachineFunctionPass(ID) {}
@@ -375,7 +375,7 @@ bool InsertNOPLoad::runOnMachineFunction(MachineFunction &MF) {
//
// Detects an erratum in UT699 LEON 3 processor
-char DetectRoundChange::ID = 0;
+const char DetectRoundChange::ID = 0;
DetectRoundChange::DetectRoundChange() : LEONMachineFunctionPass(ID) {}
@@ -425,7 +425,7 @@ bool DetectRoundChange::runOnMachineFunction(MachineFunction &MF) {
// with the changes that still need implementing for the "double" versions
// of these instructions.
//
-char FixAllFDIVSQRT::ID = 0;
+const char FixAllFDIVSQRT::ID = 0;
FixAllFDIVSQRT::FixAllFDIVSQRT() : LEONMachineFunctionPass(ID) {}
diff --git a/llvm/lib/Target/Sparc/LeonPasses.h b/llvm/lib/Target/Sparc/LeonPasses.h
index 261b283fadaeb..e1643fbf62c6d 100644
--- a/llvm/lib/Target/Sparc/LeonPasses.h
+++ b/llvm/lib/Target/Sparc/LeonPasses.h
@@ -28,7 +28,7 @@ class LLVM_LIBRARY_VISIBILITY LEONMachineFunctionPass
std::vector<int> UsedRegisters;
protected:
- LEONMachineFunctionPass(char &ID);
+ LEONMachineFunctionPass(const char &ID);
void clearUsedRegisterList() { UsedRegisters.clear(); }
@@ -56,7 +56,7 @@ class LLVM_LIBRARY_VISIBILITY ErrataWorkaround : public MachineFunctionPass {
void insertNop(MachineBasicBlock::iterator I);
public:
- static char ID;
+ static const char ID;
ErrataWorkaround();
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -66,7 +66,7 @@ class LLVM_LIBRARY_VISIBILITY ErrataWorkaround : public MachineFunctionPass {
class LLVM_LIBRARY_VISIBILITY InsertNOPLoad : public LEONMachineFunctionPass {
public:
- static char ID;
+ static const char ID;
InsertNOPLoad();
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -81,7 +81,7 @@ class LLVM_LIBRARY_VISIBILITY InsertNOPLoad : public LEONMachineFunctionPass {
class LLVM_LIBRARY_VISIBILITY DetectRoundChange
: public LEONMachineFunctionPass {
public:
- static char ID;
+ static const char ID;
DetectRoundChange();
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -94,7 +94,7 @@ class LLVM_LIBRARY_VISIBILITY DetectRoundChange
class LLVM_LIBRARY_VISIBILITY FixAllFDIVSQRT : public LEONMachineFunctionPass {
public:
- static char ID;
+ static const char ID;
FixAllFDIVSQRT();
bool runOnMachineFunction(MachineFunction &MF) override;
diff --git a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
index f1d487c87d6f3..82b235fcd8760 100644
--- a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -76,7 +76,7 @@ class SparcAsmPrinter : public AsmPrinter {
void lowerToMCInst(const MachineInstr *MI, MCInst &OutMI);
public:
- static char ID;
+ static const char ID;
};
} // end of anonymous namespace
@@ -510,7 +510,7 @@ bool SparcAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
return false;
}
-char SparcAsmPrinter::ID = 0;
+const char SparcAsmPrinter::ID = 0;
INITIALIZE_PASS(SparcAsmPrinter, "sparc-asm-printer", "Sparc Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
index 55bf40e185ff4..371c7c1880ead 100644
--- a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
@@ -66,13 +66,13 @@ class SparcDAGToDAGISel : public SelectionDAGISel {
class SparcDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit SparcDAGToDAGISelLegacy(SparcTargetMachine &tm)
: SelectionDAGISelLegacy(ID, std::make_unique<SparcDAGToDAGISel>(tm)) {}
};
} // end anonymous namespace
-char SparcDAGToDAGISelLegacy::ID = 0;
+const char SparcDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(SparcDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
index 810096f946041..09f3a2d2b8f13 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
@@ -1889,7 +1889,7 @@ void SystemZAsmPrinter::emitFunctionEntryLabel() {
AsmPrinter::emitFunctionEntryLabel();
}
-char SystemZAsmPrinter::ID = 0;
+const char SystemZAsmPrinter::ID = 0;
INITIALIZE_PASS(SystemZAsmPrinter, "systemz-asm-printer",
"SystemZ Assembly Printer", false, false)
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
index 01264b08ce762..787c6a6aa2777 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
@@ -25,7 +25,7 @@ class raw_ostream;
class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
MCSymbol *CurrentFnPPA1Sym; // PPA1 Symbol.
diff --git a/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp b/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
index 8867b6ea10931..46d80590d740c 100644
--- a/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
@@ -27,7 +27,7 @@ namespace {
class SystemZCopyPhysRegs : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZCopyPhysRegs() : MachineFunctionPass(ID), TII(nullptr), MRI(nullptr) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -41,7 +41,7 @@ class SystemZCopyPhysRegs : public MachineFunctionPass {
MachineRegisterInfo *MRI;
};
-char SystemZCopyPhysRegs::ID = 0;
+const char SystemZCopyPhysRegs::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
index bbe1821e7b8f7..15d00f0aaad09 100644
--- a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
@@ -63,7 +63,7 @@ struct Reference {
class SystemZElimCompare : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZElimCompare() : MachineFunctionPass(ID) {}
@@ -96,7 +96,7 @@ class SystemZElimCompare : public MachineFunctionPass {
const TargetRegisterInfo *TRI = nullptr;
};
-char SystemZElimCompare::ID = 0;
+const char SystemZElimCompare::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index a05fdc74e6366..4740de0c0aeda 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
@@ -388,7 +388,7 @@ class SystemZDAGToDAGISel : public SelectionDAGISel {
class SystemZDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit SystemZDAGToDAGISelLegacy(SystemZTargetMachine &TM,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -396,7 +396,7 @@ class SystemZDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
};
} // end anonymous namespace
-char SystemZDAGToDAGISelLegacy::ID = 0;
+const char SystemZDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(SystemZDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp b/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
index 6244c51367379..99c933f30352f 100644
--- a/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
@@ -27,7 +27,7 @@ namespace {
class SystemZLDCleanup : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZLDCleanup() : MachineFunctionPass(ID), TII(nullptr), MF(nullptr) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -42,7 +42,7 @@ class SystemZLDCleanup : public MachineFunctionPass {
MachineFunction *MF;
};
-char SystemZLDCleanup::ID = 0;
+const char SystemZLDCleanup::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
index b7a93e7babefe..de3f48a05b6a5 100644
--- a/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp
@@ -133,7 +133,7 @@ struct BlockPosition {
class SystemZLongBranch : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZLongBranch() : MachineFunctionPass(ID) {}
@@ -163,7 +163,7 @@ class SystemZLongBranch : public MachineFunctionPass {
SmallVector<TerminatorInfo, 16> Terminators;
};
-char SystemZLongBranch::ID = 0;
+const char SystemZLongBranch::ID = 0;
const uint64_t MaxBackwardRange = 0x10000;
const uint64_t MaxForwardRange = 0xfffe;
diff --git a/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp b/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
index 8d4cee655235f..6a53c902cacbe 100644
--- a/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
@@ -31,7 +31,7 @@ namespace {
class SystemZPostRewrite : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZPostRewrite() : MachineFunctionPass(ID) {}
const SystemZInstrInfo *TII;
@@ -57,7 +57,7 @@ class SystemZPostRewrite : public MachineFunctionPass {
bool selectMBB(MachineBasicBlock &MBB);
};
-char SystemZPostRewrite::ID = 0;
+const char SystemZPostRewrite::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
index 96a41487c87e3..5caaf3d91c366 100644
--- a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
namespace {
class SystemZShortenInst : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZShortenInst();
bool processBlock(MachineBasicBlock &MBB);
@@ -48,7 +48,7 @@ class SystemZShortenInst : public MachineFunctionPass {
LiveRegUnits LiveRegs;
};
-char SystemZShortenInst::ID = 0;
+const char SystemZShortenInst::ID = 0;
} // end anonymous namespace
INITIALIZE_PASS(SystemZShortenInst, DEBUG_TYPE,
diff --git a/llvm/lib/Target/SystemZ/SystemZTDC.cpp b/llvm/lib/Target/SystemZ/SystemZTDC.cpp
index 1e254d694e392..d6218f605ec48 100644
--- a/llvm/lib/Target/SystemZ/SystemZTDC.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTDC.cpp
@@ -63,7 +63,7 @@ namespace {
class SystemZTDCPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SystemZTDCPass() : FunctionPass(ID) {}
bool runOnFunction(Function &F) override;
@@ -111,7 +111,7 @@ class SystemZTDCPass : public FunctionPass {
} // end anonymous namespace
-char SystemZTDCPass::ID = 0;
+const char SystemZTDCPass::ID = 0;
INITIALIZE_PASS(SystemZTDCPass, "systemz-tdc",
"SystemZ Test Data Class optimization", false, false)
diff --git a/llvm/lib/Target/VE/LVLGen.cpp b/llvm/lib/Target/VE/LVLGen.cpp
index 103aea3d1b359..44cf301a68f43 100644
--- a/llvm/lib/Target/VE/LVLGen.cpp
+++ b/llvm/lib/Target/VE/LVLGen.cpp
@@ -21,7 +21,7 @@ struct LVLGen : public MachineFunctionPass {
const TargetInstrInfo *TII;
const TargetRegisterInfo *TRI;
- static char ID;
+ static const char ID;
LVLGen() : MachineFunctionPass(ID) {}
bool runOnMachineBasicBlock(MachineBasicBlock &MBB);
bool runOnMachineFunction(MachineFunction &F) override;
@@ -29,7 +29,7 @@ struct LVLGen : public MachineFunctionPass {
unsigned getVL(const MachineInstr &MI);
int getVLIndex(unsigned Opcode);
};
-char LVLGen::ID = 0;
+const char LVLGen::ID = 0;
} // end of anonymous namespace
diff --git a/llvm/lib/Target/VE/VEAsmPrinter.cpp b/llvm/lib/Target/VE/VEAsmPrinter.cpp
index ba8cf78cf2a50..bcab5f91983f2 100644
--- a/llvm/lib/Target/VE/VEAsmPrinter.cpp
+++ b/llvm/lib/Target/VE/VEAsmPrinter.cpp
@@ -64,7 +64,7 @@ class VEAsmPrinter : public AsmPrinter {
bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
const char *ExtraCode, raw_ostream &O) override;
- static char ID;
+ static const char ID;
};
} // end of anonymous namespace
@@ -414,7 +414,7 @@ bool VEAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
return false;
}
-char VEAsmPrinter::ID = 0;
+const char VEAsmPrinter::ID = 0;
INITIALIZE_PASS(VEAsmPrinter, "ve-asm-printer", "VE Assembly Printer", false,
false)
diff --git a/llvm/lib/Target/VE/VEISelDAGToDAG.cpp b/llvm/lib/Target/VE/VEISelDAGToDAG.cpp
index 823bfbcb34a07..7d644b03b7ad2 100644
--- a/llvm/lib/Target/VE/VEISelDAGToDAG.cpp
+++ b/llvm/lib/Target/VE/VEISelDAGToDAG.cpp
@@ -68,13 +68,13 @@ class VEDAGToDAGISel : public SelectionDAGISel {
class VEDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit VEDAGToDAGISelLegacy(VETargetMachine &tm)
: SelectionDAGISelLegacy(ID, std::make_unique<VEDAGToDAGISel>(tm)) {}
};
} // end anonymous namespace
-char VEDAGToDAGISelLegacy::ID = 0;
+const char VEDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(VEDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp
index 344a3636b431b..3dbc7671ada82 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAddMissingPrototypes.cpp
@@ -44,12 +44,12 @@ class WebAssemblyAddMissingPrototypes final : public ModulePass {
bool runOnModule(Module &M) override;
public:
- static char ID;
+ static const char ID;
WebAssemblyAddMissingPrototypes() : ModulePass(ID) {}
};
} // End anonymous namespace
-char WebAssemblyAddMissingPrototypes::ID = 0;
+const char WebAssemblyAddMissingPrototypes::ID = 0;
INITIALIZE_PASS(WebAssemblyAddMissingPrototypes, DEBUG_TYPE,
"Add prototypes to prototypes-less functions", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp
index 8601a61626ac6..ee9fde5008cb9 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp
@@ -39,7 +39,7 @@ using namespace llvm;
namespace {
class WebAssemblyArgumentMove final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyArgumentMove() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "WebAssembly Argument Move"; }
@@ -55,7 +55,7 @@ class WebAssemblyArgumentMove final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblyArgumentMove::ID = 0;
+const char WebAssemblyArgumentMove::ID = 0;
INITIALIZE_PASS(WebAssemblyArgumentMove, DEBUG_TYPE,
"Move ARGUMENT instructions for WebAssembly", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
index 44733f1d58924..1f3817f68bf62 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -747,7 +747,7 @@ bool WebAssemblyAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
return AsmPrinter::PrintAsmMemoryOperand(MI, OpNo, ExtraCode, OS);
}
-char WebAssemblyAsmPrinter::ID = 0;
+const char WebAssemblyAsmPrinter::ID = 0;
INITIALIZE_PASS(WebAssemblyAsmPrinter, "webassembly-asm-printer",
"WebAssembly Assmebly Printer", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
index aef562e1dd684..3186f308957f2 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
@@ -20,7 +20,7 @@ class WebAssemblyTargetStreamer;
class LLVM_LIBRARY_VISIBILITY WebAssemblyAsmPrinter final : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
const WebAssemblySubtarget *Subtarget;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
index 6525c6d93bee8..6d87896ebb68b 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
@@ -63,12 +63,12 @@ class WebAssemblyCFGSort final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyCFGSort() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyCFGSort::ID = 0;
+const char WebAssemblyCFGSort::ID = 0;
INITIALIZE_PASS(WebAssemblyCFGSort, DEBUG_TYPE,
"Reorders blocks in topological order", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index acb889f00a48c..bdd00857af6cd 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -169,14 +169,14 @@ class WebAssemblyCFGStackify final : public MachineFunctionPass {
void unregisterScope(MachineInstr *Begin);
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyCFGStackify() : MachineFunctionPass(ID) {}
~WebAssemblyCFGStackify() override { releaseMemory(); }
void releaseMemory() override;
};
} // end anonymous namespace
-char WebAssemblyCFGStackify::ID = 0;
+const char WebAssemblyCFGStackify::ID = 0;
INITIALIZE_PASS(
WebAssemblyCFGStackify, DEBUG_TYPE,
"Insert BLOCK/LOOP/TRY/TRY_TABLE markers for WebAssembly scopes", false,
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCleanCodeAfterTrap.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCleanCodeAfterTrap.cpp
index e5cba3c485473..b7709b0d9561c 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCleanCodeAfterTrap.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCleanCodeAfterTrap.cpp
@@ -28,7 +28,7 @@ using namespace llvm;
namespace {
class WebAssemblyCleanCodeAfterTrap final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyCleanCodeAfterTrap() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -39,7 +39,7 @@ class WebAssemblyCleanCodeAfterTrap final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblyCleanCodeAfterTrap::ID = 0;
+const char WebAssemblyCleanCodeAfterTrap::ID = 0;
INITIALIZE_PASS(WebAssemblyCleanCodeAfterTrap, DEBUG_TYPE,
"WebAssembly Clean Code After Trap", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
index 2046c09d063ec..014c24da216d3 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
@@ -41,12 +41,12 @@ class WebAssemblyDebugFixup final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyDebugFixup() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyDebugFixup::ID = 0;
+const char WebAssemblyDebugFixup::ID = 0;
INITIALIZE_PASS(
WebAssemblyDebugFixup, DEBUG_TYPE,
"Ensures debug_value's that have been stackified become stack relative",
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
index a8a2454cd14ca..20988e3243777 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
@@ -27,7 +27,7 @@ using namespace llvm;
#define DEBUG_TYPE "wasm-exception-info"
-char WebAssemblyExceptionInfo::ID = 0;
+const char WebAssemblyExceptionInfo::ID = 0;
INITIALIZE_PASS_BEGIN(WebAssemblyExceptionInfo, DEBUG_TYPE,
"WebAssembly Exception Information", true, true)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
index 1bfc61f0ab611..8e0f3f620d0b5 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
@@ -131,7 +131,7 @@ class WebAssemblyExceptionInfo final : public MachineFunctionPass {
WebAssemblyException *getOutermostException(MachineBasicBlock *MBB) const;
public:
- static char ID;
+ static const char ID;
WebAssemblyExceptionInfo() : MachineFunctionPass(ID) {}
~WebAssemblyExceptionInfo() override { releaseMemory(); }
WebAssemblyExceptionInfo(const WebAssemblyExceptionInfo &) = delete;
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
index 5c3127e2d3dc6..1b171848fa7fc 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -46,12 +46,12 @@ class WebAssemblyExplicitLocals final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyExplicitLocals() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyExplicitLocals::ID = 0;
+const char WebAssemblyExplicitLocals::ID = 0;
INITIALIZE_PASS(WebAssemblyExplicitLocals, DEBUG_TYPE,
"Convert registers to WebAssembly locals", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp
index d8fb15666662c..a84d33b3b1740 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp
@@ -36,11 +36,11 @@ class WebAssemblyFixBrTableDefaults final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyFixBrTableDefaults() : MachineFunctionPass(ID) {}
};
-char WebAssemblyFixBrTableDefaults::ID = 0;
+const char WebAssemblyFixBrTableDefaults::ID = 0;
// Target independent selection dag assumes that it is ok to use PointerTy
// as the index for a "switch", whereas Wasm so far only has a 32-bit br_table.
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
index 67cf4f5bd055c..25f9968b95836 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
@@ -49,12 +49,12 @@ class FixFunctionBitcasts final : public ModulePass {
bool runOnModule(Module &M) override;
public:
- static char ID;
+ static const char ID;
FixFunctionBitcasts() : ModulePass(ID) {}
};
} // End anonymous namespace
-char FixFunctionBitcasts::ID = 0;
+const char FixFunctionBitcasts::ID = 0;
INITIALIZE_PASS(FixFunctionBitcasts, DEBUG_TYPE,
"Fix mismatching bitcasts for WebAssembly", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
index 07171d472dc2d..b8aea690c82f1 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
@@ -244,7 +244,7 @@ class WebAssemblyFixIrreducibleControlFlow final : public MachineFunctionPass {
MachineFunction &MF, const ReachabilityGraph &Graph);
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyFixIrreducibleControlFlow() : MachineFunctionPass(ID) {}
};
@@ -482,7 +482,7 @@ void WebAssemblyFixIrreducibleControlFlow::makeSingleEntryLoop(
} // end anonymous namespace
-char WebAssemblyFixIrreducibleControlFlow::ID = 0;
+const char WebAssemblyFixIrreducibleControlFlow::ID = 0;
INITIALIZE_PASS(WebAssemblyFixIrreducibleControlFlow, DEBUG_TYPE,
"Removes irreducible control flow", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
index 2541b0433ab59..86d0628568a2f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
@@ -84,7 +84,7 @@ class WebAssemblyDAGToDAGISel final : public SelectionDAGISel {
class WebAssemblyDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit WebAssemblyDAGToDAGISelLegacy(WebAssemblyTargetMachine &TM,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -92,7 +92,7 @@ class WebAssemblyDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
};
} // end anonymous namespace
-char WebAssemblyDAGToDAGISelLegacy::ID;
+const char WebAssemblyDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(WebAssemblyDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false,
false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
index 8ac32f939c5f2..bb64b32051dc2 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
@@ -46,12 +46,12 @@ class WebAssemblyLateEHPrepare final : public MachineFunctionPass {
SmallPtrSet<MachineBasicBlock *, 8> CatchRetBBs;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyLateEHPrepare() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyLateEHPrepare::ID = 0;
+const char WebAssemblyLateEHPrepare::ID = 0;
INITIALIZE_PASS(WebAssemblyLateEHPrepare, DEBUG_TYPE,
"WebAssembly Late Exception Preparation", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp
index 52226206eb325..0a00ddcb5a92f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp
@@ -40,12 +40,12 @@ class WebAssemblyLowerBrUnless final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyLowerBrUnless() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyLowerBrUnless::ID = 0;
+const char WebAssemblyLowerBrUnless::ID = 0;
INITIALIZE_PASS(WebAssemblyLowerBrUnless, DEBUG_TYPE,
"Lowers br_unless into inverted br_if", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
index c3990d12f2c28..70d7891f9f710 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
@@ -356,7 +356,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
void rebuildSSA(Function &F);
public:
- static char ID;
+ static const char ID;
WebAssemblyLowerEmscriptenEHSjLj()
: ModulePass(ID), EnableEmEH(WebAssembly::WasmEnableEmEH),
@@ -376,7 +376,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
};
} // End anonymous namespace
-char WebAssemblyLowerEmscriptenEHSjLj::ID = 0;
+const char WebAssemblyLowerEmscriptenEHSjLj::ID = 0;
INITIALIZE_PASS(WebAssemblyLowerEmscriptenEHSjLj, DEBUG_TYPE,
"WebAssembly Lower Emscripten Exceptions / Setjmp / Longjmp",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerRefTypesIntPtrConv.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerRefTypesIntPtrConv.cpp
index be500de67e320..d77ee196c77dd 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerRefTypesIntPtrConv.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerRefTypesIntPtrConv.cpp
@@ -34,12 +34,12 @@ class WebAssemblyLowerRefTypesIntPtrConv final : public FunctionPass {
bool runOnFunction(Function &MF) override;
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
WebAssemblyLowerRefTypesIntPtrConv() : FunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyLowerRefTypesIntPtrConv::ID = 0;
+const char WebAssemblyLowerRefTypesIntPtrConv::ID = 0;
INITIALIZE_PASS(WebAssemblyLowerRefTypesIntPtrConv, DEBUG_TYPE,
"WebAssembly Lower RefTypes Int-Ptr Conversions", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp
index 3f73ca6b564ee..2b30391ed8c1c 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp
@@ -40,12 +40,12 @@ class WebAssemblyMCLowerPrePass final : public ModulePass {
bool runOnModule(Module &M) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyMCLowerPrePass() : ModulePass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyMCLowerPrePass::ID = 0;
+const char WebAssemblyMCLowerPrePass::ID = 0;
INITIALIZE_PASS(
WebAssemblyMCLowerPrePass, DEBUG_TYPE,
"Collects information ahead of time for MC lowering",
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp
index 74bba7339cab0..73d07e1329eb5 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp
@@ -45,7 +45,7 @@ using namespace llvm;
namespace {
class WebAssemblyMemIntrinsicResults final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyMemIntrinsicResults() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -80,7 +80,7 @@ class WebAssemblyMemIntrinsicResults final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblyMemIntrinsicResults::ID = 0;
+const char WebAssemblyMemIntrinsicResults::ID = 0;
INITIALIZE_PASS(WebAssemblyMemIntrinsicResults, DEBUG_TYPE,
"Optimize memory intrinsic result values for WebAssembly",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp
index 23062554aa171..a2a4f80c0922d 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp
@@ -29,12 +29,12 @@ class WebAssemblyNullifyDebugValueLists final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyNullifyDebugValueLists() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyNullifyDebugValueLists::ID = 0;
+const char WebAssemblyNullifyDebugValueLists::ID = 0;
INITIALIZE_PASS(WebAssemblyNullifyDebugValueLists, DEBUG_TYPE,
"WebAssembly Nullify DBG_VALUE_LISTs", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp
index 0c561622e634e..0e4fec5659269 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp
@@ -56,12 +56,12 @@ class WebAssemblyOptimizeLiveIntervals final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyOptimizeLiveIntervals() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyOptimizeLiveIntervals::ID = 0;
+const char WebAssemblyOptimizeLiveIntervals::ID = 0;
INITIALIZE_PASS(WebAssemblyOptimizeLiveIntervals, DEBUG_TYPE,
"Optimize LiveIntervals for WebAssembly", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
index ffd135d62aaf0..187515b31def2 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
@@ -39,14 +39,14 @@ class OptimizeReturned final : public FunctionPass,
DominatorTree *DT = nullptr;
public:
- static char ID;
+ static const char ID;
OptimizeReturned() : FunctionPass(ID) {}
void visitCallBase(CallBase &CB);
};
} // End anonymous namespace
-char OptimizeReturned::ID = 0;
+const char OptimizeReturned::ID = 0;
INITIALIZE_PASS(OptimizeReturned, DEBUG_TYPE,
"Optimize calls with \"returned\" attributes for WebAssembly",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
index d7ae32b061e67..919a04d2c9f80 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp
@@ -45,12 +45,12 @@ class WebAssemblyPeephole final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID;
+ static const char ID;
WebAssemblyPeephole() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyPeephole::ID = 0;
+const char WebAssemblyPeephole::ID = 0;
INITIALIZE_PASS(WebAssemblyPeephole, DEBUG_TYPE,
"WebAssembly peephole optimizations", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRefTypeMem2Local.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRefTypeMem2Local.cpp
index 04b4c7d78aabb..145f748c9fa7f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRefTypeMem2Local.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRefTypeMem2Local.cpp
@@ -40,14 +40,14 @@ class WebAssemblyRefTypeMem2Local final
bool Changed = false;
public:
- static char ID;
+ static const char ID;
WebAssemblyRefTypeMem2Local() : FunctionPass(ID) {}
void visitAllocaInst(AllocaInst &AI);
};
} // End anonymous namespace
-char WebAssemblyRefTypeMem2Local::ID = 0;
+const char WebAssemblyRefTypeMem2Local::ID = 0;
INITIALIZE_PASS(WebAssemblyRefTypeMem2Local, DEBUG_TYPE,
"Assign reference type allocas to local address space", true,
false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
index 6efe09d775c4b..0e92707f060fb 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
@@ -31,7 +31,7 @@ using namespace llvm;
namespace {
class WebAssemblyRegColoring final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyRegColoring() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -53,7 +53,7 @@ class WebAssemblyRegColoring final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblyRegColoring::ID = 0;
+const char WebAssemblyRegColoring::ID = 0;
INITIALIZE_PASS(WebAssemblyRegColoring, DEBUG_TYPE,
"Minimize number of registers used", false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
index 17a914408a886..452b2d3855d33 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
@@ -40,12 +40,12 @@ class WebAssemblyRegNumbering final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyRegNumbering() : MachineFunctionPass(ID) {}
};
} // end anonymous namespace
-char WebAssemblyRegNumbering::ID = 0;
+const char WebAssemblyRegNumbering::ID = 0;
INITIALIZE_PASS(WebAssemblyRegNumbering, DEBUG_TYPE,
"Assigns WebAssembly register numbers for virtual registers",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
index 97f2ed0a828ba..0c40547894c69 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
@@ -64,14 +64,14 @@ class WebAssemblyRegStackify final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyRegStackify(CodeGenOptLevel OptLevel)
: MachineFunctionPass(ID), Optimize(OptLevel != CodeGenOptLevel::None) {}
WebAssemblyRegStackify() : WebAssemblyRegStackify(CodeGenOptLevel::Default) {}
};
} // end anonymous namespace
-char WebAssemblyRegStackify::ID = 0;
+const char WebAssemblyRegStackify::ID = 0;
INITIALIZE_PASS(WebAssemblyRegStackify, DEBUG_TYPE,
"Reorder instructions to use the WebAssembly value stack",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp
index cb152f500436a..b5ead82f53906 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp
@@ -34,7 +34,7 @@ using namespace llvm;
namespace {
class WebAssemblyReplacePhysRegs final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblyReplacePhysRegs() : MachineFunctionPass(ID) {}
private:
@@ -51,7 +51,7 @@ class WebAssemblyReplacePhysRegs final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblyReplacePhysRegs::ID = 0;
+const char WebAssemblyReplacePhysRegs::ID = 0;
INITIALIZE_PASS(WebAssemblyReplacePhysRegs, DEBUG_TYPE,
"Replace physical registers with virtual registers", false,
false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp b/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp
index d52e1dcfa8493..dc529eb9d47e0 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp
@@ -26,7 +26,7 @@ using namespace llvm;
namespace {
class WebAssemblySetP2AlignOperands final : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
WebAssemblySetP2AlignOperands() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -44,7 +44,7 @@ class WebAssemblySetP2AlignOperands final : public MachineFunctionPass {
};
} // end anonymous namespace
-char WebAssemblySetP2AlignOperands::ID = 0;
+const char WebAssemblySetP2AlignOperands::ID = 0;
INITIALIZE_PASS(WebAssemblySetP2AlignOperands, DEBUG_TYPE,
"Set the p2align operands for WebAssembly loads and stores",
false, false)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index a57ebfad03b1c..64019cc2374d8 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -261,7 +261,7 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
// function individually, since having multiple feature sets in one module
// currently does not make sense for WebAssembly. If atomics are not enabled,
// also strip atomic operations and thread local storage.
- static char ID;
+ static const char ID;
WebAssemblyTargetMachine *WasmTM;
public:
@@ -414,7 +414,7 @@ class CoalesceFeaturesAndStripAtomics final : public ModulePass {
}
}
};
-char CoalesceFeaturesAndStripAtomics::ID = 0;
+const char CoalesceFeaturesAndStripAtomics::ID = 0;
/// WebAssembly Code Generator Pass Configuration Options.
class WebAssemblyPassConfig final : public TargetPassConfig {
diff --git a/llvm/lib/Target/X86/GISel/X86PostLegalizerCombiner.cpp b/llvm/lib/Target/X86/GISel/X86PostLegalizerCombiner.cpp
index 373d46d1b53a9..6e8f19cf97e84 100644
--- a/llvm/lib/Target/X86/GISel/X86PostLegalizerCombiner.cpp
+++ b/llvm/lib/Target/X86/GISel/X86PostLegalizerCombiner.cpp
@@ -104,7 +104,7 @@ bool X86PostLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
class X86PostLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86PostLegalizerCombiner();
@@ -170,7 +170,7 @@ bool X86PostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char X86PostLegalizerCombiner::ID = 0;
+const char X86PostLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(X86PostLegalizerCombiner, DEBUG_TYPE,
"Combine X86 MachineInstrs after legalization", false,
false)
diff --git a/llvm/lib/Target/X86/GISel/X86PreLegalizerCombiner.cpp b/llvm/lib/Target/X86/GISel/X86PreLegalizerCombiner.cpp
index 01c3473d16292..294fd2b2e0bf7 100644
--- a/llvm/lib/Target/X86/GISel/X86PreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/X86/GISel/X86PreLegalizerCombiner.cpp
@@ -94,7 +94,7 @@ bool X86PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &MI) const {
class X86PreLegalizerCombiner : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86PreLegalizerCombiner();
@@ -159,7 +159,7 @@ bool X86PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
return Impl.combineMachineInstrs();
}
-char X86PreLegalizerCombiner::ID = 0;
+const char X86PreLegalizerCombiner::ID = 0;
INITIALIZE_PASS_BEGIN(X86PreLegalizerCombiner, DEBUG_TYPE,
"Combine X86 machine instrs before legalization", false,
false)
diff --git a/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp b/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
index 5aeb62dd997b3..5fed95d48b362 100644
--- a/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
+++ b/llvm/lib/Target/X86/X86ArgumentStackSlotRebase.cpp
@@ -37,7 +37,7 @@ namespace {
class X86ArgumentStackSlotLegacy : public MachineFunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit X86ArgumentStackSlotLegacy() : MachineFunctionPass(ID) {}
@@ -51,7 +51,7 @@ class X86ArgumentStackSlotLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char X86ArgumentStackSlotLegacy::ID = 0;
+const char X86ArgumentStackSlotLegacy::ID = 0;
INITIALIZE_PASS(X86ArgumentStackSlotLegacy, DEBUG_TYPE, "Argument Stack Rebase",
false, false)
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index e8fd76819d773..9cef2df92a23b 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -1116,7 +1116,7 @@ void X86AsmPrinter::emitEndOfAsmFile(Module &M) {
}
}
-char X86AsmPrinter::ID = 0;
+const char X86AsmPrinter::ID = 0;
INITIALIZE_PASS(X86AsmPrinter, "x86-asm-printer", "X86 Assembly Printer", false,
false)
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.h b/llvm/lib/Target/X86/X86AsmPrinter.h
index b5c73abeac932..72756cc872a12 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.h
+++ b/llvm/lib/Target/X86/X86AsmPrinter.h
@@ -26,7 +26,7 @@ class TargetMachine;
class LLVM_LIBRARY_VISIBILITY X86AsmPrinter : public AsmPrinter {
public:
- static char ID;
+ static const char ID;
private:
const X86Subtarget *Subtarget = nullptr;
diff --git a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
index f450b04d25892..5abb86b895bd6 100644
--- a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
+++ b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
@@ -106,7 +106,7 @@ class X86AvoidSFBImpl {
class X86AvoidSFBLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86AvoidSFBLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override {
@@ -123,7 +123,7 @@ class X86AvoidSFBLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char X86AvoidSFBLegacy::ID = 0;
+const char X86AvoidSFBLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86AvoidSFBLegacy, DEBUG_TYPE, "Machine code sinking",
false, false)
diff --git a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
index 67003dcbcf1d2..4cab904a3759c 100644
--- a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
+++ b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
@@ -54,14 +54,14 @@ class X86AvoidTrailingCallLegacyPass : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
private:
StringRef getPassName() const override { return AVOIDCALL_DESC; }
};
} // end anonymous namespace
-char X86AvoidTrailingCallLegacyPass::ID = 0;
+const char X86AvoidTrailingCallLegacyPass::ID = 0;
FunctionPass *llvm::createX86AvoidTrailingCallLegacyPass() {
return new X86AvoidTrailingCallLegacyPass();
diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
index 50f52e1c7a795..458d7e0fb702d 100644
--- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
+++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
@@ -124,14 +124,14 @@ class X86CallFrameOptimizationLegacy : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
private:
StringRef getPassName() const override { return "X86 Optimize Call Frame"; }
};
} // end anonymous namespace
-char X86CallFrameOptimizationLegacy::ID = 0;
+const char X86CallFrameOptimizationLegacy::ID = 0;
INITIALIZE_PASS(X86CallFrameOptimizationLegacy, DEBUG_TYPE,
"X86 Call Frame Optimization", false, false)
diff --git a/llvm/lib/Target/X86/X86CmovConversion.cpp b/llvm/lib/Target/X86/X86CmovConversion.cpp
index d2f0a9f72f6e3..c9af846b0907d 100644
--- a/llvm/lib/Target/X86/X86CmovConversion.cpp
+++ b/llvm/lib/Target/X86/X86CmovConversion.cpp
@@ -157,12 +157,12 @@ class X86CmovConversionLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
/// Pass identification, replacement for typeid.
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86CmovConversionLegacy::ID = 0;
+const char X86CmovConversionLegacy::ID = 0;
void X86CmovConversionLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
MachineFunctionPass::getAnalysisUsage(AU);
diff --git a/llvm/lib/Target/X86/X86CompressEVEX.cpp b/llvm/lib/Target/X86/X86CompressEVEX.cpp
index 4e39eb3e9707a..95a4b445e369e 100644
--- a/llvm/lib/Target/X86/X86CompressEVEX.cpp
+++ b/llvm/lib/Target/X86/X86CompressEVEX.cpp
@@ -73,7 +73,7 @@ namespace {
class CompressEVEXLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
CompressEVEXLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return COMP_EVEX_DESC; }
@@ -87,7 +87,7 @@ class CompressEVEXLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char CompressEVEXLegacy::ID = 0;
+const char CompressEVEXLegacy::ID = 0;
static bool usesExtendedRegister(const MachineInstr &MI) {
auto isHiRegIdx = [](MCRegister Reg) {
diff --git a/llvm/lib/Target/X86/X86DomainReassignment.cpp b/llvm/lib/Target/X86/X86DomainReassignment.cpp
index a9f68393aa3e2..7954cacbd7dd4 100644
--- a/llvm/lib/Target/X86/X86DomainReassignment.cpp
+++ b/llvm/lib/Target/X86/X86DomainReassignment.cpp
@@ -399,7 +399,7 @@ class X86DomainReassignmentImpl {
class X86DomainReassignmentLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86DomainReassignmentLegacy() : MachineFunctionPass(ID) {}
@@ -415,7 +415,7 @@ class X86DomainReassignmentLegacy : public MachineFunctionPass {
}
};
-char X86DomainReassignmentLegacy::ID = 0;
+const char X86DomainReassignmentLegacy::ID = 0;
} // End anonymous namespace.
diff --git a/llvm/lib/Target/X86/X86DynAllocaExpander.cpp b/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
index bb4301c11c270..5431188a12cfc 100644
--- a/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
+++ b/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
@@ -73,10 +73,10 @@ class X86DynAllocaExpanderLegacy : public MachineFunctionPass {
StringRef getPassName() const override { return "X86 DynAlloca Expander"; }
public:
- static char ID;
+ static const char ID;
};
-char X86DynAllocaExpanderLegacy::ID = 0;
+const char X86DynAllocaExpanderLegacy::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/X86/X86ExpandPseudo.cpp b/llvm/lib/Target/X86/X86ExpandPseudo.cpp
index 2f5ee9d2c9a13..cfe3df031f35f 100644
--- a/llvm/lib/Target/X86/X86ExpandPseudo.cpp
+++ b/llvm/lib/Target/X86/X86ExpandPseudo.cpp
@@ -68,7 +68,7 @@ class X86ExpandPseudoImpl {
class X86ExpandPseudoLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86ExpandPseudoLegacy() : MachineFunctionPass(ID) {}
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -94,7 +94,7 @@ class X86ExpandPseudoLegacy : public MachineFunctionPass {
return "X86 pseudo instruction expansion pass";
}
};
-char X86ExpandPseudoLegacy::ID = 0;
+const char X86ExpandPseudoLegacy::ID = 0;
} // End anonymous namespace.
INITIALIZE_PASS(X86ExpandPseudoLegacy, DEBUG_TYPE, X86_EXPAND_PSEUDO_NAME,
diff --git a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
index 9efe335666ac2..f6a5e26a22663 100644
--- a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
@@ -96,12 +96,12 @@ class X86FastPreTileConfigLegacy : public MachineFunctionPass {
/// Perform tile register configure.
bool runOnMachineFunction(MachineFunction &MFunc) override;
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86FastPreTileConfigLegacy::ID = 0;
+const char X86FastPreTileConfigLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86FastPreTileConfigLegacy, DEBUG_TYPE,
"Fast Tile Register Preconfigure", false, false)
diff --git a/llvm/lib/Target/X86/X86FastTileConfig.cpp b/llvm/lib/Target/X86/X86FastTileConfig.cpp
index f9bf5575dd44a..dd2f572f4c3e1 100644
--- a/llvm/lib/Target/X86/X86FastTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86FastTileConfig.cpp
@@ -71,12 +71,12 @@ class X86FastTileConfigLegacy : public MachineFunctionPass {
return MachineFunctionProperties().setNoPHIs();
}
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86FastTileConfigLegacy::ID = 0;
+const char X86FastTileConfigLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86FastTileConfigLegacy, DEBUG_TYPE,
"Fast Tile Register Configure", false, false)
diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp
index ffe3510af61ac..8cd5352e84e15 100644
--- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp
+++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp
@@ -130,7 +130,7 @@ class X86FixupBWInstImpl {
class X86FixupBWInstLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
StringRef getPassName() const override { return FIXUPBW_DESC; }
@@ -152,7 +152,7 @@ class X86FixupBWInstLegacy : public MachineFunctionPass {
}
};
-char X86FixupBWInstLegacy::ID = 0;
+const char X86FixupBWInstLegacy::ID = 0;
} // namespace
diff --git a/llvm/lib/Target/X86/X86FixupInstTuning.cpp b/llvm/lib/Target/X86/X86FixupInstTuning.cpp
index af3c3af38e681..85678b4f4a60d 100644
--- a/llvm/lib/Target/X86/X86FixupInstTuning.cpp
+++ b/llvm/lib/Target/X86/X86FixupInstTuning.cpp
@@ -55,7 +55,7 @@ class X86FixupInstTuningImpl {
class X86FixupInstTuningLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86FixupInstTuningLegacy() : MachineFunctionPass(ID) {}
@@ -72,7 +72,7 @@ class X86FixupInstTuningLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char X86FixupInstTuningLegacy ::ID = 0;
+const char X86FixupInstTuningLegacy ::ID = 0;
INITIALIZE_PASS(X86FixupInstTuningLegacy, DEBUG_TYPE, DEBUG_TYPE, false, false)
diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp
index 07f656fc5ccfd..d868fa0e938f4 100644
--- a/llvm/lib/Target/X86/X86FixupLEAs.cpp
+++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp
@@ -139,7 +139,7 @@ class FixupLEAsImpl {
class FixupLEAsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
StringRef getPassName() const override { return FIXUPLEA_DESC; }
@@ -160,7 +160,7 @@ class FixupLEAsLegacy : public MachineFunctionPass {
};
}
-char FixupLEAsLegacy::ID = 0;
+const char FixupLEAsLegacy::ID = 0;
INITIALIZE_PASS(FixupLEAsLegacy, FIXUPLEA_NAME, FIXUPLEA_DESC, false, false)
diff --git a/llvm/lib/Target/X86/X86FixupSetCC.cpp b/llvm/lib/Target/X86/X86FixupSetCC.cpp
index d4c7ecd270244..090b9ac4ed2ec 100644
--- a/llvm/lib/Target/X86/X86FixupSetCC.cpp
+++ b/llvm/lib/Target/X86/X86FixupSetCC.cpp
@@ -41,7 +41,7 @@ STATISTIC(NumSubstZexts, "Number of setcc + zext pairs substituted");
namespace {
class X86FixupSetCCLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86FixupSetCCLegacy() : MachineFunctionPass(ID) {}
@@ -51,7 +51,7 @@ class X86FixupSetCCLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char X86FixupSetCCLegacy::ID = 0;
+const char X86FixupSetCCLegacy::ID = 0;
INITIALIZE_PASS(X86FixupSetCCLegacy, DEBUG_TYPE, DEBUG_TYPE, false, false)
diff --git a/llvm/lib/Target/X86/X86FixupVectorConstants.cpp b/llvm/lib/Target/X86/X86FixupVectorConstants.cpp
index 2985a883a1481..845c2d49abe13 100644
--- a/llvm/lib/Target/X86/X86FixupVectorConstants.cpp
+++ b/llvm/lib/Target/X86/X86FixupVectorConstants.cpp
@@ -44,7 +44,7 @@ class X86FixupVectorConstantsImpl {
class X86FixupVectorConstantsLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86FixupVectorConstantsLegacy() : MachineFunctionPass(ID) {}
@@ -61,7 +61,7 @@ class X86FixupVectorConstantsLegacy : public MachineFunctionPass {
};
} // end anonymous namespace
-char X86FixupVectorConstantsLegacy::ID = 0;
+const char X86FixupVectorConstantsLegacy::ID = 0;
INITIALIZE_PASS(X86FixupVectorConstantsLegacy, DEBUG_TYPE, DEBUG_TYPE, false,
false)
diff --git a/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp b/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
index 93c7571d5c37f..fccc3f7d425ce 100644
--- a/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+++ b/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
@@ -120,7 +120,7 @@ class X86FlagsCopyLoweringLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
/// Pass identification, replacement for typeid.
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
@@ -134,7 +134,7 @@ FunctionPass *llvm::createX86FlagsCopyLoweringLegacyPass() {
return new X86FlagsCopyLoweringLegacy();
}
-char X86FlagsCopyLoweringLegacy::ID = 0;
+const char X86FlagsCopyLoweringLegacy::ID = 0;
void X86FlagsCopyLoweringLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addUsedIfAvailable<MachineDominatorTreeWrapperPass>();
diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp
index 8b89058c31201..4aa329e686b95 100644
--- a/llvm/lib/Target/X86/X86FloatingPoint.cpp
+++ b/llvm/lib/Target/X86/X86FloatingPoint.cpp
@@ -285,7 +285,7 @@ class X86FPStackifierLegacy : public MachineFunctionPass {
public:
X86FPStackifierLegacy() : MachineFunctionPass(ID) {}
- static char ID;
+ static const char ID;
private:
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -306,7 +306,7 @@ class X86FPStackifierLegacy : public MachineFunctionPass {
};
} // namespace
-char X86FPStackifierLegacy::ID = 0;
+const char X86FPStackifierLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86FPStackifierLegacy, DEBUG_TYPE, "X86 FP Stackifier",
false, false)
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 7607fad150db0..ba5c1b571cf16 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -606,7 +606,7 @@ namespace {
class X86DAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit X86DAGToDAGISelLegacy(X86TargetMachine &tm,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -614,7 +614,7 @@ namespace {
};
}
-char X86DAGToDAGISelLegacy::ID = 0;
+const char X86DAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(X86DAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp b/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
index 52be14228e555..b474c20a4e377 100644
--- a/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
+++ b/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
@@ -47,7 +47,7 @@ class X86IndirectBranchTrackingPass : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
private:
- static char ID;
+ static const char ID;
/// Machine instruction info used throughout the class.
const X86InstrInfo *TII = nullptr;
@@ -64,7 +64,7 @@ class X86IndirectBranchTrackingPass : public MachineFunctionPass {
} // end anonymous namespace
-char X86IndirectBranchTrackingPass::ID = 0;
+const char X86IndirectBranchTrackingPass::ID = 0;
FunctionPass *llvm::createX86IndirectBranchTrackingPass() {
return new X86IndirectBranchTrackingPass();
diff --git a/llvm/lib/Target/X86/X86IndirectThunks.cpp b/llvm/lib/Target/X86/X86IndirectThunks.cpp
index adac7b3572e7c..fdf6ebad11faa 100644
--- a/llvm/lib/Target/X86/X86IndirectThunks.cpp
+++ b/llvm/lib/Target/X86/X86IndirectThunks.cpp
@@ -101,7 +101,7 @@ struct LVIThunkInserter : ThunkInserter<LVIThunkInserter> {
class X86IndirectThunks
: public ThunkInserterPass<RetpolineThunkInserter, LVIThunkInserter> {
public:
- static char ID;
+ static const char ID;
X86IndirectThunks() : ThunkInserterPass(ID) {}
@@ -239,4 +239,4 @@ FunctionPass *llvm::createX86IndirectThunksPass() {
return new X86IndirectThunks();
}
-char X86IndirectThunks::ID = 0;
+const char X86IndirectThunks::ID = 0;
diff --git a/llvm/lib/Target/X86/X86InsertWait.cpp b/llvm/lib/Target/X86/X86InsertWait.cpp
index 69a3d32a93149..0b6ed84478cbd 100644
--- a/llvm/lib/Target/X86/X86InsertWait.cpp
+++ b/llvm/lib/Target/X86/X86InsertWait.cpp
@@ -38,7 +38,7 @@ namespace {
class WaitInsert : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
WaitInsert() : MachineFunctionPass(ID) {}
@@ -51,7 +51,7 @@ class WaitInsert : public MachineFunctionPass {
} // namespace
-char WaitInsert::ID = 0;
+const char WaitInsert::ID = 0;
FunctionPass *llvm::createX86InsertX87waitPass() { return new WaitInsert(); }
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp
index 4532327067d8d..f31a8c558a8a3 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -10408,7 +10408,7 @@ namespace {
/// Create Global Base Reg pass. This initializes the PIC
/// global base register for x86-32.
struct CGBR : public MachineFunctionPass {
- static char ID;
+ static const char ID;
CGBR() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -10504,12 +10504,12 @@ struct CGBR : public MachineFunctionPass {
};
} // namespace
-char CGBR::ID = 0;
+const char CGBR::ID = 0;
FunctionPass *llvm::createX86GlobalBaseRegPass() { return new CGBR(); }
namespace {
struct LDTLSCleanup : public MachineFunctionPass {
- static char ID;
+ static const char ID;
LDTLSCleanup() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override {
@@ -10615,7 +10615,7 @@ struct LDTLSCleanup : public MachineFunctionPass {
};
} // namespace
-char LDTLSCleanup::ID = 0;
+const char LDTLSCleanup::ID = 0;
FunctionPass *llvm::createCleanupLocalDynamicTLSPass() {
return new LDTLSCleanup();
}
diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
index 871081e328724..313417d2ec0bb 100644
--- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
@@ -144,7 +144,7 @@ class X86LoadValueInjectionLoadHardeningLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID = 0;
};
class X86LoadValueInjectionLoadHardeningImpl {
@@ -237,7 +237,7 @@ struct DOTGraphTraits<MachineGadgetGraph *> : DefaultDOTGraphTraits {
} // end namespace llvm
-char X86LoadValueInjectionLoadHardeningLegacy::ID = 0;
+const char X86LoadValueInjectionLoadHardeningLegacy::ID;
void X86LoadValueInjectionLoadHardeningLegacy::getAnalysisUsage(
AnalysisUsage &AU) const {
diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
index dc3eed9dd6a15..0a304e5d93ec0 100644
--- a/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
+++ b/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
@@ -49,12 +49,12 @@ class X86LoadValueInjectionRetHardeningLegacy : public MachineFunctionPass {
StringRef getPassName() const override { return X86LVIRetPassName; }
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86LoadValueInjectionRetHardeningLegacy::ID = 0;
+const char X86LoadValueInjectionRetHardeningLegacy::ID = 0;
static bool runX86LoadValueInjectionRetHardening(MachineFunction &MF) {
const X86Subtarget *Subtarget = &MF.getSubtarget<X86Subtarget>();
diff --git a/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp b/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
index 662aec2c15241..e8b9374bc4e30 100644
--- a/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
+++ b/llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
@@ -663,7 +663,7 @@ PreservedAnalyses X86LowerAMXIntrinsicsPass::run(Function &F,
namespace {
class X86LowerAMXIntrinsicsLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
X86LowerAMXIntrinsicsLegacyPass() : FunctionPass(ID) {}
@@ -689,7 +689,7 @@ class X86LowerAMXIntrinsicsLegacyPass : public FunctionPass {
} // namespace
static const char PassName[] = "Lower AMX intrinsics";
-char X86LowerAMXIntrinsicsLegacyPass::ID = 0;
+const char X86LowerAMXIntrinsicsLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(X86LowerAMXIntrinsicsLegacyPass, DEBUG_TYPE, PassName,
false, false)
INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
diff --git a/llvm/lib/Target/X86/X86LowerAMXType.cpp b/llvm/lib/Target/X86/X86LowerAMXType.cpp
index ff93971f81985..7742bbf41d891 100644
--- a/llvm/lib/Target/X86/X86LowerAMXType.cpp
+++ b/llvm/lib/Target/X86/X86LowerAMXType.cpp
@@ -1334,7 +1334,7 @@ namespace {
class X86LowerAMXTypeLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
X86LowerAMXTypeLegacyPass() : FunctionPass(ID) {}
@@ -1355,7 +1355,7 @@ class X86LowerAMXTypeLegacyPass : public FunctionPass {
} // anonymous namespace
static const char PassName[] = "Lower AMX type for load/store";
-char X86LowerAMXTypeLegacyPass::ID = 0;
+const char X86LowerAMXTypeLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(X86LowerAMXTypeLegacyPass, DEBUG_TYPE, PassName, false,
false)
INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
diff --git a/llvm/lib/Target/X86/X86LowerTileCopy.cpp b/llvm/lib/Target/X86/X86LowerTileCopy.cpp
index e5a374dfcc0b6..6f9943cf809c8 100644
--- a/llvm/lib/Target/X86/X86LowerTileCopy.cpp
+++ b/llvm/lib/Target/X86/X86LowerTileCopy.cpp
@@ -40,7 +40,7 @@ namespace {
class X86LowerTileCopyLegacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86LowerTileCopyLegacy() : MachineFunctionPass(ID) {}
@@ -53,7 +53,7 @@ class X86LowerTileCopyLegacy : public MachineFunctionPass {
} // namespace
-char X86LowerTileCopyLegacy::ID = 0;
+const char X86LowerTileCopyLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86LowerTileCopyLegacy, DEBUG_TYPE, "Tile Copy Lowering",
false, false)
diff --git a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp
index 6aa6608fba611..187430b1ea25e 100644
--- a/llvm/lib/Target/X86/X86OptimizeLEAs.cpp
+++ b/llvm/lib/Target/X86/X86OptimizeLEAs.cpp
@@ -304,7 +304,7 @@ class X86OptimizeLEAsLegacy : public MachineFunctionPass {
/// been calculated by LEA. Also, remove redundant LEAs.
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<ProfileSummaryInfoWrapperPass>();
@@ -315,7 +315,7 @@ class X86OptimizeLEAsLegacy : public MachineFunctionPass {
} // end anonymous namespace
-char X86OptimizeLEAsLegacy::ID = 0;
+const char X86OptimizeLEAsLegacy::ID = 0;
FunctionPass *llvm::createX86OptimizeLEAsLegacyPass() {
return new X86OptimizeLEAsLegacy();
diff --git a/llvm/lib/Target/X86/X86PadShortFunction.cpp b/llvm/lib/Target/X86/X86PadShortFunction.cpp
index 049384eefa188..4e22647898511 100644
--- a/llvm/lib/Target/X86/X86PadShortFunction.cpp
+++ b/llvm/lib/Target/X86/X86PadShortFunction.cpp
@@ -47,7 +47,7 @@ namespace {
};
struct PadShortFunc : public MachineFunctionPass {
- static char ID;
+ static const char ID;
PadShortFunc() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@@ -90,7 +90,7 @@ namespace {
TargetSchedModel TSM;
};
- char PadShortFunc::ID = 0;
+ const char PadShortFunc::ID = 0;
}
FunctionPass *llvm::createX86PadShortFunctions() {
diff --git a/llvm/lib/Target/X86/X86PartialReduction.cpp b/llvm/lib/Target/X86/X86PartialReduction.cpp
index 898c83cf9b468..000b7d7faad16 100644
--- a/llvm/lib/Target/X86/X86PartialReduction.cpp
+++ b/llvm/lib/Target/X86/X86PartialReduction.cpp
@@ -48,7 +48,7 @@ class X86PartialReduction {
class X86PartialReductionLegacy : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
X86PartialReductionLegacy() : FunctionPass(ID) {}
@@ -66,7 +66,7 @@ FunctionPass *llvm::createX86PartialReductionLegacyPass() {
return new X86PartialReductionLegacy();
}
-char X86PartialReductionLegacy::ID = 0;
+const char X86PartialReductionLegacy::ID = 0;
INITIALIZE_PASS(X86PartialReductionLegacy, DEBUG_TYPE, "X86 Partial Reduction",
false, false)
diff --git a/llvm/lib/Target/X86/X86PreTileConfig.cpp b/llvm/lib/Target/X86/X86PreTileConfig.cpp
index 58cac066f388c..90d9ee5b02ef1 100644
--- a/llvm/lib/Target/X86/X86PreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86PreTileConfig.cpp
@@ -222,12 +222,12 @@ class X86PreTileConfigLegacy : public MachineFunctionPass {
/// Perform ldtilecfg instructions inserting.
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86PreTileConfigLegacy::ID = 0;
+const char X86PreTileConfigLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86PreTileConfigLegacy, "tilepreconfig",
"Tile Register Pre-configure", false, false)
diff --git a/llvm/lib/Target/X86/X86ReturnThunks.cpp b/llvm/lib/Target/X86/X86ReturnThunks.cpp
index a3df6969bce4e..0ee5864e730fe 100644
--- a/llvm/lib/Target/X86/X86ReturnThunks.cpp
+++ b/llvm/lib/Target/X86/X86ReturnThunks.cpp
@@ -48,14 +48,14 @@ constexpr StringRef X86ReturnThunksPassName = "X86 Return Thunks";
namespace {
struct X86ReturnThunksLegacy final : public MachineFunctionPass {
- static char ID;
+ static const char ID;
X86ReturnThunksLegacy() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return X86ReturnThunksPassName; }
bool runOnMachineFunction(MachineFunction &MF) override;
};
} // namespace
-char X86ReturnThunksLegacy::ID = 0;
+const char X86ReturnThunksLegacy::ID = 0;
static bool runX86ReturnThunks(MachineFunction &MF) {
LLVM_DEBUG(dbgs() << X86ReturnThunksPassName << "\n");
diff --git a/llvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp b/llvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp
index 5558ffd7ab067..08779ca71f971 100644
--- a/llvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp
+++ b/llvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp
@@ -65,14 +65,14 @@ class X86SpeculativeExecutionSideEffectSuppressionLegacy
X86SpeculativeExecutionSideEffectSuppressionLegacy()
: MachineFunctionPass(ID) {}
- static char ID;
+ static const char ID;
StringRef getPassName() const override { return X86SESESPassName; }
bool runOnMachineFunction(MachineFunction &MF) override;
};
} // namespace
-char X86SpeculativeExecutionSideEffectSuppressionLegacy::ID = 0;
+const char X86SpeculativeExecutionSideEffectSuppressionLegacy::ID = 0;
// This function returns whether the passed instruction uses a memory addressing
// mode that is constant. We treat all memory addressing modes that read
diff --git a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
index 817cc86a63cdf..e6681296c2f03 100644
--- a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
+++ b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
@@ -128,7 +128,7 @@ class X86SpeculativeLoadHardeningLegacy : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
/// Pass identification, replacement for typeid.
- static char ID;
+ static const char ID;
};
class X86SpeculativeLoadHardeningImpl {
@@ -227,7 +227,7 @@ bool X86SpeculativeLoadHardeningLegacy::runOnMachineFunction(
return Changed;
}
-char X86SpeculativeLoadHardeningLegacy::ID = 0;
+const char X86SpeculativeLoadHardeningLegacy::ID = 0;
void X86SpeculativeLoadHardeningLegacy::getAnalysisUsage(
AnalysisUsage &AU) const {
diff --git a/llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp b/llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp
index 1df67bf400726..8fcc09c2d2946 100644
--- a/llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp
+++ b/llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp
@@ -48,11 +48,11 @@ class X86SuppressAPXForRelocationLegacy : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
- static char ID;
+ static const char ID;
};
} // namespace
-char X86SuppressAPXForRelocationLegacy::ID = 0;
+const char X86SuppressAPXForRelocationLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86SuppressAPXForRelocationLegacy, DEBUG_TYPE,
"X86 Suppress APX features for relocation", false, false)
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 81c18fecd43b0..a94cbdd7b4274 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -392,13 +392,13 @@ class X86PassConfig : public TargetPassConfig {
class X86ExecutionDomainFix : public ExecutionDomainFix {
public:
- static char ID;
+ static const char ID;
X86ExecutionDomainFix() : ExecutionDomainFix(ID, X86::VR128XRegClass) {}
StringRef getPassName() const override {
return "X86 Execution Dependency Fix";
}
};
-char X86ExecutionDomainFix::ID;
+const char X86ExecutionDomainFix::ID = 0;
} // end anonymous namespace
diff --git a/llvm/lib/Target/X86/X86TileConfig.cpp b/llvm/lib/Target/X86/X86TileConfig.cpp
index 660bd0a77ab79..ef7d635f75529 100644
--- a/llvm/lib/Target/X86/X86TileConfig.cpp
+++ b/llvm/lib/Target/X86/X86TileConfig.cpp
@@ -61,12 +61,12 @@ struct X86TileConfigLegacy : public MachineFunctionPass {
return MachineFunctionProperties().setNoPHIs();
}
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char X86TileConfigLegacy::ID = 0;
+const char X86TileConfigLegacy::ID = 0;
INITIALIZE_PASS_BEGIN(X86TileConfigLegacy, DEBUG_TYPE,
"Tile Register Configure", false, false)
diff --git a/llvm/lib/Target/X86/X86VZeroUpper.cpp b/llvm/lib/Target/X86/X86VZeroUpper.cpp
index 2f28ab36aa193..7f6bf48771886 100644
--- a/llvm/lib/Target/X86/X86VZeroUpper.cpp
+++ b/llvm/lib/Target/X86/X86VZeroUpper.cpp
@@ -105,12 +105,12 @@ namespace {
bool IsX86INTR;
const TargetInstrInfo *TII;
- static char ID;
+ static const char ID;
};
} // end anonymous namespace
-char VZeroUpperInserter::ID = 0;
+const char VZeroUpperInserter::ID = 0;
FunctionPass *llvm::createX86IssueVZeroUpperPass() {
return new VZeroUpperInserter();
diff --git a/llvm/lib/Target/X86/X86WinEHState.cpp b/llvm/lib/Target/X86/X86WinEHState.cpp
index b568f1b4086ed..7f1955b3885a5 100644
--- a/llvm/lib/Target/X86/X86WinEHState.cpp
+++ b/llvm/lib/Target/X86/X86WinEHState.cpp
@@ -40,7 +40,7 @@ const int OverdefinedState = INT_MIN;
class WinEHStatePass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
WinEHStatePass() : FunctionPass(ID) {}
@@ -119,7 +119,7 @@ class WinEHStatePass : public FunctionPass {
FunctionPass *llvm::createX86WinEHStatePass() { return new WinEHStatePass(); }
-char WinEHStatePass::ID = 0;
+const char WinEHStatePass::ID = 0;
INITIALIZE_PASS(WinEHStatePass, "x86-winehstate",
"Insert stores for EH state numbers", false, false)
diff --git a/llvm/lib/Target/X86/X86WinEHUnwindV2.cpp b/llvm/lib/Target/X86/X86WinEHUnwindV2.cpp
index f4a5bdd842c65..35623c670efc6 100644
--- a/llvm/lib/Target/X86/X86WinEHUnwindV2.cpp
+++ b/llvm/lib/Target/X86/X86WinEHUnwindV2.cpp
@@ -66,7 +66,7 @@ struct FrameInfo {
class X86WinEHUnwindV2Legacy : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
X86WinEHUnwindV2Legacy() : MachineFunctionPass(ID) {
initializeX86WinEHUnwindV2LegacyPass(*PassRegistry::getPassRegistry());
@@ -99,7 +99,7 @@ enum class FunctionState {
} // end anonymous namespace
-char X86WinEHUnwindV2Legacy::ID = 0;
+const char X86WinEHUnwindV2Legacy::ID = 0;
INITIALIZE_PASS(X86WinEHUnwindV2Legacy, "x86-wineh-unwindv2",
"Analyze and emit instructions for Win64 Unwind v2", false,
diff --git a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
index 0426088caf244..293a4ffef2331 100644
--- a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
@@ -49,7 +49,7 @@ namespace {
XCoreTargetStreamer &getTargetStreamer();
public:
- static char ID;
+ static const char ID;
explicit XCoreAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
@@ -290,7 +290,7 @@ void XCoreAsmPrinter::emitInstruction(const MachineInstr *MI) {
EmitToStreamer(*OutStreamer, TmpInst);
}
-char XCoreAsmPrinter::ID = 0;
+const char XCoreAsmPrinter::ID = 0;
INITIALIZE_PASS(XCoreAsmPrinter, "xcore-asm-printer", "XCore Assembly Printer",
false, false)
diff --git a/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp b/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp
index e56bf675205e2..2e35a77373bca 100644
--- a/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp
+++ b/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp
@@ -20,7 +20,7 @@ using namespace llvm;
namespace {
struct XCoreFTAOElim : public MachineFunctionPass {
- static char ID;
+ static const char ID;
XCoreFTAOElim() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &Fn) override;
@@ -32,7 +32,7 @@ namespace {
return "XCore FRAME_TO_ARGS_OFFSET Elimination";
}
};
- char XCoreFTAOElim::ID = 0;
+ const char XCoreFTAOElim::ID = 0;
}
/// createXCoreFrameToArgsOffsetEliminationPass - returns an instance of the
diff --git a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
index 931f5955955dc..636171eddf57b 100644
--- a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
@@ -73,7 +73,7 @@ namespace {
class XCoreDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
explicit XCoreDAGToDAGISelLegacy(XCoreTargetMachine &TM,
CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -81,7 +81,7 @@ namespace {
};
} // end anonymous namespace
-char XCoreDAGToDAGISelLegacy::ID = 0;
+const char XCoreDAGToDAGISelLegacy::ID = 0;
INITIALIZE_PASS(XCoreDAGToDAGISelLegacy, DEBUG_TYPE, PASS_NAME, false, false)
diff --git a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp
index 9e373021a826a..057888c8762f8 100644
--- a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp
+++ b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp
@@ -39,7 +39,7 @@ namespace {
/// expanded to an array of n elements indexed by the thread ID where n is the
/// fixed number hardware threads supported by the device.
struct XCoreLowerThreadLocal : public ModulePass {
- static char ID;
+ static const char ID;
XCoreLowerThreadLocal() : ModulePass(ID) {}
@@ -49,7 +49,7 @@ namespace {
};
}
-char XCoreLowerThreadLocal::ID = 0;
+const char XCoreLowerThreadLocal::ID = 0;
INITIALIZE_PASS(XCoreLowerThreadLocal, "xcore-lower-thread-local",
"Lower thread local variables", false, false)
diff --git a/llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp b/llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
index 4d07400e996ba..d606fcc148d43 100644
--- a/llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
+++ b/llvm/lib/Target/Xtensa/XtensaAsmPrinter.cpp
@@ -311,7 +311,7 @@ void XtensaAsmPrinter::lowerToMCInst(const MachineInstr *MI,
}
}
-char XtensaAsmPrinter::ID = 0;
+const char XtensaAsmPrinter::ID = 0;
INITIALIZE_PASS(XtensaAsmPrinter, "xtensa-asm-printer",
"Xtensa Assembly Printer", false, false)
diff --git a/llvm/lib/Target/Xtensa/XtensaAsmPrinter.h b/llvm/lib/Target/Xtensa/XtensaAsmPrinter.h
index 5ab2f79925113..4247fe0ae53ba 100644
--- a/llvm/lib/Target/Xtensa/XtensaAsmPrinter.h
+++ b/llvm/lib/Target/Xtensa/XtensaAsmPrinter.h
@@ -29,7 +29,7 @@ class LLVM_LIBRARY_VISIBILITY XtensaAsmPrinter : public AsmPrinter {
const MCSubtargetInfo *STI;
public:
- static char ID;
+ static const char ID;
explicit XtensaAsmPrinter(TargetMachine &TM,
std::unique_ptr<MCStreamer> Streamer)
diff --git a/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp b/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp
index 655b40fc57b97..397c4a979500e 100644
--- a/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp
@@ -115,7 +115,7 @@ class XtensaDAGToDAGISel : public SelectionDAGISel {
class XtensaDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
public:
- static char ID;
+ static const char ID;
XtensaDAGToDAGISelLegacy(XtensaTargetMachine &TM, CodeGenOptLevel OptLevel)
: SelectionDAGISelLegacy(
@@ -127,7 +127,7 @@ class XtensaDAGToDAGISelLegacy : public SelectionDAGISelLegacy {
};
} // end anonymous namespace
-char XtensaDAGToDAGISelLegacy::ID = 0;
+const char XtensaDAGToDAGISelLegacy::ID = 0;
FunctionPass *llvm::createXtensaISelDag(XtensaTargetMachine &TM,
CodeGenOptLevel OptLevel) {
diff --git a/llvm/lib/TextAPI/TextAPIError.cpp b/llvm/lib/TextAPI/TextAPIError.cpp
index 23954a9e3466d..37675a78a9d72 100644
--- a/llvm/lib/TextAPI/TextAPIError.cpp
+++ b/llvm/lib/TextAPI/TextAPIError.cpp
@@ -16,7 +16,7 @@
using namespace llvm;
using namespace llvm::MachO;
-char TextAPIError::ID = 0;
+const char TextAPIError::ID = 0;
void TextAPIError::log(raw_ostream &OS) const {
switch (EC) {
diff --git a/llvm/lib/Transforms/CFGuard/CFGuard.cpp b/llvm/lib/Transforms/CFGuard/CFGuard.cpp
index 28d0eddca7ce2..a75e87357c191 100644
--- a/llvm/lib/Transforms/CFGuard/CFGuard.cpp
+++ b/llvm/lib/Transforms/CFGuard/CFGuard.cpp
@@ -159,7 +159,7 @@ class CFGuard : public FunctionPass {
CFGuardImpl Impl;
public:
- static char ID;
+ static const char ID;
// Default constructor required for the INITIALIZE_PASS macro.
CFGuard(CFGuardImpl::Mechanism M) : FunctionPass(ID), Impl(M) {}
@@ -300,7 +300,7 @@ PreservedAnalyses CFGuardPass::run(Function &F, FunctionAnalysisManager &FAM) {
return Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
}
-char CFGuard::ID = 0;
+const char CFGuard::ID = 0;
INITIALIZE_PASS(CFGuard, "CFGuard", "CFGuard", false, false)
FunctionPass *llvm::createCFGuardCheckPass() {
diff --git a/llvm/lib/Transforms/IPO/AlwaysInliner.cpp b/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
index 921fe8c18aa72..28a2ea5c79d63 100644
--- a/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
+++ b/llvm/lib/Transforms/IPO/AlwaysInliner.cpp
@@ -141,7 +141,7 @@ struct AlwaysInlinerLegacyPass : public ModulePass {
GetAssumptionCache, GetAAR);
}
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<AssumptionCacheTracker>();
@@ -152,7 +152,7 @@ struct AlwaysInlinerLegacyPass : public ModulePass {
} // namespace
-char AlwaysInlinerLegacyPass::ID = 0;
+const char AlwaysInlinerLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(AlwaysInlinerLegacyPass, "always-inline",
"Inliner for always_inline functions", false, false)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
diff --git a/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp b/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp
index b49a92ad16b3a..2f47b957e2fab 100644
--- a/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp
+++ b/llvm/lib/Transforms/IPO/BarrierNoopPass.cpp
@@ -30,7 +30,7 @@ namespace {
/// when they are phrased as non-module passes.
class BarrierNoop : public ModulePass {
public:
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
BarrierNoop() : ModulePass(ID) {
initializeBarrierNoopPass(*PassRegistry::getPassRegistry());
@@ -42,6 +42,6 @@ class BarrierNoop : public ModulePass {
ModulePass *llvm::createBarrierNoopPass() { return new BarrierNoop(); }
-char BarrierNoop::ID = 0;
+const char BarrierNoop::ID = 0;
INITIALIZE_PASS(BarrierNoop, "barrier", "A No-Op Barrier Pass",
false, false)
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index d32b829e2ad79..409887bfb1070 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -66,10 +66,10 @@ namespace {
class DAE : public ModulePass {
protected:
// DAH uses this to specify a different ID.
- explicit DAE(char &ID) : ModulePass(ID) {}
+ explicit DAE(const char &ID) : ModulePass(ID) {}
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
DAE() : ModulePass(ID) {
initializeDAEPass(*PassRegistry::getPassRegistry());
@@ -89,7 +89,7 @@ class DAE : public ModulePass {
} // end anonymous namespace
-char DAE::ID = 0;
+const char DAE::ID = 0;
INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false)
@@ -98,7 +98,7 @@ namespace {
/// The DeadArgumentHacking pass, same as dead argument elimination, but deletes
/// arguments to functions which are external. This is only for use by bugpoint.
struct DAH : public DAE {
- static char ID;
+ static const char ID;
DAH() : DAE(ID) {}
@@ -107,7 +107,7 @@ struct DAH : public DAE {
} // end anonymous namespace
-char DAH::ID = 0;
+const char DAH::ID = 0;
INITIALIZE_PASS(DAH, "deadarghaX0r",
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)", false,
diff --git a/llvm/lib/Transforms/IPO/ExpandVariadics.cpp b/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
index a908db0d1830a..164656a8dcaf4 100644
--- a/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
+++ b/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
@@ -144,7 +144,7 @@ class ExpandVariadics : public ModulePass {
// clang that has no variadic function calls remaining in the binary.
public:
- static char ID;
+ static const char ID;
const ExpandVariadicsMode Mode;
std::unique_ptr<VariadicABIInfo> ABI;
@@ -1052,7 +1052,7 @@ std::unique_ptr<VariadicABIInfo> VariadicABIInfo::create(const Triple &T) {
} // namespace
-char ExpandVariadics::ID = 0;
+const char ExpandVariadics::ID = 0;
INITIALIZE_PASS(ExpandVariadics, DEBUG_TYPE, "Expand variadic functions", false,
false)
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
index c576fbc92f709..c685023cd3c5c 100644
--- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -35,7 +35,7 @@ using namespace llvm;
namespace {
class GlobalDCELegacyPass : public ModulePass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
GlobalDCELegacyPass() : ModulePass(ID) {
initializeGlobalDCELegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -54,7 +54,7 @@ class GlobalDCELegacyPass : public ModulePass {
};
} // namespace
-char GlobalDCELegacyPass::ID = 0;
+const char GlobalDCELegacyPass::ID = 0;
INITIALIZE_PASS(GlobalDCELegacyPass, "globaldce", "Dead Global Elimination",
false, false)
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index 24b3c42518076..bb17d97964c96 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -34,7 +34,7 @@ STATISTIC(NumExtracted, "Number of loops extracted");
namespace {
struct LoopExtractorLegacyPass : public ModulePass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
unsigned NumLoops;
@@ -82,7 +82,7 @@ struct LoopExtractor {
};
} // namespace
-char LoopExtractorLegacyPass::ID = 0;
+const char LoopExtractorLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(LoopExtractorLegacyPass, "loop-extract",
"Extract loops into new functions", false, false)
INITIALIZE_PASS_DEPENDENCY(BreakCriticalEdges)
@@ -95,12 +95,12 @@ INITIALIZE_PASS_END(LoopExtractorLegacyPass, "loop-extract",
namespace {
/// SingleLoopExtractor - For bugpoint.
struct SingleLoopExtractor : public LoopExtractorLegacyPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
SingleLoopExtractor() : LoopExtractorLegacyPass(1) {}
};
} // End anonymous namespace
-char SingleLoopExtractor::ID = 0;
+const char SingleLoopExtractor::ID = 0;
INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
"Extract at most one loop into a new function", false, false)
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index e2bda2450c66f..ea5ca1a5e9a5b 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -6227,7 +6227,7 @@ void InstCombinePass::printPipeline(
OS << '>';
}
-char InstCombinePass::ID = 0;
+const char InstCombinePass::ID = 0;
PreservedAnalyses InstCombinePass::run(Function &F,
FunctionAnalysisManager &AM) {
@@ -6309,7 +6309,7 @@ bool InstructionCombiningPass::runOnFunction(Function &F) {
BFI, BPI, PSI, InstCombineOptions());
}
-char InstructionCombiningPass::ID = 0;
+const char InstructionCombiningPass::ID = 0;
InstructionCombiningPass::InstructionCombiningPass() : FunctionPass(ID) {
initializeInstructionCombiningPassPass(*PassRegistry::getPassRegistry());
diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
index 86d7e2f07c1d9..c7fc19c21e9fe 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
@@ -118,7 +118,7 @@ class ObjCARCContractLegacyPass : public FunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;
- static char ID;
+ static const char ID;
ObjCARCContractLegacyPass() : FunctionPass(ID) {
initializeObjCARCContractLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -746,7 +746,7 @@ bool ObjCARCContract::run(Function &F, AAResults *A, DominatorTree *D) {
// Misc Pass Manager
//===----------------------------------------------------------------------===//
-char ObjCARCContractLegacyPass::ID = 0;
+const char ObjCARCContractLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ObjCARCContractLegacyPass, "objc-arc-contract",
"ObjC ARC contraction", false, false)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
index db594e033e21e..fbe6192992fb8 100644
--- a/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
@@ -96,7 +96,7 @@ namespace {
/// The constant hoisting pass.
class ConstantHoistingLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
ConstantHoistingLegacyPass() : FunctionPass(ID) {
initializeConstantHoistingLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -121,7 +121,7 @@ class ConstantHoistingLegacyPass : public FunctionPass {
} // end anonymous namespace
-char ConstantHoistingLegacyPass::ID = 0;
+const char ConstantHoistingLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ConstantHoistingLegacyPass, "consthoist",
"Constant Hoisting", false, false)
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp
index 2ad46130dc945..c8e6dded0b8a2 100644
--- a/llvm/lib/Transforms/Scalar/DCE.cpp
+++ b/llvm/lib/Transforms/Scalar/DCE.cpp
@@ -117,7 +117,7 @@ PreservedAnalyses DCEPass::run(Function &F, FunctionAnalysisManager &AM) {
namespace {
struct DCELegacyPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
DCELegacyPass() : FunctionPass(ID) {
initializeDCELegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -139,7 +139,7 @@ struct DCELegacyPass : public FunctionPass {
};
}
-char DCELegacyPass::ID = 0;
+const char DCELegacyPass::ID = 0;
INITIALIZE_PASS(DCELegacyPass, "dce", "Dead Code Elimination", false, false)
FunctionPass *llvm::createDeadCodeEliminationPass() {
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 582ec1dbcec98..2456b8bdafe5a 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -2703,7 +2703,7 @@ namespace {
/// A legacy pass for the legacy pass manager that wraps \c DSEPass.
class DSELegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
DSELegacyPass() : FunctionPass(ID) {
initializeDSELegacyPassPass(*PassRegistry::getPassRegistry());
@@ -2752,7 +2752,7 @@ class DSELegacyPass : public FunctionPass {
} // end anonymous namespace
-char DSELegacyPass::ID = 0;
+const char DSELegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(DSELegacyPass, "dse", "Dead Store Elimination", false,
false)
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
index e30f3060c27a6..6bdd344e89cdc 100644
--- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -1869,7 +1869,7 @@ namespace {
template<bool UseMemorySSA>
class EarlyCSELegacyCommonPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
EarlyCSELegacyCommonPass() : FunctionPass(ID) {
if (UseMemorySSA)
@@ -1914,8 +1914,7 @@ class EarlyCSELegacyCommonPass : public FunctionPass {
using EarlyCSELegacyPass = EarlyCSELegacyCommonPass</*UseMemorySSA=*/false>;
-template<>
-char EarlyCSELegacyPass::ID = 0;
+template <> const char EarlyCSELegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(EarlyCSELegacyPass, "early-cse", "Early CSE", false,
false)
@@ -1928,8 +1927,7 @@ INITIALIZE_PASS_END(EarlyCSELegacyPass, "early-cse", "Early CSE", false, false)
using EarlyCSEMemSSALegacyPass =
EarlyCSELegacyCommonPass</*UseMemorySSA=*/true>;
-template<>
-char EarlyCSEMemSSALegacyPass::ID = 0;
+template <> const char EarlyCSEMemSSALegacyPass::ID = 0;
FunctionPass *llvm::createEarlyCSEPass(bool UseMemorySSA) {
if (UseMemorySSA)
diff --git a/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp b/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
index 1335665e114dd..8cf9e115b8a38 100644
--- a/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
+++ b/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
namespace {
struct FlattenCFGLegacyPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
public:
FlattenCFGLegacyPass() : FunctionPass(ID) {
initializeFlattenCFGLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -69,7 +69,7 @@ static bool iterativelyFlattenCFG(Function &F, AliasAnalysis *AA) {
return Changed;
}
-char FlattenCFGLegacyPass::ID = 0;
+const char FlattenCFGLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(FlattenCFGLegacyPass, "flattencfg", "Flatten the CFG",
false, false)
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 4a9dcb5e2effd..ee66f9e9e8b53 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -3335,7 +3335,7 @@ void GVNPass::assignValNumForDeadCode() {
class llvm::gvn::GVNLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid.
+ static const char ID; // Pass identification, replacement for typeid.
explicit GVNLegacyPass(bool MemDepAnalysis = GVNEnableMemDep,
bool MemSSAAnalysis = GVNEnableMemorySSA)
@@ -3388,7 +3388,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass {
GVNPass Impl;
};
-char GVNLegacyPass::ID = 0;
+const char GVNLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(GVNLegacyPass, "gvn", "Global Value Numbering", false, false)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
diff --git a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
index 03efc156df1e8..b43cc1ae0b0eb 100644
--- a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
+++ b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
@@ -161,7 +161,7 @@ class InferAddressSpaces : public FunctionPass {
unsigned FlatAddrSpace = 0;
public:
- static char ID;
+ static const char ID;
InferAddressSpaces()
: FunctionPass(ID), FlatAddrSpace(UninitializedAddressSpace) {
@@ -261,7 +261,7 @@ class InferAddressSpacesImpl {
} // end anonymous namespace
-char InferAddressSpaces::ID = 0;
+const char InferAddressSpaces::ID = 0;
INITIALIZE_PASS_BEGIN(InferAddressSpaces, DEBUG_TYPE, "Infer address spaces",
false, false)
diff --git a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
index 326849a4eb395..5411d75682227 100644
--- a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
+++ b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
@@ -76,7 +76,7 @@ static bool runImpl(Function &F, const SimplifyQuery &SQ) {
namespace {
struct InstSimplifyLegacyPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
InstSimplifyLegacyPass() : FunctionPass(ID) {
initializeInstSimplifyLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -106,7 +106,7 @@ struct InstSimplifyLegacyPass : public FunctionPass {
};
} // namespace
-char InstSimplifyLegacyPass::ID = 0;
+const char InstSimplifyLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(InstSimplifyLegacyPass, "instsimplify",
"Remove redundant instructions", false, false)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 02ece8bdf31db..78369092b6370 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -243,7 +243,7 @@ struct LoopInvariantCodeMotion {
};
struct LegacyLICMPass : public LoopPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LegacyLICMPass(
unsigned LicmMssaOptCap = SetLicmMssaOptCap,
unsigned LicmMssaNoAccForPromotionCap = SetLicmMssaNoAccForPromotionCap,
@@ -372,7 +372,7 @@ void LNICMPass::printPipeline(
OS << '>';
}
-char LegacyLICMPass::ID = 0;
+const char LegacyLICMPass::ID = 0;
INITIALIZE_PASS_BEGIN(LegacyLICMPass, "licm", "Loop Invariant Code Motion",
false, false)
INITIALIZE_PASS_DEPENDENCY(LoopPass)
diff --git a/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp
index 6f0d8dcb05e04..dfb1a3a031b53 100644
--- a/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp
@@ -113,7 +113,7 @@ class LoopDataPrefetch {
/// Legacy class for inserting loop data prefetches.
class LoopDataPrefetchLegacyPass : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
LoopDataPrefetchLegacyPass() : FunctionPass(ID) {
initializeLoopDataPrefetchLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -136,7 +136,7 @@ class LoopDataPrefetchLegacyPass : public FunctionPass {
};
}
-char LoopDataPrefetchLegacyPass::ID = 0;
+const char LoopDataPrefetchLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(LoopDataPrefetchLegacyPass, "loop-data-prefetch",
"Loop Data Prefetch", false, false)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index e9d78baece25b..dc4af6f0dd204 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -6328,7 +6328,7 @@ namespace {
class LoopStrengthReduce : public LoopPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
LoopStrengthReduce();
@@ -7142,7 +7142,7 @@ PreservedAnalyses LoopStrengthReducePass::run(Loop &L, LoopAnalysisManager &AM,
return PA;
}
-char LoopStrengthReduce::ID = 0;
+const char LoopStrengthReduce::ID = 0;
INITIALIZE_PASS_BEGIN(LoopStrengthReduce, "loop-reduce",
"Loop Strength Reduction", false, false)
diff --git a/llvm/lib/Transforms/Scalar/LoopTermFold.cpp b/llvm/lib/Transforms/Scalar/LoopTermFold.cpp
index 26964ab1e8745..f74a97e55ac6b 100644
--- a/llvm/lib/Transforms/Scalar/LoopTermFold.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopTermFold.cpp
@@ -301,7 +301,7 @@ namespace {
class LoopTermFold : public LoopPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
LoopTermFold();
@@ -360,7 +360,7 @@ PreservedAnalyses LoopTermFoldPass::run(Loop &L, LoopAnalysisManager &AM,
return PA;
}
-char LoopTermFold::ID = 0;
+const char LoopTermFold::ID = 0;
INITIALIZE_PASS_BEGIN(LoopTermFold, "loop-term-fold", "Loop Terminator Folding",
false, false)
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 6050650eb937c..3d88eaf90df76 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -1394,7 +1394,7 @@ namespace {
class LoopUnroll : public LoopPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
int OptLevel;
@@ -1481,7 +1481,7 @@ class LoopUnroll : public LoopPass {
} // end anonymous namespace
-char LoopUnroll::ID = 0;
+const char LoopUnroll::ID = 0;
INITIALIZE_PASS_BEGIN(LoopUnroll, "loop-unroll", "Unroll loops", false, false)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
diff --git a/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp b/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
index c93baf38e079b..d600f12403dcc 100644
--- a/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
@@ -73,7 +73,7 @@ PreservedAnalyses LowerAtomicPass::run(Function &F, FunctionAnalysisManager &) {
namespace {
class LowerAtomicLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
LowerAtomicLegacyPass() : FunctionPass(ID) {
initializeLowerAtomicLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -91,7 +91,7 @@ class LowerAtomicLegacyPass : public FunctionPass {
};
}
-char LowerAtomicLegacyPass::ID = 0;
+const char LowerAtomicLegacyPass::ID = 0;
INITIALIZE_PASS(LowerAtomicLegacyPass, "loweratomic",
"Lower atomic intrinsics to non-atomic form", false, false)
diff --git a/llvm/lib/Transforms/Scalar/MergeICmps.cpp b/llvm/lib/Transforms/Scalar/MergeICmps.cpp
index d4358c1a6a599..f0b9f032e0845 100644
--- a/llvm/lib/Transforms/Scalar/MergeICmps.cpp
+++ b/llvm/lib/Transforms/Scalar/MergeICmps.cpp
@@ -918,7 +918,7 @@ static bool runImpl(Function &F, const TargetLibraryInfo &TLI,
namespace {
class MergeICmpsLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
MergeICmpsLegacyPass() : FunctionPass(ID) {
initializeMergeICmpsLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -947,7 +947,7 @@ class MergeICmpsLegacyPass : public FunctionPass {
} // namespace
-char MergeICmpsLegacyPass::ID = 0;
+const char MergeICmpsLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(MergeICmpsLegacyPass, "mergeicmps",
"Merge contiguous icmps into a memcmp", false, false)
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
index ec145f2f48bea..d414ce10475b3 100644
--- a/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/NaryReassociate.cpp
@@ -120,7 +120,7 @@ namespace {
class NaryReassociateLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
NaryReassociateLegacyPass() : FunctionPass(ID) {
initializeNaryReassociateLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -150,7 +150,7 @@ class NaryReassociateLegacyPass : public FunctionPass {
} // end anonymous namespace
-char NaryReassociateLegacyPass::ID = 0;
+const char NaryReassociateLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(NaryReassociateLegacyPass, "nary-reassociate",
"Nary reassociation", false, false)
diff --git a/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
index bcedc1ab2a3ca..696d0dcd8f404 100644
--- a/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
@@ -186,7 +186,7 @@ PartiallyInlineLibCallsPass::run(Function &F, FunctionAnalysisManager &AM) {
namespace {
class PartiallyInlineLibCallsLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
PartiallyInlineLibCallsLegacyPass() : FunctionPass(ID) {
initializePartiallyInlineLibCallsLegacyPassPass(
@@ -218,7 +218,7 @@ class PartiallyInlineLibCallsLegacyPass : public FunctionPass {
};
}
-char PartiallyInlineLibCallsLegacyPass::ID = 0;
+const char PartiallyInlineLibCallsLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(PartiallyInlineLibCallsLegacyPass,
"partially-inline-libcalls",
"Partially inline calls to library functions", false,
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
index 44600acf5b418..0c1b47078cd66 100644
--- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -103,7 +103,7 @@ namespace {
/// the function which require a safepoint poll to be inserted.
class PlaceBackedgeSafepointsLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
/// The output of the pass - gives a list of each backedge (described by
/// pointing at the branch) which need a poll inserted.
@@ -161,7 +161,7 @@ static cl::opt<bool> NoEntry("spp-no-entry", cl::Hidden, cl::init(false));
static cl::opt<bool> NoCall("spp-no-call", cl::Hidden, cl::init(false));
static cl::opt<bool> NoBackedge("spp-no-backedge", cl::Hidden, cl::init(false));
-char PlaceBackedgeSafepointsLegacyPass::ID = 0;
+const char PlaceBackedgeSafepointsLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(PlaceBackedgeSafepointsLegacyPass,
"place-backedge-safepoints-impl",
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 010ff6e1fa5b4..ccf68654a5363 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -2630,7 +2630,7 @@ class ReassociateLegacyPass : public FunctionPass {
ReassociatePass Impl;
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
ReassociateLegacyPass() : FunctionPass(ID) {
initializeReassociateLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -2655,7 +2655,7 @@ class ReassociateLegacyPass : public FunctionPass {
} // end anonymous namespace
-char ReassociateLegacyPass::ID = 0;
+const char ReassociateLegacyPass::ID = 0;
INITIALIZE_PASS(ReassociateLegacyPass, "reassociate",
"Reassociate expressions", false, false)
diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
index 764662441a040..d91bb5bf9e9da 100644
--- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
@@ -111,7 +111,7 @@ namespace {
class RegToMemWrapperPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
RegToMemWrapperPass() : FunctionPass(ID) {}
@@ -141,7 +141,7 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass);
INITIALIZE_PASS_END(RegToMemWrapperPass, "reg2mem", "", true, true)
-char RegToMemWrapperPass::ID = 0;
+const char RegToMemWrapperPass::ID = 0;
FunctionPass *llvm::createRegToMemWrapperPass() {
return new RegToMemWrapperPass();
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index f0a1aa3367f5b..c4e8b48ae8c30 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -6092,7 +6092,7 @@ class SROALegacyPass : public FunctionPass {
SROAOptions PreserveCFG;
public:
- static char ID;
+ static const char ID;
SROALegacyPass(SROAOptions PreserveCFG = SROAOptions::PreserveCFG)
: FunctionPass(ID), PreserveCFG(PreserveCFG) {
@@ -6124,7 +6124,7 @@ class SROALegacyPass : public FunctionPass {
} // end anonymous namespace
-char SROALegacyPass::ID = 0;
+const char SROALegacyPass::ID = 0;
FunctionPass *llvm::createSROAPass(bool PreserveCFG) {
return new SROALegacyPass(PreserveCFG ? SROAOptions::PreserveCFG
diff --git a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
index b7b08ae61ec52..6a35a78711886 100644
--- a/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
@@ -46,7 +46,7 @@ namespace {
class ScalarizeMaskedMemIntrinLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit ScalarizeMaskedMemIntrinLegacyPass() : FunctionPass(ID) {
initializeScalarizeMaskedMemIntrinLegacyPassPass(
@@ -75,7 +75,7 @@ static bool optimizeCallInst(CallInst *CI, bool &ModifiedDT,
const DataLayout &DL, bool HasBranchDivergence,
DomTreeUpdater *DTU);
-char ScalarizeMaskedMemIntrinLegacyPass::ID = 0;
+const char ScalarizeMaskedMemIntrinLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ScalarizeMaskedMemIntrinLegacyPass, DEBUG_TYPE,
"Scalarize unsupported masked memory intrinsics", false,
diff --git a/llvm/lib/Transforms/Scalar/Scalarizer.cpp b/llvm/lib/Transforms/Scalar/Scalarizer.cpp
index 46f92c3de04da..8ce0ec21b42d4 100644
--- a/llvm/lib/Transforms/Scalar/Scalarizer.cpp
+++ b/llvm/lib/Transforms/Scalar/Scalarizer.cpp
@@ -341,7 +341,7 @@ class ScalarizerVisitor : public InstVisitor<ScalarizerVisitor, bool> {
class ScalarizerLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
ScalarizerPassOptions Options;
ScalarizerLegacyPass() : FunctionPass(ID), Options() {}
ScalarizerLegacyPass(const ScalarizerPassOptions &Options);
@@ -360,7 +360,7 @@ void ScalarizerLegacyPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<DominatorTreeWrapperPass>();
}
-char ScalarizerLegacyPass::ID = 0;
+const char ScalarizerLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(ScalarizerLegacyPass, "scalarizer",
"Scalarize vector operations", false, false)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
index e01b5797e6622..dda28ef283e71 100644
--- a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -318,7 +318,7 @@ class ConstantOffsetExtractor {
/// constant offset may inspect other basic blocks.
class SeparateConstOffsetFromGEPLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
SeparateConstOffsetFromGEPLegacyPass(bool LowerGEP = false)
: FunctionPass(ID), LowerGEP(LowerGEP) {
@@ -454,7 +454,7 @@ class SeparateConstOffsetFromGEP {
} // end anonymous namespace
-char SeparateConstOffsetFromGEPLegacyPass::ID = 0;
+const char SeparateConstOffsetFromGEPLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(
SeparateConstOffsetFromGEPLegacyPass, "separate-const-offset-from-gep",
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index edcdaea4c31da..d038d5ce98b40 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -388,7 +388,7 @@ PreservedAnalyses SimplifyCFGPass::run(Function &F,
namespace {
struct CFGSimplifyPass : public FunctionPass {
- static char ID;
+ static const char ID;
SimplifyCFGOptions Options;
std::function<bool(const Function &)> PredicateFtor;
@@ -426,7 +426,7 @@ struct CFGSimplifyPass : public FunctionPass {
};
}
-char CFGSimplifyPass::ID = 0;
+const char CFGSimplifyPass::ID = 0;
INITIALIZE_PASS_BEGIN(CFGSimplifyPass, "simplifycfg", "Simplify the CFG", false,
false)
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index 603525b55b9cf..d0f1aba5104b8 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -240,7 +240,7 @@ PreservedAnalyses SinkingPass::run(Function &F, FunctionAnalysisManager &AM) {
namespace {
class SinkingLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification
+ static const char ID; // Pass identification
SinkingLegacyPass() : FunctionPass(ID) {
initializeSinkingLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -265,7 +265,7 @@ namespace {
};
} // end anonymous namespace
-char SinkingLegacyPass::ID = 0;
+const char SinkingLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(SinkingLegacyPass, "sink", "Code sinking", false, false)
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
index 23e1243def290..0ecf344b57aa8 100644
--- a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
+++ b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
@@ -104,7 +104,7 @@ namespace {
class SpeculativeExecutionLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
explicit SpeculativeExecutionLegacyPass(bool OnlyIfDivergentTarget = false)
: FunctionPass(ID), OnlyIfDivergentTarget(OnlyIfDivergentTarget ||
SpecExecOnlyIfDivergentTarget),
@@ -128,7 +128,7 @@ class SpeculativeExecutionLegacyPass : public FunctionPass {
};
} // namespace
-char SpeculativeExecutionLegacyPass::ID = 0;
+const char SpeculativeExecutionLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(SpeculativeExecutionLegacyPass, "speculative-execution",
"Speculatively execute instructions", false, false)
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
diff --git a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
index c371a9d2f6416..52971c4f7820c 100644
--- a/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
@@ -126,7 +126,7 @@ class StraightLineStrengthReduceLegacyPass : public FunctionPass {
const DataLayout *DL = nullptr;
public:
- static char ID;
+ static const char ID;
StraightLineStrengthReduceLegacyPass() : FunctionPass(ID) {
initializeStraightLineStrengthReduceLegacyPassPass(
@@ -613,7 +613,7 @@ operator<<(raw_ostream &OS, const StraightLineStrengthReduce::DeltaInfo &DI) {
} // end anonymous namespace
-char StraightLineStrengthReduceLegacyPass::ID = 0;
+const char StraightLineStrengthReduceLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(StraightLineStrengthReduceLegacyPass, "slsr",
"Straight line strength reduction", false, false)
diff --git a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
index 0a8f5ea2fdae1..4cbbcd5a19d81 100644
--- a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
@@ -378,7 +378,7 @@ class StructurizeCFGLegacyPass : public RegionPass {
bool SkipUniformRegions;
public:
- static char ID;
+ static const char ID;
explicit StructurizeCFGLegacyPass(bool SkipUniformRegions_ = false)
: RegionPass(ID), SkipUniformRegions(SkipUniformRegions_) {
@@ -419,7 +419,7 @@ class StructurizeCFGLegacyPass : public RegionPass {
} // end anonymous namespace
-char StructurizeCFGLegacyPass::ID = 0;
+const char StructurizeCFGLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(StructurizeCFGLegacyPass, "structurizecfg",
"Structurize the CFG", false, false)
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
index 89d41f3e40de7..e91ba612f1a3e 100644
--- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -933,7 +933,7 @@ bool TailRecursionEliminator::eliminate(Function &F,
namespace {
struct TailCallElim : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
TailCallElim() : FunctionPass(ID) {
initializeTailCallElimPass(*PassRegistry::getPassRegistry());
}
@@ -969,7 +969,7 @@ struct TailCallElim : public FunctionPass {
};
} // namespace
-char TailCallElim::ID = 0;
+const char TailCallElim::ID = 0;
INITIALIZE_PASS_BEGIN(TailCallElim, "tailcallelim", "Tail Call Elimination",
false, false)
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
diff --git a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 8aa8aa2c60800..0564e8d8ffc2b 100644
--- a/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -40,7 +40,7 @@ STATISTIC(NumBroken, "Number of blocks inserted");
namespace {
struct BreakCriticalEdges : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
BreakCriticalEdges() : FunctionPass(ID) {
initializeBreakCriticalEdgesPass(*PassRegistry::getPassRegistry());
}
@@ -70,12 +70,12 @@ struct BreakCriticalEdges : public FunctionPass {
};
} // namespace
-char BreakCriticalEdges::ID = 0;
+const char BreakCriticalEdges::ID = 0;
INITIALIZE_PASS(BreakCriticalEdges, "break-crit-edges",
"Break critical edges in CFG", false, false)
// Publicly exposed interface to pass...
-char &llvm::BreakCriticalEdgesID = BreakCriticalEdges::ID;
+const char &llvm::BreakCriticalEdgesID = BreakCriticalEdges::ID;
FunctionPass *llvm::createBreakCriticalEdgesPass() {
return new BreakCriticalEdges();
diff --git a/llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp b/llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp
index a87822c0ac1d7..8f1a275cb0897 100644
--- a/llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp
+++ b/llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp
@@ -52,7 +52,7 @@ namespace {
class CanonicalizeFreezeInLoops : public LoopPass {
public:
- static char ID;
+ static const char ID;
CanonicalizeFreezeInLoops();
@@ -269,4 +269,4 @@ Pass *llvm::createCanonicalizeFreezeInLoopsPass() {
return new CanonicalizeFreezeInLoops();
}
-char CanonicalizeFreezeInLoops::ID = 0;
+const char CanonicalizeFreezeInLoops::ID = 0;
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index 2923633f29d7a..62f21cad37a9c 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -894,7 +894,7 @@ struct DebugifyModulePass : public ModulePass {
AU.setPreservesAll();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
private:
StringRef NameOfWrappedPass;
@@ -922,7 +922,7 @@ struct DebugifyFunctionPass : public FunctionPass {
AU.setPreservesAll();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
private:
StringRef NameOfWrappedPass;
@@ -962,7 +962,7 @@ struct CheckDebugifyModulePass : public ModulePass {
AU.setPreservesAll();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
private:
StringRef NameOfWrappedPass;
@@ -1008,7 +1008,7 @@ struct CheckDebugifyFunctionPass : public FunctionPass {
AU.setPreservesAll();
}
- static char ID; // Pass identification.
+ static const char ID; // Pass identification.
private:
StringRef NameOfWrappedPass;
@@ -1175,18 +1175,18 @@ void DebugifyEachInstrumentation::registerCallbacks(
});
}
-char DebugifyModulePass::ID = 0;
+const char DebugifyModulePass::ID = 0;
static RegisterPass<DebugifyModulePass> DM("debugify",
"Attach debug info to everything");
-char CheckDebugifyModulePass::ID = 0;
+const char CheckDebugifyModulePass::ID = 0;
static RegisterPass<CheckDebugifyModulePass>
CDM("check-debugify", "Check debug info from -debugify");
-char DebugifyFunctionPass::ID = 0;
+const char DebugifyFunctionPass::ID = 0;
static RegisterPass<DebugifyFunctionPass> DF("debugify-function",
"Attach debug info to a function");
-char CheckDebugifyFunctionPass::ID = 0;
+const char CheckDebugifyFunctionPass::ID = 0;
static RegisterPass<CheckDebugifyFunctionPass>
CDF("check-debugify-function", "Check debug info from -debugify-function");
diff --git a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
index 29c17ffc41a74..468225b5c9ed1 100644
--- a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
+++ b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp
@@ -166,7 +166,7 @@ static bool runOnFunction(Function &F, bool PostInlining) {
namespace {
struct PostInlineEntryExitInstrumenter : public FunctionPass {
- static char ID;
+ static const char ID;
PostInlineEntryExitInstrumenter() : FunctionPass(ID) {
initializePostInlineEntryExitInstrumenterPass(
*PassRegistry::getPassRegistry());
@@ -177,7 +177,7 @@ struct PostInlineEntryExitInstrumenter : public FunctionPass {
}
bool runOnFunction(Function &F) override { return ::runOnFunction(F, true); }
};
-char PostInlineEntryExitInstrumenter::ID = 0;
+const char PostInlineEntryExitInstrumenter::ID = 0;
}
INITIALIZE_PASS_BEGIN(
diff --git a/llvm/lib/Transforms/Utils/FixIrreducible.cpp b/llvm/lib/Transforms/Utils/FixIrreducible.cpp
index 804af22daa5af..f2bce5fcab880 100644
--- a/llvm/lib/Transforms/Utils/FixIrreducible.cpp
+++ b/llvm/lib/Transforms/Utils/FixIrreducible.cpp
@@ -144,7 +144,7 @@ using namespace llvm;
namespace {
struct FixIrreducible : public FunctionPass {
- static char ID;
+ static const char ID;
FixIrreducible() : FunctionPass(ID) {
initializeFixIrreduciblePass(*PassRegistry::getPassRegistry());
}
@@ -161,7 +161,7 @@ struct FixIrreducible : public FunctionPass {
};
} // namespace
-char FixIrreducible::ID = 0;
+const char FixIrreducible::ID = 0;
FunctionPass *llvm::createFixIrreduciblePass() { return new FixIrreducible(); }
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp
index a9e08ada82ca0..4561d11520788 100644
--- a/llvm/lib/Transforms/Utils/LCSSA.cpp
+++ b/llvm/lib/Transforms/Utils/LCSSA.cpp
@@ -464,7 +464,7 @@ static bool formLCSSAOnAllLoops(const LoopInfo *LI, const DominatorTree &DT,
namespace {
struct LCSSAWrapperPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LCSSAWrapperPass() : FunctionPass(ID) {
initializeLCSSAWrapperPassPass(*PassRegistry::getPassRegistry());
}
@@ -513,7 +513,7 @@ struct LCSSAWrapperPass : public FunctionPass {
};
}
-char LCSSAWrapperPass::ID = 0;
+const char LCSSAWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(LCSSAWrapperPass, "lcssa", "Loop-Closed SSA Form Pass",
false, false)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
@@ -523,7 +523,7 @@ INITIALIZE_PASS_END(LCSSAWrapperPass, "lcssa", "Loop-Closed SSA Form Pass",
false, false)
Pass *llvm::createLCSSAPass() { return new LCSSAWrapperPass(); }
-char &llvm::LCSSAID = LCSSAWrapperPass::ID;
+const char &llvm::LCSSAID = LCSSAWrapperPass::ID;
/// Transform \p F into loop-closed SSA form.
bool LCSSAWrapperPass::runOnFunction(Function &F) {
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 798a11af774a2..09a47031477fa 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -736,7 +736,7 @@ bool llvm::simplifyLoop(Loop *L, DominatorTree *DT, LoopInfo *LI,
namespace {
struct LoopSimplify : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
LoopSimplify() : FunctionPass(ID) {
initializeLoopSimplifyPass(*PassRegistry::getPassRegistry());
}
@@ -769,7 +769,7 @@ struct LoopSimplify : public FunctionPass {
};
} // namespace
-char LoopSimplify::ID = 0;
+const char LoopSimplify::ID = 0;
INITIALIZE_PASS_BEGIN(LoopSimplify, "loop-simplify",
"Canonicalize natural loops", false, false)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
@@ -779,7 +779,7 @@ INITIALIZE_PASS_END(LoopSimplify, "loop-simplify", "Canonicalize natural loops",
false, false)
// Publicly exposed interface to pass.
-char &llvm::LoopSimplifyID = LoopSimplify::ID;
+const char &llvm::LoopSimplifyID = LoopSimplify::ID;
Pass *llvm::createLoopSimplifyPass() { return new LoopSimplify(); }
/// runOnFunction - Run down all loops in the CFG (recursively, but we could do
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 437465b30e1c2..092b9a124d965 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -153,8 +153,8 @@ void llvm::getLoopAnalysisUsage(AnalysisUsage &AU) {
// We must also preserve LoopSimplify and LCSSA. We locally access their IDs
// here because users shouldn't directly get them from this header.
- extern char &LoopSimplifyID;
- extern char &LCSSAID;
+ extern const char &LoopSimplifyID;
+ extern const char &LCSSAID;
AU.addRequiredID(LoopSimplifyID);
AU.addPreservedID(LoopSimplifyID);
AU.addRequiredID(LCSSAID);
diff --git a/llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp b/llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp
index df3a2a94b7ddb..7046715210e95 100644
--- a/llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp
+++ b/llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp
@@ -45,14 +45,14 @@ class LowerGlobalDtorsLegacyPass final : public ModulePass {
bool runOnModule(Module &M) override;
public:
- static char ID;
+ static const char ID;
LowerGlobalDtorsLegacyPass() : ModulePass(ID) {
initializeLowerGlobalDtorsLegacyPassPass(*PassRegistry::getPassRegistry());
}
};
} // End anonymous namespace
-char LowerGlobalDtorsLegacyPass::ID = 0;
+const char LowerGlobalDtorsLegacyPass::ID = 0;
INITIALIZE_PASS(LowerGlobalDtorsLegacyPass, DEBUG_TYPE,
"Lower @llvm.global_dtors via `__cxa_atexit`", false, false)
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index cecb6629773f1..11aa37b118920 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -29,7 +29,7 @@ STATISTIC(NumInvokes, "Number of invokes replaced");
namespace {
class LowerInvokeLegacyPass : public FunctionPass {
public:
- static char ID; // Pass identification, replacement for typeid
+ static const char ID; // Pass identification, replacement for typeid
explicit LowerInvokeLegacyPass() : FunctionPass(ID) {
initializeLowerInvokeLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -37,7 +37,7 @@ class LowerInvokeLegacyPass : public FunctionPass {
};
} // namespace
-char LowerInvokeLegacyPass::ID = 0;
+const char LowerInvokeLegacyPass::ID = 0;
INITIALIZE_PASS(LowerInvokeLegacyPass, "lowerinvoke",
"Lower invoke and unwind, for unwindless code generators",
false, false)
@@ -78,7 +78,7 @@ bool LowerInvokeLegacyPass::runOnFunction(Function &F) {
return runImpl(F);
}
-char &llvm::LowerInvokePassID = LowerInvokeLegacyPass::ID;
+const char &llvm::LowerInvokePassID = LowerInvokeLegacyPass::ID;
// Public Interface To the LowerInvoke pass.
FunctionPass *llvm::createLowerInvokePass() {
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
index 6acbce884fcc0..6fb5986c31923 100644
--- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
@@ -561,7 +561,7 @@ bool LowerSwitch(Function &F, LazyValueInfo *LVI, AssumptionCache *AC) {
class LowerSwitchLegacyPass : public FunctionPass {
public:
// Pass identification, replacement for typeid
- static char ID;
+ static const char ID;
LowerSwitchLegacyPass() : FunctionPass(ID) {
initializeLowerSwitchLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -576,10 +576,10 @@ class LowerSwitchLegacyPass : public FunctionPass {
} // end anonymous namespace
-char LowerSwitchLegacyPass::ID = 0;
+const char LowerSwitchLegacyPass::ID = 0;
// Publicly exposed interface to pass...
-char &llvm::LowerSwitchID = LowerSwitchLegacyPass::ID;
+const char &llvm::LowerSwitchID = LowerSwitchLegacyPass::ID;
INITIALIZE_PASS_BEGIN(LowerSwitchLegacyPass, "lowerswitch",
"Lower SwitchInst's to branches", false, false)
diff --git a/llvm/lib/Transforms/Utils/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp
index 5ad7aeb463ecb..edf4d1deea2af 100644
--- a/llvm/lib/Transforms/Utils/Mem2Reg.cpp
+++ b/llvm/lib/Transforms/Utils/Mem2Reg.cpp
@@ -73,7 +73,7 @@ namespace {
struct PromoteLegacyPass : public FunctionPass {
// Pass identification, replacement for typeid
- static char ID;
+ static const char ID;
PromoteLegacyPass() : FunctionPass(ID) {
initializePromoteLegacyPassPass(*PassRegistry::getPassRegistry());
@@ -100,7 +100,7 @@ struct PromoteLegacyPass : public FunctionPass {
} // end anonymous namespace
-char PromoteLegacyPass::ID = 0;
+const char PromoteLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(PromoteLegacyPass, "mem2reg", "Promote Memory to "
"Register",
diff --git a/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp b/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
index 21baf4ec1d032..d0d6af6d32ab0 100644
--- a/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
+++ b/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
@@ -43,7 +43,7 @@ static cl::opt<unsigned> MaxBooleansInControlFlowHub(
namespace {
struct UnifyLoopExitsLegacyPass : public FunctionPass {
- static char ID;
+ static const char ID;
UnifyLoopExitsLegacyPass() : FunctionPass(ID) {
initializeUnifyLoopExitsLegacyPassPass(*PassRegistry::getPassRegistry());
}
@@ -59,7 +59,7 @@ struct UnifyLoopExitsLegacyPass : public FunctionPass {
};
} // namespace
-char UnifyLoopExitsLegacyPass::ID = 0;
+const char UnifyLoopExitsLegacyPass::ID = 0;
FunctionPass *llvm::createUnifyLoopExitsPass() {
return new UnifyLoopExitsLegacyPass();
diff --git a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
index 44502ac143857..1d5593c384be2 100644
--- a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
@@ -378,7 +378,7 @@ class Vectorizer {
class LoadStoreVectorizerLegacyPass : public FunctionPass {
public:
- static char ID;
+ static const char ID;
LoadStoreVectorizerLegacyPass() : FunctionPass(ID) {
initializeLoadStoreVectorizerLegacyPassPass(
@@ -403,7 +403,7 @@ class LoadStoreVectorizerLegacyPass : public FunctionPass {
} // end anonymous namespace
-char LoadStoreVectorizerLegacyPass::ID = 0;
+const char LoadStoreVectorizerLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(LoadStoreVectorizerLegacyPass, DEBUG_TYPE,
"Vectorize load and Store instructions", false, false)
diff --git a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp
index 7017bde146c90..02f2f5d397fb0 100644
--- a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp
+++ b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp
@@ -24,7 +24,7 @@
using namespace llvm;
using namespace windows_manifest;
-char WindowsManifestError::ID = 0;
+const char WindowsManifestError::ID = 0;
WindowsManifestError::WindowsManifestError(const Twine &Msg) : Msg(Msg.str()) {}
diff --git a/llvm/tools/bugpoint-passes/TestPasses.cpp b/llvm/tools/bugpoint-passes/TestPasses.cpp
index aad1377e33df3..7fcb7a17cabf0 100644
--- a/llvm/tools/bugpoint-passes/TestPasses.cpp
+++ b/llvm/tools/bugpoint-passes/TestPasses.cpp
@@ -29,7 +29,7 @@ namespace {
/// crashes on any call instructions.
class CrashOnCalls : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
CrashOnCalls() : FunctionPass(ID) {}
private:
@@ -48,7 +48,7 @@ class CrashOnCalls : public FunctionPass {
};
}
-char CrashOnCalls::ID = 0;
+const char CrashOnCalls::ID = 0;
static RegisterPass<CrashOnCalls>
X("bugpoint-crashcalls",
"BugPoint Test Pass - Intentionally crash on CallInsts");
@@ -58,7 +58,7 @@ namespace {
/// deletes some call instructions, "misoptimizing" the program.
class DeleteCalls : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
DeleteCalls() : FunctionPass(ID) {}
private:
@@ -76,7 +76,7 @@ class DeleteCalls : public FunctionPass {
};
}
-char DeleteCalls::ID = 0;
+const char DeleteCalls::ID = 0;
static RegisterPass<DeleteCalls>
Y("bugpoint-deletecalls",
"BugPoint Test Pass - Intentionally 'misoptimize' CallInsts");
@@ -87,7 +87,7 @@ namespace {
/// defined in an external module).
class CrashOnDeclFunc : public ModulePass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
CrashOnDeclFunc() : ModulePass(ID) {}
private:
@@ -101,7 +101,7 @@ class CrashOnDeclFunc : public ModulePass {
};
}
-char CrashOnDeclFunc::ID = 0;
+const char CrashOnDeclFunc::ID = 0;
static RegisterPass<CrashOnDeclFunc>
Z("bugpoint-crash-decl-funcs",
"BugPoint Test Pass - Intentionally crash on declared functions");
@@ -111,7 +111,7 @@ namespace {
/// crashes if the Module has two or more compile units
class CrashOnTooManyCUs : public ModulePass {
public:
- static char ID;
+ static const char ID;
CrashOnTooManyCUs() : ModulePass(ID) {}
private:
@@ -126,7 +126,7 @@ class CrashOnTooManyCUs : public ModulePass {
};
}
-char CrashOnTooManyCUs::ID = 0;
+const char CrashOnTooManyCUs::ID = 0;
static RegisterPass<CrashOnTooManyCUs>
A("bugpoint-crash-too-many-cus",
"BugPoint Test Pass - Intentionally crash on too many CUs");
@@ -134,7 +134,7 @@ static RegisterPass<CrashOnTooManyCUs>
namespace {
class CrashOnFunctionAttribute : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
CrashOnFunctionAttribute() : FunctionPass(ID) {}
private:
@@ -151,7 +151,7 @@ class CrashOnFunctionAttribute : public FunctionPass {
};
} // namespace
-char CrashOnFunctionAttribute::ID = 0;
+const char CrashOnFunctionAttribute::ID = 0;
static RegisterPass<CrashOnFunctionAttribute>
B("bugpoint-crashfuncattr", "BugPoint Test Pass - Intentionally crash on "
"function attribute 'bugpoint-crash'");
@@ -159,7 +159,7 @@ static RegisterPass<CrashOnFunctionAttribute>
namespace {
class CrashOnMetadata : public FunctionPass {
public:
- static char ID; // Pass ID, replacement for typeid
+ static const char ID; // Pass ID, replacement for typeid
CrashOnMetadata() : FunctionPass(ID) {}
private:
@@ -180,7 +180,7 @@ class CrashOnMetadata : public FunctionPass {
};
} // namespace
-char CrashOnMetadata::ID = 0;
+const char CrashOnMetadata::ID = 0;
static RegisterPass<CrashOnMetadata>
C("bugpoint-crashmetadata",
"BugPoint Test Pass - Intentionally crash on "
diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
index 4209e235e165b..7f82d972a317a 100644
--- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
+++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
@@ -591,7 +591,7 @@ Error FileAnalysis::parseSymbolTable() {
UnsupportedDisassembly::UnsupportedDisassembly(StringRef Text)
: Text(std::string(Text)) {}
-char UnsupportedDisassembly::ID;
+const char UnsupportedDisassembly::ID = 0;
void UnsupportedDisassembly::log(raw_ostream &OS) const {
OS << "Could not initialise disassembler: " << Text;
}
diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
index 6b04bc30175c1..ce9ab49a9c218 100644
--- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
+++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
@@ -232,7 +232,7 @@ class FileAnalysis {
class UnsupportedDisassembly : public ErrorInfo<UnsupportedDisassembly> {
public:
- static char ID;
+ static const char ID;
std::string Text;
UnsupportedDisassembly(StringRef Text);
diff --git a/llvm/tools/llvm-exegesis/lib/Error.cpp b/llvm/tools/llvm-exegesis/lib/Error.cpp
index 9024ba5ceb524..ef2fcbe5abe1f 100644
--- a/llvm/tools/llvm-exegesis/lib/Error.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Error.cpp
@@ -16,7 +16,7 @@
namespace llvm {
namespace exegesis {
-char ClusteringError::ID;
+const char ClusteringError::ID = 0;
void ClusteringError::log(raw_ostream &OS) const { OS << Msg; }
@@ -24,20 +24,20 @@ std::error_code ClusteringError::convertToErrorCode() const {
return inconvertibleErrorCode();
}
-char SnippetExecutionFailure::ID;
+const char SnippetExecutionFailure::ID = 0;
std::error_code SnippetExecutionFailure::convertToErrorCode() const {
return inconvertibleErrorCode();
}
-char SnippetSegmentationFault::ID;
+const char SnippetSegmentationFault::ID = 0;
void SnippetSegmentationFault::log(raw_ostream &OS) const {
OS << "The snippet encountered a segmentation fault at address "
<< Twine::utohexstr(Address);
}
-char SnippetSignal::ID;
+const char SnippetSignal::ID = 0;
void SnippetSignal::log(raw_ostream &OS) const {
OS << "snippet crashed while running";
@@ -48,7 +48,7 @@ void SnippetSignal::log(raw_ostream &OS) const {
#endif // LLVM_ON_UNIX
}
-char PerfCounterNotFullyEnabled::ID;
+const char PerfCounterNotFullyEnabled::ID = 0;
std::error_code PerfCounterNotFullyEnabled::convertToErrorCode() const {
return inconvertibleErrorCode();
diff --git a/llvm/tools/llvm-exegesis/lib/Error.h b/llvm/tools/llvm-exegesis/lib/Error.h
index c899023e46607..c96162d5504f8 100644
--- a/llvm/tools/llvm-exegesis/lib/Error.h
+++ b/llvm/tools/llvm-exegesis/lib/Error.h
@@ -25,7 +25,7 @@ class Failure : public StringError {
// A class representing failures that happened during clustering calculations.
class ClusteringError : public ErrorInfo<ClusteringError> {
public:
- static char ID;
+ static const char ID;
ClusteringError(const Twine &S) : Msg(S.str()) {}
void log(raw_ostream &OS) const override;
@@ -42,7 +42,7 @@ class ClusteringError : public ErrorInfo<ClusteringError> {
// halting the program, the errors are reported in the output.
class SnippetExecutionFailure : public ErrorInfo<SnippetExecutionFailure> {
public:
- static char ID;
+ static const char ID;
std::error_code convertToErrorCode() const override;
};
@@ -51,7 +51,7 @@ class SnippetExecutionFailure : public ErrorInfo<SnippetExecutionFailure> {
// snippet execution.
class SnippetSegmentationFault : public SnippetExecutionFailure {
public:
- static char ID;
+ static const char ID;
SnippetSegmentationFault(uintptr_t SegFaultAddress)
: Address(SegFaultAddress) {};
@@ -67,7 +67,7 @@ class SnippetSegmentationFault : public SnippetExecutionFailure {
// snippet execution.
class SnippetSignal : public SnippetExecutionFailure {
public:
- static char ID;
+ static const char ID;
SnippetSignal(int Signal) : SignalNumber(Signal){};
void log(raw_ostream &OS) const override;
@@ -80,7 +80,7 @@ class SnippetSignal : public SnippetExecutionFailure {
// scheduled, most likely due to perf counter contention.
struct PerfCounterNotFullyEnabled
: public ErrorInfo<PerfCounterNotFullyEnabled> {
- static char ID;
+ static const char ID;
PerfCounterNotFullyEnabled() = default;
void log(raw_ostream &OS) const override;
diff --git a/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPostprocessing.cpp b/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPostprocessing.cpp
index 13317c6684396..48a0a08a815c7 100644
--- a/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPostprocessing.cpp
+++ b/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPostprocessing.cpp
@@ -23,7 +23,7 @@ using namespace llvm;
namespace {
struct RISCVExegesisPostprocessing : public MachineFunctionPass {
- static char ID;
+ static const char ID;
RISCVExegesisPostprocessing() : MachineFunctionPass(ID) {}
@@ -45,7 +45,7 @@ struct RISCVExegesisPostprocessing : public MachineFunctionPass {
};
} // anonymous namespace
-char RISCVExegesisPostprocessing::ID = 0;
+const char RISCVExegesisPostprocessing::ID = 0;
bool RISCVExegesisPostprocessing::runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
diff --git a/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPreprocessing.cpp b/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPreprocessing.cpp
index 7f1cfd9ea52df..bc240c3b53529 100644
--- a/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPreprocessing.cpp
+++ b/llvm/tools/llvm-exegesis/lib/RISCV/RISCVExegesisPreprocessing.cpp
@@ -22,7 +22,7 @@ using namespace llvm;
namespace {
struct RISCVExegesisPreprocessing : public MachineFunctionPass {
- static char ID;
+ static const char ID;
RISCVExegesisPreprocessing() : MachineFunctionPass(ID) {}
@@ -35,7 +35,7 @@ struct RISCVExegesisPreprocessing : public MachineFunctionPass {
};
} // anonymous namespace
-char RISCVExegesisPreprocessing::ID = 0;
+const char RISCVExegesisPreprocessing::ID = 0;
static bool processAVLOperand(MachineInstr &MI, MachineRegisterInfo &MRI,
const TargetInstrInfo &TII) {
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
index e4efc83c933b4..b6a507637d469 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -39,7 +39,7 @@ RCParser::ParserError::ParserError(const Twine &Expected, const LocIter CurLoc,
(CurLoc == End ? "<EOF>" : CurLoc->value()).str();
}
-char RCParser::ParserError::ID = 0;
+const char RCParser::ParserError::ID = 0;
RCParser::RCParser(std::vector<RCToken> TokenList)
: Tokens(std::move(TokenList)), CurLoc(Tokens.begin()), End(Tokens.end()) {}
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.h b/llvm/tools/llvm-rc/ResourceScriptParser.h
index 1e7618c84142e..3bff01675244a 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.h
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.h
@@ -44,7 +44,7 @@ class RCParser {
}
const std::string &getMessage() const { return CurMessage; }
- static char ID; // Keep llvm::Error happy.
+ static const char ID; // Keep llvm::Error happy.
private:
std::string CurMessage;
diff --git a/llvm/unittests/Analysis/AliasAnalysisTest.cpp b/llvm/unittests/Analysis/AliasAnalysisTest.cpp
index a28d318ab32c8..c769e1948be48 100644
--- a/llvm/unittests/Analysis/AliasAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/AliasAnalysisTest.cpp
@@ -32,7 +32,7 @@ void initializeTestCustomAAWrapperPassPass(PassRegistry&);
namespace {
struct AATestPass : FunctionPass {
- static char ID;
+ static const char ID;
AATestPass() : FunctionPass(ID) {
initializeAATestPassPass(*PassRegistry::getPassRegistry());
}
@@ -63,7 +63,7 @@ struct AATestPass : FunctionPass {
};
}
-char AATestPass::ID = 0;
+const char AATestPass::ID = 0;
INITIALIZE_PASS_BEGIN(AATestPass, "aa-test-pas", "Alias Analysis Test Pass",
false, true)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
@@ -100,7 +100,7 @@ class TestCustomAAWrapperPass : public ImmutablePass {
std::unique_ptr<TestCustomAAResult> Result;
public:
- static char ID;
+ static const char ID;
explicit TestCustomAAWrapperPass(
std::function<void()> CB = std::function<void()>())
@@ -128,7 +128,7 @@ class TestCustomAAWrapperPass : public ImmutablePass {
};
}
-char TestCustomAAWrapperPass::ID = 0;
+const char TestCustomAAWrapperPass::ID = 0;
INITIALIZE_PASS_BEGIN(TestCustomAAWrapperPass, "test-custom-aa",
"Test Custom AA Wrapper Pass", false, true)
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
diff --git a/llvm/unittests/Analysis/CFGTest.cpp b/llvm/unittests/Analysis/CFGTest.cpp
index 352ee6a1bf43e..1328aa26c12f5 100644
--- a/llvm/unittests/Analysis/CFGTest.cpp
+++ b/llvm/unittests/Analysis/CFGTest.cpp
@@ -67,7 +67,7 @@ class IsPotentiallyReachableTest : public testing::Test {
}
void ExpectPath(bool ExpectedResult) {
- static char ID;
+ static const char ID = 0;
class IsPotentiallyReachableTestPass : public FunctionPass {
public:
IsPotentiallyReachableTestPass(bool ExpectedResult, Instruction *A,
diff --git a/llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp b/llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
index 8165876e18a34..18992f5cc0d7a 100644
--- a/llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
+++ b/llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp
@@ -28,7 +28,7 @@ struct AddMetadataPass : public ModulePass {
std::string PalMDString;
public:
- static char ID;
+ static const char ID;
AddMetadataPass(std::string PalMDString)
: ModulePass(ID), PalMDString(PalMDString) {}
bool runOnModule(Module &M) override {
@@ -40,7 +40,7 @@ struct AddMetadataPass : public ModulePass {
return true;
}
};
-char AddMetadataPass::ID = 0;
+const char AddMetadataPass::ID = 0;
} // end anonymous namespace
class AMDGPUSelectionDAGTest : public testing::Test {
diff --git a/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.cpp b/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.cpp
index 990d23258891f..bdcf398029dd7 100644
--- a/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.cpp
+++ b/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.cpp
@@ -28,7 +28,7 @@ bool CodeGenTest::runOnMachineFunction(MachineFunction &MF) {
StringRef CodeGenTest::getPassName() const { return CODEGEN_TEST_NAME; }
-char CodeGenTest::ID = 0;
+const char CodeGenTest::ID = 0;
std::function<void()> CodeGenTest::RunCallback;
INITIALIZE_PASS(CodeGenTest, DEBUG_TYPE, CODEGEN_TEST_NAME, false, false)
diff --git a/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.h b/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.h
index 8eaf6d5339657..80b8c18ecfaf8 100644
--- a/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.h
+++ b/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.h
@@ -19,7 +19,7 @@ void initializeCodeGenTestPass(PassRegistry &);
class CodeGenTest : public MachineFunctionPass {
public:
- static char ID;
+ static const char ID;
CodeGenTest();
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
index 2c58c8ef74125..fa555628b874a 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
@@ -26,11 +26,11 @@ namespace {
class CustomError : public ErrorInfo<CustomError> {
public:
- static char ID;
+ static const char ID;
void log(raw_ostream &OS) const override { OS << "CustomError"; }
std::error_code convertToErrorCode() const override { return {}; }
};
-char CustomError::ID = 0;
+const char CustomError::ID = 0;
TEST_F(CoreAPIsStandardTest, ErrorReporter) {
// Check that errors reported via ExecutionSession::reportError are sent to
diff --git a/llvm/unittests/IR/LegacyPassManagerTest.cpp b/llvm/unittests/IR/LegacyPassManagerTest.cpp
index b0d81ec4bde23..d5c302d6e2d3c 100644
--- a/llvm/unittests/IR/LegacyPassManagerTest.cpp
+++ b/llvm/unittests/IR/LegacyPassManagerTest.cpp
@@ -50,7 +50,7 @@ namespace llvm {
struct ModuleNDNM: public ModulePass {
public:
static char run;
- static char ID;
+ static const char ID;
ModuleNDNM() : ModulePass(ID) { }
bool runOnModule(Module &M) override {
run++;
@@ -60,39 +60,39 @@ namespace llvm {
AU.setPreservesAll();
}
};
- char ModuleNDNM::ID=0;
+ const char ModuleNDNM::ID = 0;
char ModuleNDNM::run=0;
struct ModuleNDM : public ModulePass {
public:
static char run;
- static char ID;
+ static const char ID;
ModuleNDM() : ModulePass(ID) {}
bool runOnModule(Module &M) override {
run++;
return true;
}
};
- char ModuleNDM::ID=0;
+ const char ModuleNDM::ID = 0;
char ModuleNDM::run=0;
struct ModuleNDM2 : public ModulePass {
public:
static char run;
- static char ID;
+ static const char ID;
ModuleNDM2() : ModulePass(ID) {}
bool runOnModule(Module &M) override {
run++;
return true;
}
};
- char ModuleNDM2::ID=0;
+ const char ModuleNDM2::ID = 0;
char ModuleNDM2::run=0;
struct ModuleDNM : public ModulePass {
public:
static char run;
- static char ID;
+ static const char ID;
ModuleDNM() : ModulePass(ID) {
initializeModuleNDMPass(*PassRegistry::getPassRegistry());
}
@@ -105,7 +105,7 @@ namespace llvm {
AU.setPreservesAll();
}
};
- char ModuleDNM::ID=0;
+ const char ModuleDNM::ID = 0;
char ModuleDNM::run=0;
template<typename P>
@@ -123,7 +123,7 @@ namespace llvm {
runc++;
}
public:
- static char ID;
+ static const char ID;
static void finishedOK(int run) {
EXPECT_GT(runc, 0);
EXPECT_TRUE(initialized);
@@ -142,7 +142,7 @@ namespace llvm {
allocated--;
}
};
- template<typename P> char PassTestBase<P>::ID;
+ template <typename P> const char PassTestBase<P>::ID = 0;
template<typename P> int PassTestBase<P>::runc;
template<typename P> bool PassTestBase<P>::initialized;
template<typename P> bool PassTestBase<P>::finalized;
@@ -225,7 +225,7 @@ namespace llvm {
struct OnTheFlyTest: public ModulePass {
public:
- static char ID;
+ static const char ID;
OnTheFlyTest() : ModulePass(ID) {
initializeFPassPass(*PassRegistry::getPassRegistry());
}
@@ -243,7 +243,7 @@ namespace llvm {
AU.addRequired<FPass>();
}
};
- char OnTheFlyTest::ID=0;
+ const char OnTheFlyTest::ID = 0;
TEST(PassManager, RunOnce) {
LLVMContext Context;
@@ -369,7 +369,7 @@ namespace llvm {
// Optional module pass.
struct ModuleOpt: public ModulePass {
char run = 0;
- static char ID;
+ static const char ID;
ModuleOpt() : ModulePass(ID) { }
bool runOnModule(Module &M) override {
if (!skipModule(M))
@@ -377,7 +377,7 @@ namespace llvm {
return false;
}
};
- char ModuleOpt::ID=0;
+ const char ModuleOpt::ID = 0;
TEST(PassManager, CustomOptPassGate) {
LLVMContext Context0;
diff --git a/llvm/unittests/IR/ModuleTest.cpp b/llvm/unittests/IR/ModuleTest.cpp
index 2012398530707..1af1a1f6ad8ea 100644
--- a/llvm/unittests/IR/ModuleTest.cpp
+++ b/llvm/unittests/IR/ModuleTest.cpp
@@ -53,7 +53,7 @@ TEST(ModuleTest, sortGlobalsByName) {
TEST(ModuleTest, randomNumberGenerator) {
LLVMContext Context;
- static char ID;
+ static const char ID = 0;
struct DummyPass : ModulePass {
DummyPass() : ModulePass(ID) {}
bool runOnModule(Module &) override { return true; }
diff --git a/llvm/unittests/IR/TimePassesTest.cpp b/llvm/unittests/IR/TimePassesTest.cpp
index 85986132103ca..41e4125e2877b 100644
--- a/llvm/unittests/IR/TimePassesTest.cpp
+++ b/llvm/unittests/IR/TimePassesTest.cpp
@@ -30,7 +30,7 @@ void initializePass2Pass(PassRegistry &);
namespace {
struct Pass1 : public ModulePass {
- static char ID;
+ static const char ID;
public:
Pass1() : ModulePass(ID) {}
@@ -40,10 +40,10 @@ struct Pass1 : public ModulePass {
}
StringRef getPassName() const override { return "Pass1"; }
};
-char Pass1::ID;
+const char Pass1::ID = 0;
struct Pass2 : public ModulePass {
- static char ID;
+ static const char ID;
public:
Pass2() : ModulePass(ID) {}
@@ -53,7 +53,7 @@ struct Pass2 : public ModulePass {
}
StringRef getPassName() const override { return "Pass2"; }
};
-char Pass2::ID;
+const char Pass2::ID = 0;
} // namespace
} // namespace llvm
diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp
index 45b8aeb72b598..ce25767f90c2c 100644
--- a/llvm/unittests/MI/LiveIntervalTest.cpp
+++ b/llvm/unittests/MI/LiveIntervalTest.cpp
@@ -79,7 +79,7 @@ std::unique_ptr<Module> parseMIR(LLVMContext &Context,
}
struct TestPass : public MachineFunctionPass {
- static char ID;
+ static const char ID;
TestPass() : MachineFunctionPass(ID) {}
};
@@ -256,7 +256,7 @@ body: |
} // End of anonymous namespace.
-char TestPass::ID = 0;
+const char TestPass::ID = 0;
INITIALIZE_PASS(TestPass, "testpass", "testpass", false, false)
TEST(LiveIntervalTest, MoveUpDef) {
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp
index 45c0a4f450b51..8e9a4eaa07dcc 100644
--- a/llvm/unittests/Support/ErrorTest.cpp
+++ b/llvm/unittests/Support/ErrorTest.cpp
@@ -42,7 +42,7 @@ class CustomError : public ErrorInfo<CustomError> {
}
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
protected:
// This error is subclassed below, but we can't use inheriting constructors
@@ -54,7 +54,7 @@ class CustomError : public ErrorInfo<CustomError> {
int Info;
};
-char CustomError::ID = 0;
+const char CustomError::ID = 0;
// Custom error class with a custom base class and some additional random
// 'info'.
@@ -78,13 +78,13 @@ class CustomSubError : public ErrorInfo<CustomSubError, CustomError> {
}
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
protected:
int ExtraInfo;
};
-char CustomSubError::ID = 0;
+const char CustomSubError::ID = 0;
static Error handleCustomError(const CustomError &CE) {
return Error::success();
@@ -1063,7 +1063,7 @@ class TestDebugError : public ErrorInfo<TestDebugError, StringError> {
public:
using ErrorInfo<TestDebugError, StringError >::ErrorInfo; // inherit constructors
TestDebugError(const Twine &S) : ErrorInfo(S, test_error_code::unspecified) {}
- static char ID;
+ static const char ID;
};
class TestErrorCategory : public std::error_category {
@@ -1087,7 +1087,7 @@ const std::error_category &TErrorCategory() {
return TestErrCategory;
}
-char TestDebugError::ID;
+const char TestDebugError::ID = 0;
TEST(Error, SubtypeStringErrorTest) {
auto E1 = make_error<TestDebugError>(test_error_code::error_1);
diff --git a/llvm/unittests/Support/ExtensibleRTTITest.cpp b/llvm/unittests/Support/ExtensibleRTTITest.cpp
index 8b0ff89745b20..01889f474fe1e 100644
--- a/llvm/unittests/Support/ExtensibleRTTITest.cpp
+++ b/llvm/unittests/Support/ExtensibleRTTITest.cpp
@@ -17,36 +17,36 @@ namespace {
class MyBaseType : public RTTIExtends<MyBaseType, RTTIRoot> {
public:
- static char ID;
+ static const char ID;
};
class MyDerivedType : public RTTIExtends<MyDerivedType, MyBaseType> {
public:
- static char ID;
+ static const char ID;
};
class MyOtherDerivedType : public RTTIExtends<MyOtherDerivedType, MyBaseType> {
public:
- static char ID;
+ static const char ID;
};
class MyDeeperDerivedType
: public RTTIExtends<MyDeeperDerivedType, MyDerivedType> {
public:
- static char ID;
+ static const char ID;
};
class MyMultipleInheritanceType
: public RTTIExtends<MyMultipleInheritanceType, MyDerivedType,
MyOtherDerivedType> {
public:
- static char ID;
+ static const char ID;
};
class MyTypeWithConstructor
: public RTTIExtends<MyTypeWithConstructor, MyBaseType> {
public:
- static char ID;
+ static const char ID;
MyTypeWithConstructor(int) {}
};
@@ -54,18 +54,18 @@ class MyTypeWithConstructor
class MyDerivedTypeWithConstructor
: public RTTIExtends<MyDerivedTypeWithConstructor, MyTypeWithConstructor> {
public:
- static char ID;
+ static const char ID;
MyDerivedTypeWithConstructor(int x) : RTTIExtends(x) {}
};
-char MyBaseType::ID = 0;
-char MyDerivedType::ID = 0;
-char MyOtherDerivedType::ID = 0;
-char MyDeeperDerivedType::ID = 0;
-char MyMultipleInheritanceType::ID = 0;
-char MyTypeWithConstructor::ID = 0;
-char MyDerivedTypeWithConstructor::ID = 0;
+const char MyBaseType::ID = 0;
+const char MyDerivedType::ID = 0;
+const char MyOtherDerivedType::ID = 0;
+const char MyDeeperDerivedType::ID = 0;
+const char MyMultipleInheritanceType::ID = 0;
+const char MyTypeWithConstructor::ID = 0;
+const char MyDerivedTypeWithConstructor::ID = 0;
TEST(ExtensibleRTTI, isa) {
MyBaseType B;
diff --git a/llvm/unittests/Transforms/Utils/DebugifyTest.cpp b/llvm/unittests/Transforms/Utils/DebugifyTest.cpp
index 1daf381ee2862..8a28d2657a665 100644
--- a/llvm/unittests/Transforms/Utils/DebugifyTest.cpp
+++ b/llvm/unittests/Transforms/Utils/DebugifyTest.cpp
@@ -31,7 +31,7 @@ void initializeDebugInfoDummyAnalysisPass(PassRegistry &);
namespace {
struct DebugInfoDrop : public FunctionPass {
- static char ID;
+ static const char ID;
bool runOnFunction(Function &F) override {
// Drop DISubprogram.
F.setSubprogram(nullptr);
@@ -52,7 +52,7 @@ struct DebugInfoDrop : public FunctionPass {
};
struct DebugValueDrop : public FunctionPass {
- static char ID;
+ static const char ID;
bool runOnFunction(Function &F) override {
for (BasicBlock &BB : F) {
for (Instruction &I : BB) {
@@ -72,7 +72,7 @@ struct DebugValueDrop : public FunctionPass {
};
struct DebugInfoDummyAnalysis : public FunctionPass {
- static char ID;
+ static const char ID;
bool runOnFunction(Function &F) override {
// Do nothing, so debug info stays untouched.
return false;
@@ -85,9 +85,9 @@ struct DebugInfoDummyAnalysis : public FunctionPass {
};
}
-char DebugInfoDrop::ID = 0;
-char DebugValueDrop::ID = 0;
-char DebugInfoDummyAnalysis::ID = 0;
+const char DebugInfoDrop::ID = 0;
+const char DebugValueDrop::ID = 0;
+const char DebugInfoDummyAnalysis::ID = 0;
TEST(DebugInfoDrop, DropOriginalDebugInfo) {
LLVMContext C;
diff --git a/mlir/include/mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h b/mlir/include/mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h
index 216b94fc445c7..4e251acbd7a01 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h
+++ b/mlir/include/mlir/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.h
@@ -89,7 +89,7 @@ struct ScalableValueBoundsConstraintSet
/// The maximum possible value of vscale.
unsigned getVscaleMax() const { return vscaleMax; }
- static char ID;
+ static const char ID;
private:
const unsigned vscaleMin;
diff --git a/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h b/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
index 58852239444b9..0e9514e6b9e2a 100644
--- a/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
+++ b/mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
@@ -110,7 +110,7 @@ class ValueBoundsConstraintSet
};
public:
- static char ID;
+ static const char ID;
/// A variable that can be added to the constraint set as a "column". The
/// value bounds infrastructure can compute bounds for variables and compare
diff --git a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
index 2986f4c2d607d..5cce745bbca91 100644
--- a/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
+++ b/mlir/lib/Dialect/Vector/IR/ScalableValueBoundsConstraintSet.cpp
@@ -37,7 +37,7 @@ ConstantOrScalableBound::getSize() const {
return failure();
}
-char ScalableValueBoundsConstraintSet::ID = 0;
+const char ScalableValueBoundsConstraintSet::ID = 0;
FailureOr<ConstantOrScalableBound>
ScalableValueBoundsConstraintSet::computeScalableBound(
diff --git a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
index 85a156efd9474..1c8191a83e333 100644
--- a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
+++ b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
@@ -162,7 +162,7 @@ ValueBoundsConstraintSet::ValueBoundsConstraintSet(
assert(stopCondition && "expected non-null stop condition");
}
-char ValueBoundsConstraintSet::ID = 0;
+const char ValueBoundsConstraintSet::ID = 0;
#ifndef NDEBUG
static void assertValidValueDim(Value value, std::optional<int64_t> dim) {
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 4844cc99b5c38..881194b71956c 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -118,10 +118,10 @@ class PreviouslyReportedError
}
// Used by ErrorInfo::classID.
- static char ID;
+ static const char ID;
};
-char PreviouslyReportedError::ID = 0;
+const char PreviouslyReportedError::ID = 0;
/*
* Custom class for processing linear clause for omp.wsloop
diff --git a/offload/plugins-nextgen/common/include/OffloadError.h b/offload/plugins-nextgen/common/include/OffloadError.h
index f2a56d2c41117..3d2dccd36f0a3 100644
--- a/offload/plugins-nextgen/common/include/OffloadError.h
+++ b/offload/plugins-nextgen/common/include/OffloadError.h
@@ -44,7 +44,7 @@ class OffloadError : public llvm::ErrorInfo<OffloadError, llvm::StringError> {
OffloadError(const llvm::Twine &S) : ErrorInfo(S, ErrorCode::UNKNOWN) {}
// The definition for this resides in the plugin static library
- static char ID;
+ static const char ID;
};
/// Create an Offload error.
diff --git a/offload/plugins-nextgen/common/src/OffloadError.cpp b/offload/plugins-nextgen/common/src/OffloadError.cpp
index 78d49047d729c..f63dca28f40cc 100644
--- a/offload/plugins-nextgen/common/src/OffloadError.cpp
+++ b/offload/plugins-nextgen/common/src/OffloadError.cpp
@@ -37,4 +37,4 @@ const std::error_category &error::OffloadErrCategory() {
return MSFCategory;
}
-char OffloadError::ID;
+const char OffloadError::ID = 0;
diff --git a/orc-rt/include/orc-rt/Error.h b/orc-rt/include/orc-rt/Error.h
index 3ad2775943362..297c9624e9dc4 100644
--- a/orc-rt/include/orc-rt/Error.h
+++ b/orc-rt/include/orc-rt/Error.h
@@ -56,7 +56,7 @@ class ErrorExtends : public ParentT {
using ParentT::isA;
using ParentT::ParentT;
- static char ID;
+ static const char ID;
static const void *classID() noexcept { return &ThisT::ID; }
@@ -78,7 +78,7 @@ class ErrorExtends : public ParentT {
};
template <typename ThisT, typename ParentT>
-char ErrorExtends<ThisT, ParentT>::ID = 0;
+const char ErrorExtends<ThisT, ParentT>::ID = 0;
/// Represents an environmental error.
class ORC_RT_NODISCARD Error {
diff --git a/orc-rt/include/orc-rt/RTTI.h b/orc-rt/include/orc-rt/RTTI.h
index 8ac96d1aaf4dd..a236361c2b79e 100644
--- a/orc-rt/include/orc-rt/RTTI.h
+++ b/orc-rt/include/orc-rt/RTTI.h
@@ -89,7 +89,7 @@ class RTTIRoot {
private:
virtual void anchor();
- static char ID;
+ static const char ID;
};
/// Inheritance utility for extensible RTTI.
@@ -119,7 +119,7 @@ template <typename ThisT, typename ParentT> class RTTIExtends : public ParentT {
using ParentT::isA;
using ParentT::ParentT;
- static char ID;
+ static const char ID;
static const void *classID() noexcept { return &ThisT::ID; }
@@ -133,7 +133,7 @@ template <typename ThisT, typename ParentT> class RTTIExtends : public ParentT {
};
template <typename ThisT, typename ParentT>
-char RTTIExtends<ThisT, ParentT>::ID = 0;
+const char RTTIExtends<ThisT, ParentT>::ID = 0;
/// Returns true if the given value is an instance of the template type
/// parameter.
diff --git a/orc-rt/lib/executor/RTTI.cpp b/orc-rt/lib/executor/RTTI.cpp
index f4e4bc83b6c91..f75b134736858 100644
--- a/orc-rt/lib/executor/RTTI.cpp
+++ b/orc-rt/lib/executor/RTTI.cpp
@@ -14,7 +14,7 @@
namespace orc_rt {
-char RTTIRoot::ID = 0;
+const char RTTIRoot::ID = 0;
void RTTIRoot::anchor() {}
} // namespace orc_rt
>From 9faafefa598ebcc8f002ef4100cce56c30fbf7ef Mon Sep 17 00:00:00 2001
From: Steffen Holst Larsen <HolstLarsen.Steffen at amd.com>
Date: Thu, 5 Feb 2026 23:53:48 -0600
Subject: [PATCH 2/2] Fix formatting
Signed-off-by: Steffen Holst Larsen <HolstLarsen.Steffen at amd.com>
---
llvm/lib/CodeGen/CFIInstrInserter.cpp | 2 +-
llvm/lib/Target/NVPTX/NVPTXPeephole.cpp | 2 +-
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/CodeGen/CFIInstrInserter.cpp b/llvm/lib/CodeGen/CFIInstrInserter.cpp
index 496c916c78201..eb0aaf5421e0c 100644
--- a/llvm/lib/CodeGen/CFIInstrInserter.cpp
+++ b/llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -44,7 +44,7 @@ class CFIInstrInserter : public MachineFunctionPass {
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
MachineFunctionPass::getAnalysisUsage(AU);
- }
+ }
bool runOnMachineFunction(MachineFunction &MF) override {
if (!MF.needsFrameMoves())
diff --git a/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp b/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
index 82da00513afc6..b819067ee37d1 100644
--- a/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
@@ -54,7 +54,7 @@ struct NVPTXPeephole : public MachineFunctionPass {
StringRef getPassName() const override {
return "NVPTX optimize redundant cvta.to.local instruction";
- }
+ }
void getAnalysisUsage(AnalysisUsage &AU) const override {
MachineFunctionPass::getAnalysisUsage(AU);
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index 8274277d4e73d..a0b7a9957ee17 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -208,7 +208,7 @@ class PPCBoolRetToInt : public FunctionPass {
}
return Changed;
- }
+ }
bool runOnUse(Use &U, const PHINodeSet &PromotablePHINodes,
B2IMap &BoolToIntMap) {
More information about the cfe-commits
mailing list