Skip to content

Commit a44406b

Browse files
committed
Formatting and comments
1 parent 7327554 commit a44406b

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,11 @@ class IRGenSILFunction :
965965
bool shouldShadowVariable(SILDebugVariable varInfo, bool isAnonymous) {
966966
return !IGM.IRGen.Opts.DisableDebuggerShadowCopies
967967
&& !IGM.IRGen.Opts.shouldOptimize()
968-
//Disable shadow in deserialized functions as they might be optimized
968+
// Shadow copies are only emitted at -Onone, but a deserialized function
969+
// might have been already optimized, so ignore those.
969970
&& !CurSILFn->wasDeserializedCanonical()
970-
&& (!CurSILFn->isSpecialization() || !CurSILFn->getSpecializationInfo()->getParent()->wasDeserializedCanonical())
971+
&& (!CurSILFn->isSpecialization() ||
972+
!CurSILFn->getSpecializationInfo()->getParent()->wasDeserializedCanonical())
971973
&& !isAnonymous;
972974
}
973975

lib/Serialization/SILFormat.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,15 @@ namespace sil_block {
316316

317317
using SILDebugValueLayout = BCRecordLayout<
318318
SIL_DEBUG_VALUE,
319-
320-
SILTypeCategoryField, // operand type category
321-
SILTypeCategoryField, // debug var type category
322-
BCFixed<11>,// poison, movableValueDebuginfo, trace, hasDebugVar, isLet, isDenseMapSingleton(two bits), hasSource, hasLoc, hasExpr
323-
BCArray<ValueIDField> // operand info: operand, type, debug var info: name, argno, optional stuff: typeid
324-
>;
319+
320+
SILTypeCategoryField, /// operand type category
321+
SILTypeCategoryField, /// debug var type category
322+
BCFixed<11>, /// poison, movableValueDebuginfo, trace,
323+
/// hasDebugVar, isLet, isDenseMapSingleton(two
324+
/// bits), hasSource, hasLoc, hasExpr
325+
BCArray<ValueIDField> /// operand info: operand, type, debug var info:
326+
/// name, argno, optional stuff: typeid
327+
>;
325328

326329
using DebugValueDelimiterLayout = BCRecordLayout<
327330
SIL_DEBUG_VALUE_DELIMITER

0 commit comments

Comments
 (0)