[TargetLowering] Move TargetLoweringBase::isJumpTableRelative() implementation into...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 22 May 2020 12:18:06 +0000 (13:18 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 22 May 2020 13:26:27 +0000 (14:26 +0100)
This will help with reducing header dependencies in TargetLowering.h in a future patch.

llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/TargetLoweringBase.cpp

index db501c8..be37e5b 100644 (file)
@@ -1651,9 +1651,7 @@ public:
   /// Zero if no limit.
   unsigned getMaximumJumpTableSize() const;
 
-  virtual bool isJumpTableRelative() const {
-    return TM.isPositionIndependent();
-  }
+  virtual bool isJumpTableRelative() const;
 
   /// If a physical register, this specifies the register that
   /// llvm.savestack/llvm.restorestack should save and restore.
index 893298c..565415d 100644 (file)
@@ -1834,6 +1834,10 @@ void TargetLoweringBase::setMaximumJumpTableSize(unsigned Val) {
   MaximumJumpTableSize = Val;
 }
 
+bool TargetLoweringBase::isJumpTableRelative() const {
+  return getTargetMachine().isPositionIndependent();
+}
+
 //===----------------------------------------------------------------------===//
 //  Reciprocal Estimates
 //===----------------------------------------------------------------------===//