projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove extra forward declarations and scrub includes for all in tree InstPrinters...
[oota-llvm.git]
/
lib
/
Target
/
TargetMachineC.cpp
diff --git
a/lib/Target/TargetMachineC.cpp
b/lib/Target/TargetMachineC.cpp
index 6255448a7e3c5ba21076d359fbde0bff8e10aa42..f82566c37baa43c4d237fdffd8f720514ac526d1 100644
(file)
--- a/
lib/Target/TargetMachineC.cpp
+++ b/
lib/Target/TargetMachineC.cpp
@@
-32,6
+32,15
@@
using namespace llvm;
using namespace llvm;
+namespace llvm {
+// Friend to the TargetMachine, access legacy API that are made private in C++
+struct C_API_PRIVATE_ACCESS {
+ static const DataLayout &getDataLayout(const TargetMachine &T) {
+ return T.getDataLayout();
+ }
+};
+}
+
static TargetMachine *unwrap(LLVMTargetMachineRef P) {
return reinterpret_cast<TargetMachine *>(P);
}
static TargetMachine *unwrap(LLVMTargetMachineRef P) {
return reinterpret_cast<TargetMachine *>(P);
}
@@
-168,7
+177,7
@@
char* LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T) {
/** Deprecated: use LLVMGetDataLayout(LLVMModuleRef M) instead. */
LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T) {
/** Deprecated: use LLVMGetDataLayout(LLVMModuleRef M) instead. */
LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T) {
- return wrap(&
unwrap(T)->getDataLayout(
));
+ return wrap(&
C_API_PRIVATE_ACCESS::getDataLayout(*unwrap(T)
));
}
void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,
}
void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,