mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
CliftEmitC: mark segments as commentable
This commit is contained in:
committed by
Pietro Fezzardi
parent
ff53337edb
commit
c01a553d23
+18
-11
@@ -146,19 +146,26 @@ public:
|
||||
CommentEmitted = true;
|
||||
}
|
||||
|
||||
emitGlobalDoxygenComment(Segment);
|
||||
{
|
||||
using RegionKind = ptml::CTokenEmitter::RegionKind;
|
||||
auto Guard = Tokens.enterRegion(RegionKind::Commentable,
|
||||
Segment.getHandle());
|
||||
|
||||
using EntityKind = ptml::CTokenEmitter::EntityKind;
|
||||
emitDeclaration(Segment.getType(),
|
||||
CEmitter::DeclaratorInfo{
|
||||
.Identifier = Segment.getName(),
|
||||
.Location = Segment.getHandle(),
|
||||
.CAttributes = {},
|
||||
.Kind = EntityKind::GlobalVariable,
|
||||
.Parameters = {} });
|
||||
emitGlobalDoxygenComment(Segment);
|
||||
|
||||
using EntityKind = ptml::CTokenEmitter::EntityKind;
|
||||
emitDeclaration(Segment.getType(),
|
||||
CEmitter::DeclaratorInfo{
|
||||
.Identifier = Segment.getName(),
|
||||
.Location = Segment.getHandle(),
|
||||
.CAttributes = {},
|
||||
.Kind = EntityKind::GlobalVariable,
|
||||
.Parameters = {} });
|
||||
|
||||
Tokens.emitPunctuator(ptml::CTokenEmitter::Punctuator::Semicolon);
|
||||
Tokens.emitNewline();
|
||||
}
|
||||
|
||||
Tokens.emitPunctuator(ptml::CTokenEmitter::Punctuator::Semicolon);
|
||||
Tokens.emitNewline();
|
||||
Tokens.emitNewline();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user