-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Coverage] Introduce the type CounterPair
for RegionCounterMap. NFC.
#112724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e4172ca
03cfce1
afc8481
ce7c17d
63dbfb3
306d77f
a4f05c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -361,6 +361,8 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D, | |
return GV; | ||
} | ||
|
||
PGO.markStmtMaybeUsed(D.getInit()); // FIXME: Too lazy | ||
|
||
#ifndef NDEBUG | ||
CharUnits VarSize = CGM.getContext().getTypeSizeInChars(D.getType()) + | ||
D.getFlexibleArrayInitChars(getContext()); | ||
|
@@ -1868,7 +1870,10 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { | |
// If we are at an unreachable point, we don't need to emit the initializer | ||
// unless it contains a label. | ||
if (!HaveInsertPoint()) { | ||
if (!Init || !ContainsLabel(Init)) return; | ||
if (!Init || !ContainsLabel(Init)) { | ||
PGO.markStmtMaybeUsed(Init); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember why I marked here. I was just suppressing checks when I met an issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it be removed then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be compiled as an empty body and will be pruned. I will introduce debug facility that is enabled only in +Asserts. I prioritized implementing the debug facility as low. |
||
return; | ||
} | ||
EnsureInsertPoint(); | ||
} | ||
|
||
|
@@ -1979,6 +1984,8 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { | |
return EmitExprAsInit(Init, &D, lv, capturedByInit); | ||
} | ||
|
||
PGO.markStmtMaybeUsed(Init); | ||
|
||
if (!emission.IsConstantAggregate) { | ||
// For simple scalar/complex initialization, store the value directly. | ||
LValue lv = MakeAddrLValue(Loc, type); | ||
|
Uh oh!
There was an error while loading. Please reload this page.