mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-14 01:20:40 +00:00
[CodeGen] Let MachineVerifierPass own its banner string
llvm-svn: 224041
This commit is contained in:
parent
f4ec473c32
commit
335449f68a
@ -560,7 +560,7 @@ namespace llvm {
|
||||
/// createMachineVerifierPass - This pass verifies cenerated machine code
|
||||
/// instructions for correctness.
|
||||
///
|
||||
FunctionPass *createMachineVerifierPass(const char *Banner = nullptr);
|
||||
FunctionPass *createMachineVerifierPass(const std::string& Banner);
|
||||
|
||||
/// createDwarfEHPass - This pass mulches exception handling code into a form
|
||||
/// adapted to code generation. Required if using dwarf exception handling.
|
||||
|
@ -243,10 +243,10 @@ namespace {
|
||||
|
||||
struct MachineVerifierPass : public MachineFunctionPass {
|
||||
static char ID; // Pass ID, replacement for typeid
|
||||
const char *const Banner;
|
||||
const std::string Banner;
|
||||
|
||||
MachineVerifierPass(const char *b = nullptr)
|
||||
: MachineFunctionPass(ID), Banner(b) {
|
||||
MachineVerifierPass(const std::string &banner = nullptr)
|
||||
: MachineFunctionPass(ID), Banner(banner) {
|
||||
initializeMachineVerifierPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ namespace {
|
||||
}
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &MF) override {
|
||||
MF.verify(this, Banner);
|
||||
MF.verify(this, Banner.c_str());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@ -267,7 +267,7 @@ char MachineVerifierPass::ID = 0;
|
||||
INITIALIZE_PASS(MachineVerifierPass, "machineverifier",
|
||||
"Verify generated machine code", false, false)
|
||||
|
||||
FunctionPass *llvm::createMachineVerifierPass(const char *Banner) {
|
||||
FunctionPass *llvm::createMachineVerifierPass(const std::string &Banner) {
|
||||
return new MachineVerifierPass(Banner);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user