summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorSven van Haastregt <sven.vanhaastregt@arm.com>2017-03-29 09:08:25 +0000
committerSven van Haastregt <sven.vanhaastregt@arm.com>2017-03-29 09:08:25 +0000
commit039a6d9f9f940f82b6631eab484d1e4181ff6fc2 (patch)
treed112f950579dfcd80926c0af4a117e3c0f101277 /llvm/lib/CodeGen/MachineVerifier.cpp
parent5829741c46bfc85ad44f7ac87bf535d3917996ce (diff)
downloadbcm5719-llvm-039a6d9f9f940f82b6631eab484d1e4181ff6fc2.tar.gz
bcm5719-llvm-039a6d9f9f940f82b6631eab484d1e4181ff6fc2.zip
[MachineVerifier] Avoid reference to nullptr
Instantiation of the MachineVerifierPass through PassInfo::getNormalCtor would yield a segfault since the default constructor of the MachineVerifierPass takes a reference to nullptr. Patch by Simone Pellegrini. Differential Revision: https://reviews.llvm.org/D31387 llvm-svn: 298987
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 15694cb481f..5c263b3021f 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -260,8 +260,8 @@ namespace {
static char ID; // Pass ID, replacement for typeid
const std::string Banner;
- MachineVerifierPass(const std::string &banner = nullptr)
- : MachineFunctionPass(ID), Banner(banner) {
+ MachineVerifierPass(const std::string banner = std::string())
+ : MachineFunctionPass(ID), Banner(std::move(banner)) {
initializeMachineVerifierPassPass(*PassRegistry::getPassRegistry());
}
OpenPOWER on IntegriCloud