if (!Builder.getCurrentDebugLocation().isUnknown())
return;
+ // The file may have had a line directive change. Process any of
+ // those before updating the state.
+ UpdateLineDirectiveRegion(Builder);
+
// Update last state.
PrevLoc = CurLoc;
llvm::DIFile F,
SmallVectorImpl<llvm::Value *> &EltTys);
+ // UpdateLineDirectiveRegion - Update region stack only if #line directive
+ // has introduced scope change.
+ void UpdateLineDirectiveRegion(CGBuilderTy &Builder);
+
public:
CGDebugInfo(CodeGenModule &CGM);
~CGDebugInfo();
/// EmitFunctionEnd - Constructs the debug code for exiting a function.
void EmitFunctionEnd(CGBuilderTy &Builder);
- /// UpdateLineDirectiveRegion - Update region stack only if #line directive
- /// has introduced scope change.
- void UpdateLineDirectiveRegion(CGBuilderTy &Builder);
-
/// UpdateCompletedType - Update type cache because the type is now
/// translated.
void UpdateCompletedType(const TagDecl *TD);
ReturnValueSlot ReturnValue) {
if (CGDebugInfo *DI = getDebugInfo()) {
DI->setLocation(E->getLocStart());
- DI->UpdateLineDirectiveRegion(Builder);
DI->EmitStopPoint(Builder);
}
DI->setLocation(S->getLocEnd());
else
DI->setLocation(S->getLocStart());
- DI->UpdateLineDirectiveRegion(Builder);
DI->EmitStopPoint(Builder);
}
}