Repository navigation
Add several interfaces for Clang AST nodes. - #661
Conversation
80b715f to
7152209
Compare
There was a problem hiding this comment.
@lkorenc @anthro-poid lets open a discussion about naming.
I suggest to simplify it a bit:
- rename folder to
Interfaces/AST/ - drop
ASTprefix from file names - put interfaces into
vast::astnamespace. I know too much ast, but this should not be part ofvastnamespace. To do this see bellow. - also we need to rename interface definitions in tablegen to have some unique prefix, otherwise we clash if we link against clangir. Make it
def VAST_DeclInterface.
Create common Interfaces in Interfaces/AST/Common.td:
// Copyright (c) 2024, Trail of Bits, Inc.
#ifndef VAST_AST_INTERFACES_COMMON
#define VAST_AST_INTERFACES_COMMON
include "mlir/IR/OpBase.td"
class VAST_ASTOpInterface<string name, list<Interface> baseInterfaces = []>
: OpInterface<name, baseInterfaces>
{
let cppNamespace = "::vast::ast";
}
class VAST_ASTTypeInterface<string name, list<Interface> baseInterfaces = []>
: TypeInterface<name, baseInterfaces>
{
let cppNamespace = "::vast::ast";
}
class VAST_ASTAttrInterface<string name, list<Interface> baseInterfaces = []>
: AttrInterface<name, baseInterfaces>
{
let cppNamespace = "::vast::ast";
}
#endif // VAST_AST_INTERFACES_COMMON
4950147 to
84e4b66
Compare
6a4d98e to
6ede338
Compare
fe97788 to
0dddd82
Compare
Cpp-Linter Report
|
No description provided.