R600/SI: Add InstrMapping for noret atomics.
[oota-llvm.git] / lib / Target / Target.cpp
index ee5178184fb9ff03d2a969f2691a787da5af8a3a..d277f82eb869bd2f983f9bca31a535e1085a4fe0 100644 (file)
 
 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);
 }
@@ -55,6 +47,8 @@ LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep) {
 }
 
 void LLVMAddTargetData(LLVMTargetDataRef TD, LLVMPassManagerRef PM) {
+  // The DataLayoutPass must now be in sync with the module. Unfortunatelly we
+  // cannot enforce that from the C api.
   unwrap(PM)->add(new DataLayoutPass(*unwrap(TD)));
 }