mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-14 20:22:30 +00:00
Revert "Define a cppAccessorType
to const-ref in APFloatParameter and update ODS emitter to use it for verifier signatures"
This reverts commit 89af17c0c74eb9d8d11870f6510e475eff74eef4. This broke the gcc5 build.
This commit is contained in:
parent
93c791839a
commit
1461bd13c9
@ -3135,7 +3135,6 @@ class StringRefParameter<string desc = ""> :
|
||||
class APFloatParameter<string desc> :
|
||||
AttrOrTypeParameter<"::llvm::APFloat", desc> {
|
||||
let comparator = "$_lhs.bitwiseIsEqual($_rhs)";
|
||||
let cppAccessorType = "const ::llvm::APFloat &";
|
||||
}
|
||||
|
||||
// For standard ArrayRefs, which require allocation.
|
||||
|
@ -283,7 +283,7 @@ double FloatAttr::getValueAsDouble(APFloat value) {
|
||||
}
|
||||
|
||||
LogicalResult FloatAttr::verify(function_ref<InFlightDiagnostic()> emitError,
|
||||
Type type, const APFloat &value) {
|
||||
Type type, APFloat value) {
|
||||
// Verify that the type is correct.
|
||||
if (!type.isa<FloatType>())
|
||||
return emitError() << "expected floating point type";
|
||||
|
@ -129,7 +129,7 @@ TestI64ElementsAttr::verify(function_ref<InFlightDiagnostic()> emitError,
|
||||
|
||||
LogicalResult
|
||||
TestAttrWithFormatAttr::verify(function_ref<InFlightDiagnostic()> emitError,
|
||||
int64_t one, StringRef two, IntegerAttr three,
|
||||
int64_t one, std::string two, IntegerAttr three,
|
||||
ArrayRef<int> four) {
|
||||
if (four.size() != static_cast<unsigned>(one))
|
||||
return emitError() << "expected 'one' to equal 'four.size()'";
|
||||
|
@ -61,8 +61,8 @@ def B_CompoundAttrA : TestAttr<"CompoundA"> {
|
||||
let genVerifyDecl = 1;
|
||||
|
||||
// DECL-LABEL: class CompoundAAttr : public ::mlir::Attribute
|
||||
// DECL: static CompoundAAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int widthOfSomething, ::test::SimpleTypeA exampleTdType, const ::llvm::APFloat &apFloat, ::llvm::ArrayRef<int> dims, ::mlir::Type inner);
|
||||
// DECL: static ::mlir::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int widthOfSomething, ::test::SimpleTypeA exampleTdType, const ::llvm::APFloat &apFloat, ::llvm::ArrayRef<int> dims, ::mlir::Type inner);
|
||||
// DECL: static CompoundAAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int widthOfSomething, ::test::SimpleTypeA exampleTdType, ::llvm::APFloat apFloat, ::llvm::ArrayRef<int> dims, ::mlir::Type inner);
|
||||
// DECL: static ::mlir::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int widthOfSomething, ::test::SimpleTypeA exampleTdType, ::llvm::APFloat apFloat, ::llvm::ArrayRef<int> dims, ::mlir::Type inner);
|
||||
// DECL: static constexpr ::llvm::StringLiteral getMnemonic() {
|
||||
// DECL: return {"cmpnd_a"};
|
||||
// DECL: }
|
||||
@ -71,7 +71,7 @@ def B_CompoundAttrA : TestAttr<"CompoundA"> {
|
||||
// DECL: void print(::mlir::AsmPrinter &printer) const;
|
||||
// DECL: int getWidthOfSomething() const;
|
||||
// DECL: ::test::SimpleTypeA getExampleTdType() const;
|
||||
// DECL: const ::llvm::APFloat &getApFloat() const;
|
||||
// DECL: ::llvm::APFloat getApFloat() const;
|
||||
|
||||
// Check that AttributeSelfTypeParameter is handled properly.
|
||||
// DEF-LABEL: struct CompoundAAttrStorage
|
||||
@ -139,5 +139,5 @@ def F_ParamWithAccessorTypeAttr : TestAttr<"ParamWithAccessorType"> {
|
||||
// DECL-LABEL: class ParamWithAccessorTypeAttr
|
||||
// DECL: StringRef getParam()
|
||||
// DEF: ParamWithAccessorTypeAttrStorage
|
||||
// DEF: ParamWithAccessorTypeAttrStorage(StringRef param)
|
||||
// DEF: ParamWithAccessorTypeAttrStorage(std::string param)
|
||||
// DEF: StringRef ParamWithAccessorTypeAttr::getParam()
|
||||
|
@ -315,7 +315,7 @@ DefGen::getBuilderParams(std::initializer_list<MethodParameter> prefix) const {
|
||||
SmallVector<MethodParameter> builderParams;
|
||||
builderParams.append(prefix.begin(), prefix.end());
|
||||
for (auto ¶m : params)
|
||||
builderParams.emplace_back(param.getCppAccessorType(), param.getName());
|
||||
builderParams.emplace_back(param.getCppType(), param.getName());
|
||||
return builderParams;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user