mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
[un]wrap extracted from lib/Target/Target[MachineC].cpp, lib/ExecutionEngine/ExecutionEngineBindings.cpp into include/llvm/IR/DataLayout.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9592d0838
commit
04b617977e
@ -445,6 +445,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
|
||||
|
||||
inline DataLayout *unwrap(LLVMTargetDataRef P) {
|
||||
return reinterpret_cast<DataLayout*>(P);
|
||||
}
|
||||
|
||||
inline LLVMTargetDataRef wrap(const DataLayout *P) {
|
||||
return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
|
||||
}
|
||||
|
||||
class DataLayoutPass : public ImmutablePass {
|
||||
DataLayout DL;
|
||||
|
||||
|
@ -27,14 +27,6 @@ using namespace llvm;
|
||||
// Wrapping the C bindings types.
|
||||
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue, LLVMGenericValueRef)
|
||||
|
||||
inline DataLayout *unwrap(LLVMTargetDataRef P) {
|
||||
return reinterpret_cast<DataLayout*>(P);
|
||||
}
|
||||
|
||||
inline LLVMTargetDataRef wrap(const DataLayout *P) {
|
||||
return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
|
||||
}
|
||||
|
||||
inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
|
||||
return reinterpret_cast<TargetLibraryInfo*>(P);
|
||||
}
|
||||
|
@ -24,14 +24,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
inline DataLayout *unwrap(LLVMTargetDataRef P) {
|
||||
return reinterpret_cast<DataLayout*>(P);
|
||||
}
|
||||
|
||||
inline LLVMTargetDataRef wrap(const DataLayout *P) {
|
||||
return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
|
||||
}
|
||||
|
||||
inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
|
||||
return reinterpret_cast<TargetLibraryInfo*>(P);
|
||||
}
|
||||
|
@ -30,23 +30,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
inline DataLayout *unwrap(LLVMTargetDataRef P) {
|
||||
return reinterpret_cast<DataLayout*>(P);
|
||||
}
|
||||
|
||||
inline LLVMTargetDataRef wrap(const DataLayout *P) {
|
||||
return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout*>(P));
|
||||
}
|
||||
|
||||
inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
|
||||
return reinterpret_cast<TargetLibraryInfo*>(P);
|
||||
}
|
||||
|
||||
inline LLVMTargetLibraryInfoRef wrap(const TargetLibraryInfo *P) {
|
||||
TargetLibraryInfo *X = const_cast<TargetLibraryInfo*>(P);
|
||||
return reinterpret_cast<LLVMTargetLibraryInfoRef>(X);
|
||||
}
|
||||
|
||||
inline TargetMachine *unwrap(LLVMTargetMachineRef P) {
|
||||
return reinterpret_cast<TargetMachine*>(P);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user