diff options
author | Sam Clegg <sbc@chromium.org> | 2019-03-18 21:21:12 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2019-03-18 21:21:12 +0000 |
commit | b7708ec87fcfaaa1526469bd010cb10f9b9f1495 (patch) | |
tree | 86248c8c58de521f64d53c8799588b8b598eb4d3 /llvm/lib/Target/TargetMachine.cpp | |
parent | f89343bc47dcac93aa333b2363f4a681143c463f (diff) | |
download | bcm5719-llvm-b7708ec87fcfaaa1526469bd010cb10f9b9f1495.tar.gz bcm5719-llvm-b7708ec87fcfaaa1526469bd010cb10f9b9f1495.zip |
[WebAssembly] Don't override default implementation of isOffsetFoldingLegal. NFC.
The default implementation does we want and is going to more compatible
with dynamic linking (-fPIC) support that is planned.
This is NFC because currently we only build wasm with
`-relocation-model=static` which in turn means that the default
`isOffsetFoldingLegal` always returns true today.
Differential Revision: https://reviews.llvm.org/D54661
llvm-svn: 356410
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index c08ed43fe6b..7a1e01bdab6 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -161,7 +161,7 @@ bool TargetMachine::shouldAssumeDSOLocal(const Module &M, if (GV && !GV->hasDefaultVisibility()) return true; - if (TT.isOSBinFormatMachO()) { + if (TT.isOSBinFormatMachO() || TT.isOSBinFormatWasm()) { if (RM == Reloc::Static) return true; return GV && GV->isStrongDefinitionForLinker(); |