mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
Add 'const' qualifiers to static const char* variables.
llvm-svn: 186371
This commit is contained in:
parent
e07303b68d
commit
b8260534f6
@ -51,7 +51,7 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTree)
|
||||
INITIALIZE_PASS_END(LoopInfo, "loops", "Natural Loop Information", true, true)
|
||||
|
||||
// Loop identifier metadata name.
|
||||
static const char* LoopMDName = "llvm.loop";
|
||||
static const char *const LoopMDName = "llvm.loop";
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Loop implementation
|
||||
|
@ -50,9 +50,9 @@
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
using namespace llvm;
|
||||
|
||||
static const char *DWARFGroupName = "DWARF Emission";
|
||||
static const char *DbgTimerName = "DWARF Debug Writer";
|
||||
static const char *EHTimerName = "DWARF Exception Writer";
|
||||
static const char *const DWARFGroupName = "DWARF Emission";
|
||||
static const char *const DbgTimerName = "DWARF Debug Writer";
|
||||
static const char *const EHTimerName = "DWARF Exception Writer";
|
||||
|
||||
STATISTIC(EmittedInsts, "Number of machine instrs printed");
|
||||
|
||||
|
@ -92,8 +92,8 @@ static cl::opt<DefaultOnOff> SplitDwarf("split-dwarf", cl::Hidden,
|
||||
cl::init(Default));
|
||||
|
||||
namespace {
|
||||
const char *DWARFGroupName = "DWARF Emission";
|
||||
const char *DbgTimerName = "DWARF Debug Writer";
|
||||
const char *const DWARFGroupName = "DWARF Emission";
|
||||
const char *const DbgTimerName = "DWARF Debug Writer";
|
||||
|
||||
struct CompareFirst {
|
||||
template <typename T> bool operator()(const T &lhs, const T &rhs) const {
|
||||
|
@ -22,8 +22,8 @@ namespace llvm {
|
||||
extern bool TimePassesIsEnabled;
|
||||
}
|
||||
|
||||
static const char *TimeIRParsingGroupName = "LLVM IR Parsing";
|
||||
static const char *TimeIRParsingName = "Parse IR";
|
||||
static const char *const TimeIRParsingGroupName = "LLVM IR Parsing";
|
||||
static const char *const TimeIRParsingName = "Parse IR";
|
||||
|
||||
|
||||
Module *llvm::getLazyIRModule(MemoryBuffer *Buffer, SMDiagnostic &Err,
|
||||
|
@ -242,7 +242,7 @@ void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst) {
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
static const char *BundlingNotImplementedMsg =
|
||||
static const char *const BundlingNotImplementedMsg =
|
||||
"Aligned bundling is not implemented for this object format";
|
||||
#endif
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
using namespace llvm;
|
||||
using namespace object;
|
||||
|
||||
static const char *Magic = "!<arch>\n";
|
||||
static const char *const Magic = "!<arch>\n";
|
||||
|
||||
void Archive::anchor() { }
|
||||
|
||||
|
@ -31,13 +31,13 @@ typedef std::pair<BasicBlock *, Value *> StackEntry;
|
||||
typedef SmallVector<StackEntry, 16> StackVector;
|
||||
|
||||
// Intrinsic names the control flow is annotated with
|
||||
static const char *IfIntrinsic = "llvm.SI.if";
|
||||
static const char *ElseIntrinsic = "llvm.SI.else";
|
||||
static const char *BreakIntrinsic = "llvm.SI.break";
|
||||
static const char *IfBreakIntrinsic = "llvm.SI.if.break";
|
||||
static const char *ElseBreakIntrinsic = "llvm.SI.else.break";
|
||||
static const char *LoopIntrinsic = "llvm.SI.loop";
|
||||
static const char *EndCfIntrinsic = "llvm.SI.end.cf";
|
||||
static const char *const IfIntrinsic = "llvm.SI.if";
|
||||
static const char *const ElseIntrinsic = "llvm.SI.else";
|
||||
static const char *const BreakIntrinsic = "llvm.SI.break";
|
||||
static const char *const IfBreakIntrinsic = "llvm.SI.if.break";
|
||||
static const char *const ElseBreakIntrinsic = "llvm.SI.else.break";
|
||||
static const char *const LoopIntrinsic = "llvm.SI.loop";
|
||||
static const char *const EndCfIntrinsic = "llvm.SI.end.cf";
|
||||
|
||||
class SIAnnotateControlFlow : public FunctionPass {
|
||||
|
||||
|
@ -63,25 +63,26 @@ static const size_t kMaxStackMallocSize = 1 << 16; // 64K
|
||||
static const uintptr_t kCurrentStackFrameMagic = 0x41B58AB3;
|
||||
static const uintptr_t kRetiredStackFrameMagic = 0x45E0360E;
|
||||
|
||||
static const char *kAsanModuleCtorName = "asan.module_ctor";
|
||||
static const char *kAsanModuleDtorName = "asan.module_dtor";
|
||||
static const int kAsanCtorAndCtorPriority = 1;
|
||||
static const char *kAsanReportErrorTemplate = "__asan_report_";
|
||||
static const char *kAsanReportLoadN = "__asan_report_load_n";
|
||||
static const char *kAsanReportStoreN = "__asan_report_store_n";
|
||||
static const char *kAsanRegisterGlobalsName = "__asan_register_globals";
|
||||
static const char *kAsanUnregisterGlobalsName = "__asan_unregister_globals";
|
||||
static const char *kAsanPoisonGlobalsName = "__asan_before_dynamic_init";
|
||||
static const char *kAsanUnpoisonGlobalsName = "__asan_after_dynamic_init";
|
||||
static const char *kAsanInitName = "__asan_init_v3";
|
||||
static const char *kAsanHandleNoReturnName = "__asan_handle_no_return";
|
||||
static const char *kAsanMappingOffsetName = "__asan_mapping_offset";
|
||||
static const char *kAsanMappingScaleName = "__asan_mapping_scale";
|
||||
static const char *kAsanStackMallocName = "__asan_stack_malloc";
|
||||
static const char *kAsanStackFreeName = "__asan_stack_free";
|
||||
static const char *kAsanGenPrefix = "__asan_gen_";
|
||||
static const char *kAsanPoisonStackMemoryName = "__asan_poison_stack_memory";
|
||||
static const char *kAsanUnpoisonStackMemoryName =
|
||||
static const char *const kAsanModuleCtorName = "asan.module_ctor";
|
||||
static const char *const kAsanModuleDtorName = "asan.module_dtor";
|
||||
static const int kAsanCtorAndCtorPriority = 1;
|
||||
static const char *const kAsanReportErrorTemplate = "__asan_report_";
|
||||
static const char *const kAsanReportLoadN = "__asan_report_load_n";
|
||||
static const char *const kAsanReportStoreN = "__asan_report_store_n";
|
||||
static const char *const kAsanRegisterGlobalsName = "__asan_register_globals";
|
||||
static const char *const kAsanUnregisterGlobalsName = "__asan_unregister_globals";
|
||||
static const char *const kAsanPoisonGlobalsName = "__asan_before_dynamic_init";
|
||||
static const char *const kAsanUnpoisonGlobalsName = "__asan_after_dynamic_init";
|
||||
static const char *const kAsanInitName = "__asan_init_v3";
|
||||
static const char *const kAsanHandleNoReturnName = "__asan_handle_no_return";
|
||||
static const char *const kAsanMappingOffsetName = "__asan_mapping_offset";
|
||||
static const char *const kAsanMappingScaleName = "__asan_mapping_scale";
|
||||
static const char *const kAsanStackMallocName = "__asan_stack_malloc";
|
||||
static const char *const kAsanStackFreeName = "__asan_stack_free";
|
||||
static const char *const kAsanGenPrefix = "__asan_gen_";
|
||||
static const char *const kAsanPoisonStackMemoryName =
|
||||
"__asan_poison_stack_memory";
|
||||
static const char *const kAsanUnpoisonStackMemoryName =
|
||||
"__asan_unpoison_stack_memory";
|
||||
|
||||
static const int kAsanStackLeftRedzoneMagic = 0xf1;
|
||||
|
@ -45,7 +45,7 @@ typedef DenseMap<BasicBlock *, BasicBlock*> BB2BBMap;
|
||||
|
||||
// The name for newly created blocks.
|
||||
|
||||
static const char *FlowBlockName = "Flow";
|
||||
static const char *const FlowBlockName = "Flow";
|
||||
|
||||
/// @brief Find the nearest common dominator for multiple BasicBlocks
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user