[PATCH] D13863: Virtualize createMCAsmInfo and add MCTargetMachine subclasses.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 09:04:01 PST 2015
dsanders updated this revision to Diff 40522.
dsanders added a comment.
Refresh patch.
http://reviews.llvm.org/D13863
Files:
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
lib/Target/ARM/MCTargetDesc/ARMMCTargetMachine.cpp
Index: lib/Target/ARM/MCTargetDesc/ARMMCTargetMachine.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCTargetMachine.cpp
+++ lib/Target/ARM/MCTargetDesc/ARMMCTargetMachine.cpp
@@ -30,7 +30,7 @@
ARMMCTargetMachine::createMCAsmInfo(const MCRegisterInfo &MRI) const {
MCAsmInfo *MAI;
if (TheTriple.isOSDarwin() || TheTriple.isOSBinFormatMachO())
- MAI = new ARMMCAsmInfoDarwin(IsLittleEndian);
+ MAI = new ARMMCAsmInfoDarwin(IsLittleEndian, TheTriple.getOS());
else if (TheTriple.isWindowsMSVCEnvironment())
MAI = new ARMCOFFMCAsmInfoMicrosoft();
else if (TheTriple.isOSWindows())
Index: lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
+++ lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
@@ -24,7 +24,7 @@
virtual void anchor();
public:
- explicit ARMMCAsmInfoDarwin(bool IsLittleEndian_);
+ explicit ARMMCAsmInfoDarwin(bool IsLittleEndian_, Triple::OSType OS);
};
class ARMELFMCAsmInfo : public MCAsmInfoELF {
Index: lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+++ lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
@@ -17,7 +17,8 @@
void ARMMCAsmInfoDarwin::anchor() { }
-ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(bool IsLittleEndian_) {
+ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(bool IsLittleEndian_,
+ Triple::OSType OS) {
IsLittleEndian = IsLittleEndian_;
Data64bitsDirective = nullptr;
@@ -29,7 +30,7 @@
SupportsDebugInformation = true;
// Exceptions handling
- ExceptionsType = TheTriple.isWatchOS() ? ExceptionHandling::DwarfCFI
+ ExceptionsType = OS == Triple::WatchOS ? ExceptionHandling::DwarfCFI
: ExceptionHandling::SjLj;
UseIntegratedAssembler = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13863.40522.patch
Type: text/x-patch
Size: 1979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/7fd84726/attachment.bin>
More information about the llvm-commits
mailing list