Files
revng-revng/include/revng-c/ValueManipulationAnalysis/ValueManipulationAnalysis.h
T
Giacomo Vercesi ab125b35b0 Fix License headers
Change company name to "rev.ng Labs Srl" in all license headers
to reflect changed company name and legal status
Add missing license headers to files that didn't have one
2022-04-19 12:17:59 +02:00

33 lines
819 B
C++

#pragma once
//
// Copyright rev.ng Labs Srl. See LICENSE.md for details.
//
#include <map>
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "revng-c/ValueManipulationAnalysis/TypeColors.h"
/// Assign a type color for each Use and Value of a function
class ValueManipulationAnalysis : public llvm::FunctionPass {
public:
using ColorMapT = std::map<const llvm::Value *, const vma::ColorSet>;
static char ID;
// Ctors
ValueManipulationAnalysis() : llvm::FunctionPass(ID) {}
// FunctionPass methods
bool runOnFunction(llvm::Function &F) override;
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
/// ColorMap getter
///\return A map between `llvm::Value*`s and their type color
const ColorMapT &getColorMap() const { return ColorMap; }
private:
ColorMapT ColorMap;
};