diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-27 21:33:08 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-27 21:33:08 +0000 |
| commit | f9e348bd59c441be9417507f9752c66716d2ab41 (patch) | |
| tree | d700ebe252587e5fbf9de8d7a5da15c773480074 /llvm/lib/Target/TargetMachine.cpp | |
| parent | 68760387df78acc4f1bebea4983739ce0dd39a4c (diff) | |
| download | bcm5719-llvm-f9e348bd59c441be9417507f9752c66716d2ab41.tar.gz bcm5719-llvm-f9e348bd59c441be9417507f9752c66716d2ab41.zip | |
Convert a few more comparisons to isPositionIndependent(). NFC.
llvm-svn: 273945
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, |

