[ARM64][MC] Set the default CPU to cyclone when initilizating the MC layer.
authorQuentin Colombet <qcolombet@apple.com>
Mon, 14 Apr 2014 21:25:53 +0000 (21:25 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Mon, 14 Apr 2014 21:25:53 +0000 (21:25 +0000)
This matches that ARM64Subtarget does for now.

This is related to <rdar://problem/16573920>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206211 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM64/MCTargetDesc/ARM64MCTargetDesc.cpp

index 8d54412f5316422352aa192545901c4e9b5b799d..3ce3b6575ec88f71a2246f6e77e416d34ae6e61b 100644 (file)
@@ -43,6 +43,12 @@ static MCInstrInfo *createARM64MCInstrInfo() {
 static MCSubtargetInfo *createARM64MCSubtargetInfo(StringRef TT, StringRef CPU,
                                                    StringRef FS) {
   MCSubtargetInfo *X = new MCSubtargetInfo();
+
+  // FIXME: Make this darwin-only.
+  if (CPU.empty())
+    // We default to Cyclone for now, on Darwin.
+    CPU = "cyclone";
+
   InitARM64MCSubtargetInfo(X, TT, CPU, FS);
   return X;
 }