mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
9f1bbc8b49
\brief is a stupid feature that we should stop using: https://lists.llvm.org/pipermail/llvm-dev/2015-May/085152.html
43 lines
759 B
C++
43 lines
759 B
C++
#pragma once
|
|
|
|
//
|
|
// Copyright (c) rev.ng Srls. See LICENSE.md for details.
|
|
//
|
|
|
|
/// Pass that identifies which Instructions must be serialized
|
|
|
|
#include <map>
|
|
#include <set>
|
|
#include <type_traits>
|
|
|
|
#include "llvm/Pass.h"
|
|
|
|
#include "revng/Support/Debug.h"
|
|
|
|
#include "MarkForSerializationFlags.h"
|
|
|
|
namespace llvm {
|
|
|
|
class Function;
|
|
class LoadInst;
|
|
|
|
} // end namespace llvm
|
|
|
|
extern Logger<> MarkLog;
|
|
|
|
struct MarkForSerializationPass : public llvm::FunctionPass {
|
|
public:
|
|
static char ID;
|
|
|
|
MarkForSerializationPass() : llvm::FunctionPass(ID) {}
|
|
|
|
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
|
|
|
|
bool runOnFunction(llvm::Function &F) override;
|
|
|
|
const auto &getMap() const { return ToSerialize; }
|
|
|
|
private:
|
|
SerializationMap ToSerialize;
|
|
};
|