Correctly handle a one-word struct passed byval on x86_64.
[oota-llvm.git] / lib / Target / PowerPC / PPCAsmBackend.cpp
index 9dfc6fce9470b78577803bc3e537dfc41565fd5c..f562a3f4f9e843b3c901f98e43f0ec23a14f7f43 100644 (file)
@@ -12,7 +12,6 @@
 #include "PPCFixupKinds.h"
 #include "llvm/MC/MCMachObjectWriter.h"
 #include "llvm/MC/MCSectionMachO.h"
-#include "llvm/MC/MCObjectFormat.h"
 #include "llvm/MC/MCObjectWriter.h"
 #include "llvm/Object/MachOFormat.h"
 #include "llvm/Target/TargetRegistry.h"
@@ -82,14 +81,9 @@ public:
 // FIXME: This should be in a separate file.
 namespace {
   class DarwinPPCAsmBackend : public PPCAsmBackend {
-    MCMachOObjectFormat Format;
   public:
     DarwinPPCAsmBackend(const Target &T) : PPCAsmBackend(T) { }
     
-    virtual const MCObjectFormat &getObjectFormat() const {
-      return Format;
-    }
-    
     void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
                     uint64_t Value) const {
       assert(0 && "UNIMP");
@@ -116,10 +110,8 @@ namespace {
 
 TargetAsmBackend *llvm::createPPCAsmBackend(const Target &T,
                                             const std::string &TT) {
-  switch (Triple(TT).getOS()) {
-  case Triple::Darwin:
+  if (Triple(TT).isOSDarwin())
     return new DarwinPPCAsmBackend(T);
-  default:
-    return 0;
-  }
+
+  return 0;
 }