summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-08-09 22:24:04 +0000
committerReid Kleckner <rnk@google.com>2018-08-09 22:24:04 +0000
commitfce7f73bec461211ff5187f34d5f76facd22f753 (patch)
tree214023d89532e6605cb4840a74f4553a0c2bcaf8 /llvm/lib/Target/TargetLoweringObjectFile.cpp
parentc6944f795d846ae55f8375dd0f8f8ef2045d4cfb (diff)
downloadbcm5719-llvm-fce7f73bec461211ff5187f34d5f76facd22f753.tar.gz
bcm5719-llvm-fce7f73bec461211ff5187f34d5f76facd22f753.zip
[MC] Move EH DWARF encodings from MC to CodeGen, NFC
Summary: The TType encoding, LSDA encoding, and personality encoding are all passed explicitly by CodeGen to the assembler through .cfi_* directives, so only the AsmPrinter needs to know about them. The FDE CFI encoding however, controls the encoding of the label implicitly created by the .cfi_startproc directive. That directive seems to be special in that it doesn't take an encoding, so the assembler just has to know how to encode one DSO-local label reference from .eh_frame to .text. As a result, it looks like MC will continue to have to know when the large code model is in use. Perhaps we could invent a '.cfi_startproc [large]' flag so that this knowledge doesn't need to pollute the assembler. Reviewers: davide, lliu0, JDevlieghere Subscribers: hiraditya, fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D50533 llvm-svn: 339397
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 6bcf60fafc3..bb937923b47 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -45,6 +45,9 @@ void TargetLoweringObjectFile::Initialize(MCContext &ctx,
Mang = new Mangler();
InitMCObjectFileInfo(TM.getTargetTriple(), TM.isPositionIndependent(), *Ctx,
TM.getCodeModel() == CodeModel::Large);
+
+ // Reset various EH DWARF encodings.
+ PersonalityEncoding = LSDAEncoding = TTypeEncoding = dwarf::DW_EH_PE_absptr;
}
TargetLoweringObjectFile::~TargetLoweringObjectFile() {
OpenPOWER on IntegriCloud