forked from microsoft/llvm-mctoll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstMetadata.h
29 lines (26 loc) · 1.09 KB
/
InstMetadata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//===----------- InstMetadata.h ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file contains the declarations of all Metadata intended to be associated
// with various instructions during the process of raising binaries using
// llvm-mctoll.
//
//===----------------------------------------------------------------------===//
#ifndef TOOLS_LLVM_MCTOLL_INSTMETADATA_H_
#define TOOLS_LLVM_MCTOLL_INSTMETADATA_H_
#define RODATA_INDEX_MD_STR "ROData_Index"
#define RODATA_CONTENT_MD_STR "ROData_Content"
#define RODATA_SEC_INFO_MD_STR "ROData_SecInfo"
#include "llvm/IR/Instruction.h"
namespace mctoll {
static bool hasRODataAccess(Instruction *I) {
return (I->hasMetadata(RODATA_INDEX_MD_STR) ||
I->hasMetadata(RODATA_CONTENT_MD_STR));
}
} // namespace mctoll
#endif /* TOOLS_LLVM_MCTOLL_INSTMETADATA_H_ */