mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
e73bd95493
SegregateStackAccesses and PromoteStackPointer were not handling functions declarated (but not defined) properly. This commit fixes this, in part by adopting `TaggedFunctionPass`.
22 lines
506 B
C++
22 lines
506 B
C++
#pragma once
|
|
|
|
//
|
|
// Copyright (c) rev.ng Labs Srl. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/Support/TaggedFunctionPass.h"
|
|
|
|
struct PromoteStackPointerPass : public TaggedFunctionPass {
|
|
public:
|
|
static char ID;
|
|
|
|
PromoteStackPointerPass() :
|
|
TaggedFunctionPass(ID,
|
|
&FunctionTags::Isolated,
|
|
&FunctionTags::StackPointerPromoted) {}
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
|
|
|
|
bool runOnFunction(llvm::Function &F) override;
|
|
};
|