mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
[CodeGen] Let MachineVerifierPass own its banner string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
01bc84d1fd
commit
9173c775e3
@ -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…
Reference in New Issue
Block a user