MLIR  19.0.0git
Constraint.cpp
Go to the documentation of this file.
1 //===- Constraint.cpp -----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 using namespace mlir;
12 using namespace mlir::pdll::ods;
13 
14 //===----------------------------------------------------------------------===//
15 // Constraint
16 //===----------------------------------------------------------------------===//
17 
18 StringRef Constraint::getDemangledName() const {
19  StringRef demangledName = name;
20 
21  // Drop the "anonymous" suffix if present.
22  size_t anonymousSuffix = demangledName.find("(anonymous_");
23  if (anonymousSuffix != StringRef::npos)
24  demangledName = demangledName.take_front(anonymousSuffix);
25  return demangledName;
26 }
StringRef getDemangledName() const
Return the demangled name of this constraint.
Definition: Constraint.cpp:18
Include the generated interface declarations.