mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
da3ee051b9
The new named metadata doesn't embed the type of the stack anymore. It's just a marker of the alloca that represents the stack frame.
25 lines
593 B
C
25 lines
593 B
C
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/IR/Instruction.h"
|
|
#include "llvm/IR/Instructions.h"
|
|
|
|
/// \name Functions for manipulating stack model type metadata
|
|
///
|
|
///@{
|
|
|
|
inline constexpr const char *StackFrameMDName = "revng.stack_frame";
|
|
|
|
inline bool hasStackFrameMetadata(const llvm::AllocaInst *I) {
|
|
return I->hasMetadata(I->getContext().getMDKindID(StackFrameMDName));
|
|
};
|
|
|
|
inline void setStackFrameMetadata(llvm::AllocaInst *A) {
|
|
A->setMetadata(StackFrameMDName, llvm::MDNode::get(A->getContext(), {}));
|
|
}
|
|
|
|
///@}
|