diff options
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
| -rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 220f1f3183d..d7617e73245 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -53,6 +53,10 @@ TargetMachine::~TargetMachine() { delete STI; } +bool TargetMachine::isPositionIndependent() const { + return getRelocationModel() == Reloc::PIC_; +} + /// \brief Reset the target options based on the function's attributes. // FIXME: This function needs to go away for a number of reasons: // a) global state on the TargetMachine is terrible in general, |

