[PATCH] D43005: [ARM] Error out on .arm assembler directives on windows

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 23:30:34 PDT 2018


peter.smith added a comment.

Looks a lot better than before. One possible alternative to making the subtarget then subtracting ARM, could we use the same way that nacl adds the nacl-trap feature in ParseARMTriple?

  --- a/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
  +++ b/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
  @@ -153,6 +153,13 @@ std::string ARM_MC::ParseARMTriple(const Triple &TT, StringRef CPU) {
         ARMArchFeature += ",+nacl-trap";
     }
   
  +  if (TT.isOSWindows()) {
  +    if (ARMArchFeature.empty())
  +      ARMArchFeature += "+noarm";
  +    else
  +      ARMArchFeature += ",+noarm";
  +  }
  +
     return ARMArchFeature;
   }

This will mean that the target features will be set up without ARM without needing to toggle it later.


https://reviews.llvm.org/D43005





More information about the llvm-commits mailing list