There are a few places where subtarget features are still

represented by uint64_t, this patch replaces these
usages with the FeatureBitset (std::bitset) type.

Differential Revision: http://reviews.llvm.org/D10542


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ranjeet Singh
2015-06-30 11:30:42 +00:00
parent 427ea8e18a
commit a5106ca54d
11 changed files with 127 additions and 101 deletions

View File

@@ -13,6 +13,7 @@
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/SubtargetFeature.h"
#include <memory>
namespace llvm {
@@ -95,7 +96,7 @@ protected: // Can only create subclasses.
MCTargetAsmParser();
/// AvailableFeatures - The current set of available features.
uint64_t AvailableFeatures;
FeatureBitset AvailableFeatures;
/// ParsingInlineAsm - Are we parsing ms-style inline assembly?
bool ParsingInlineAsm;
@@ -110,8 +111,8 @@ protected: // Can only create subclasses.
public:
~MCTargetAsmParser() override;
uint64_t getAvailableFeatures() const { return AvailableFeatures; }
void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; }
FeatureBitset getAvailableFeatures() const { return AvailableFeatures; }
void setAvailableFeatures(FeatureBitset Value) { AvailableFeatures = Value; }
bool isParsingInlineAsm () { return ParsingInlineAsm; }
void setParsingInlineAsm (bool Value) { ParsingInlineAsm = Value; }
@@ -169,6 +170,7 @@ public:
virtual bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
OperandVector &Operands, MCStreamer &Out,
uint64_t &ErrorInfo,
FeatureBitset &ErrorMissingFeature,
bool MatchingInlineAsm) = 0;
/// Allows targets to let registers opt out of clobber lists.