Disable targetdatalayoutcheck
authorTobias Grosser <tobias@grosser.es>
Mon, 17 Aug 2015 10:56:35 +0000 (10:56 +0000)
committerTobias Grosser <tobias@grosser.es>
Mon, 17 Aug 2015 10:56:35 +0000 (10:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245210 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetMachine.h
lib/CodeGen/MachineFunction.cpp

index d707e7c029303166369a48dc84b7a8db16ddedba..bc8537c0daa74acd48956045f7d33b40e26325e4 100644 (file)
@@ -133,15 +133,6 @@ public:
   /// Create a DataLayout.
   const DataLayout createDataLayout() const { return DL; }
 
-  /// Test if a DataLayout if compatible with the CodeGen for this target.
-  ///
-  /// The LLVM Module owns a DataLayout that is used for the target independent
-  /// optimizations and code generation. This hook provides a target specific
-  /// check on the validity of this DataLayout.
-  bool isCompatibleDataLayout(const DataLayout &Candidate) const {
-    return DL == Candidate;
-  }
-
   /// Get the pointer size for this target.
   ///
   /// This is the only time the DataLayout in the TargetMachine is used.
index cf9213b84c41abfb2b29e33cc3c589a4b4ed50a4..5a797f848436faabb9a050d43bf0c3888c93abe7 100644 (file)
@@ -87,11 +87,6 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,
 
   FunctionNumber = FunctionNum;
   JumpTableInfo = nullptr;
-
-  assert(TM.isCompatibleDataLayout(getDataLayout()) &&
-         "Can't create a MachineFunction using a Module with a "
-         "Target-incompatible DataLayout attached\n");
-
   PSVManager = llvm::make_unique<PseudoSourceValueManager>();
 }