diff options
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 10 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/BoundsChecking.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/DebugIR.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/DebugIR.h | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/MemorySanitizer.cpp | 22 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/ThreadSanitizer.cpp | 6 |
8 files changed, 30 insertions, 29 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index dd9a189f9a..da1f97b112 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -301,7 +301,7 @@ struct AddressSanitizer : public FunctionPass { CheckLifetime(CheckLifetime || ClCheckLifetime), BlacklistFile(BlacklistFile.empty() ? ClBlacklistFile : BlacklistFile) {} - virtual const char *getPassName() const { + const char *getPassName() const override { return "AddressSanitizerFunctionPass"; } void instrumentMop(Instruction *I); @@ -319,9 +319,9 @@ struct AddressSanitizer : public FunctionPass { Value *Size, Instruction *InsertBefore, bool IsWrite); Value *memToShadow(Value *Shadow, IRBuilder<> &IRB); - bool runOnFunction(Function &F); + bool runOnFunction(Function &F) override; bool maybeInsertAsanInitAtFunctionEntry(Function &F); - virtual bool doInitialization(Module &M); + bool doInitialization(Module &M) override; static char ID; // Pass identification, replacement for typeid private: @@ -368,9 +368,9 @@ class AddressSanitizerModule : public ModulePass { CheckInitOrder(CheckInitOrder || ClInitializers), BlacklistFile(BlacklistFile.empty() ? ClBlacklistFile : BlacklistFile) {} - bool runOnModule(Module &M); + bool runOnModule(Module &M) override; static char ID; // Pass identification, replacement for typeid - virtual const char *getPassName() const { + const char *getPassName() const override { return "AddressSanitizerModule"; } diff --git a/lib/Transforms/Instrumentation/BoundsChecking.cpp b/lib/Transforms/Instrumentation/BoundsChecking.cpp index fcab822cd2..3493c4be31 100644 --- a/lib/Transforms/Instrumentation/BoundsChecking.cpp +++ b/lib/Transforms/Instrumentation/BoundsChecking.cpp @@ -45,9 +45,9 @@ namespace { initializeBoundsCheckingPass(*PassRegistry::getPassRegistry()); } - virtual bool runOnFunction(Function &F); + bool runOnFunction(Function &F) override; - virtual void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired<DataLayoutPass>(); AU.addRequired<TargetLibraryInfo>(); } diff --git a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index fa8902ca55..286f9695bb 100644 --- a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -213,8 +213,8 @@ class DataFlowSanitizer : public ModulePass { DataFlowSanitizer(StringRef ABIListFile = StringRef(), void *(*getArgTLS)() = 0, void *(*getRetValTLS)() = 0); static char ID; - bool doInitialization(Module &M); - bool runOnModule(Module &M); + bool doInitialization(Module &M) override; + bool runOnModule(Module &M) override; }; struct DFSanFunction { diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp index 519894c283..abea83505f 100644 --- a/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/lib/Transforms/Instrumentation/DebugIR.cpp @@ -67,11 +67,12 @@ public: // This function is called after an Instruction, GlobalValue, or GlobalAlias // is printed. - void printInfoComment(const Value &V, formatted_raw_ostream &Out) { + void printInfoComment(const Value &V, formatted_raw_ostream &Out) override { addEntry(&V, Out); } - void emitFunctionAnnot(const Function *F, formatted_raw_ostream &Out) { + void emitFunctionAnnot(const Function *F, + formatted_raw_ostream &Out) override { addEntry(F, Out); } diff --git a/lib/Transforms/Instrumentation/DebugIR.h b/lib/Transforms/Instrumentation/DebugIR.h index 13774cf174..a6852bf6e3 100644 --- a/lib/Transforms/Instrumentation/DebugIR.h +++ b/lib/Transforms/Instrumentation/DebugIR.h @@ -43,7 +43,7 @@ class DebugIR : public llvm::ModulePass { public: static char ID; - const char *getPassName() const { return "DebugIR"; } + const char *getPassName() const override { return "DebugIR"; } /// Generate a file on disk to be displayed in a debugger. If Filename and /// Directory are empty, a temporary path will be generated. @@ -62,7 +62,7 @@ public: /// Run pass on M and set Path to the source file path in the output module. bool runOnModule(llvm::Module &M, std::string &Path); - bool runOnModule(llvm::Module &M); + bool runOnModule(llvm::Module &M) override; private: diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 9c84c5c394..5d25d55ea6 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -80,7 +80,7 @@ namespace { ~GCOVProfiler() { DeleteContainerPointers(Funcs); } - virtual const char *getPassName() const { + const char *getPassName() const override { return "GCOV Profiler"; } @@ -93,7 +93,7 @@ namespace { ReversedVersion[4] = '\0'; initializeGCOVProfilerPass(*PassRegistry::getPassRegistry()); } - bool runOnModule(Module &M); + bool runOnModule(Module &M) override; // Create the .gcno files for the Module based on DebugInfo. void emitProfileNotes(); diff --git a/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 6e517174bf..52a51259c3 100644 --- a/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -211,9 +211,9 @@ class MemorySanitizer : public FunctionPass { WarningFn(0), BlacklistFile(BlacklistFile.empty() ? ClBlacklistFile : BlacklistFile), WrapIndirectCalls(!ClWrapIndirectCalls.empty()) {} - const char *getPassName() const { return "MemorySanitizer"; } - bool runOnFunction(Function &F); - bool doInitialization(Module &M); + const char *getPassName() const override { return "MemorySanitizer"; } + bool runOnFunction(Function &F) override; + bool doInitialization(Module &M) override; static char ID; // Pass identification, replacement for typeid. private: @@ -2321,7 +2321,7 @@ struct VarArgAMD64Helper : public VarArgHelper { // would have been to associate each live instance of va_list with a copy of // MSanParamTLS, and extract shadow on va_arg() call in the argument list // order. - void visitCallSite(CallSite &CS, IRBuilder<> &IRB) { + void visitCallSite(CallSite &CS, IRBuilder<> &IRB) override { unsigned GpOffset = 0; unsigned FpOffset = AMD64GpEndOffset; unsigned OverflowOffset = AMD64FpEndOffset; @@ -2364,7 +2364,7 @@ struct VarArgAMD64Helper : public VarArgHelper { "_msarg"); } - void visitVAStartInst(VAStartInst &I) { + void visitVAStartInst(VAStartInst &I) override { IRBuilder<> IRB(&I); VAStartInstrumentationList.push_back(&I); Value *VAListTag = I.getArgOperand(0); @@ -2376,7 +2376,7 @@ struct VarArgAMD64Helper : public VarArgHelper { /* size */24, /* alignment */8, false); } - void visitVACopyInst(VACopyInst &I) { + void visitVACopyInst(VACopyInst &I) override { IRBuilder<> IRB(&I); Value *VAListTag = I.getArgOperand(0); Value *ShadowPtr = MSV.getShadowPtr(VAListTag, IRB.getInt8Ty(), IRB); @@ -2387,7 +2387,7 @@ struct VarArgAMD64Helper : public VarArgHelper { /* size */24, /* alignment */8, false); } - void finalizeInstrumentation() { + void finalizeInstrumentation() override { assert(!VAArgOverflowSize && !VAArgTLSCopy && "finalizeInstrumentation called twice"); if (!VAStartInstrumentationList.empty()) { @@ -2439,13 +2439,13 @@ struct VarArgNoOpHelper : public VarArgHelper { VarArgNoOpHelper(Function &F, MemorySanitizer &MS, MemorySanitizerVisitor &MSV) {} - void visitCallSite(CallSite &CS, IRBuilder<> &IRB) {} + void visitCallSite(CallSite &CS, IRBuilder<> &IRB) override {} - void visitVAStartInst(VAStartInst &I) {} + void visitVAStartInst(VAStartInst &I) override {} - void visitVACopyInst(VACopyInst &I) {} + void visitVACopyInst(VACopyInst &I) override {} - void finalizeInstrumentation() {} + void finalizeInstrumentation() override {} }; VarArgHelper *CreateVarArgHelper(Function &Func, MemorySanitizer &Msan, diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp index 31474d3336..bc022600cb 100644 --- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp +++ b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp @@ -81,9 +81,9 @@ struct ThreadSanitizer : public FunctionPass { DL(0), BlacklistFile(BlacklistFile.empty() ? ClBlacklistFile : BlacklistFile) { } - const char *getPassName() const; - bool runOnFunction(Function &F); - bool doInitialization(Module &M); + const char *getPassName() const override; + bool runOnFunction(Function &F) override; + bool doInitialization(Module &M) override; static char ID; // Pass identification, replacement for typeid. private: |