summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-01-01 00:15:28 -0800
committerFangrui Song <maskray@google.com>2020-01-01 00:50:18 -0800
commitd2bb8c16e711602481c8b33d0e2ccc9994eb6641 (patch)
tree01f3e95e28811a0253d6b4a206d25edd8edee125 /clang/lib/CodeGen
parent47e3d3ec0c5607ae3bc6181537c0622080f3af27 (diff)
downloadbcm5719-llvm-d2bb8c16e711602481c8b33d0e2ccc9994eb6641.tar.gz
bcm5719-llvm-d2bb8c16e711602481c8b33d0e2ccc9994eb6641.zip
[MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations
clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations check and sets dso_local on applicable global variables. We don't need to duplicate the work in TargetMachine shouldAssumeDSOLocal. Verified that -mpie-copy-relocations can still emit PC relative relocations for external variable accesses. clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32 clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 9b1e9178834..645ef0165a5 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -485,7 +485,6 @@ static void initTargetOptions(llvm::TargetOptions &Options,
Options.MCOptions.MCNoExecStack = CodeGenOpts.NoExecStack;
Options.MCOptions.MCIncrementalLinkerCompatible =
CodeGenOpts.IncrementalLinkerCompatible;
- Options.MCOptions.MCPIECopyRelocations = CodeGenOpts.PIECopyRelocations;
Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings;
Options.MCOptions.MCNoWarn = CodeGenOpts.NoWarn;
Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose;
OpenPOWER on IntegriCloud