summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-18 22:36:35 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-18 22:36:35 +0000
commitc592725fbbdae6fd0b89fbc6a5ecf17be7546609 (patch)
tree9ffedfe36fd591337f0d71d665f5b20e933bd9e6 /llvm/lib/Target/X86/X86TargetMachine.cpp
parent87d0208c418be5a668dadd60652338f5f7dd9578 (diff)
downloadbcm5719-llvm-c592725fbbdae6fd0b89fbc6a5ecf17be7546609.tar.gz
bcm5719-llvm-c592725fbbdae6fd0b89fbc6a5ecf17be7546609.zip
- Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method. llvm-svn: 93796
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 547fa8eeebc..684e1fc573d 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -250,12 +250,19 @@ void X86TargetMachine::setCodeModelForJIT() {
setCodeModel(CodeModel::Small);
}
+/// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are 4-byte,
+/// 8-byte, and target default. The CIE is hard-coded to indicate that the LSDA
+/// pointer in the FDE section is an "sdata4", and should be encoded as a 4-byte
+/// pointer by default. However, some systems may require a different size due
+/// to bugs or other conditions. We will default to a 4-byte encoding unless the
+/// system tells us otherwise.
+///
/// FIXME: This call-back isn't good! We should be using the correct encoding
/// regardless of the system. However, there are some systems which have bugs
/// that prevent this from occuring.
DwarfLSDAEncoding::Encoding X86TargetMachine::getLSDAEncoding() const {
if (Subtarget.isTargetDarwin() && Subtarget.getDarwinVers() != 10)
- return DwarfLSDAEncoding::FourByte;
+ return DwarfLSDAEncoding::Default;
return DwarfLSDAEncoding::EightByte;
}
OpenPOWER on IntegriCloud