Reorder functions in the file.

llvm-svn: 140738
This commit is contained in:
Eric Christopher 2011-09-29 00:00:37 +00:00
parent e655657c94
commit 4fd315ffbd
1 changed files with 51 additions and 52 deletions

View File

@ -1751,33 +1751,8 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType,
LineDirectiveFiles.clear();
}
void CGDebugInfo::EmitStopPoint(CGBuilderTy &Builder) {
if (CurLoc.isInvalid() || CurLoc.isMacroID()) return;
// Don't bother if things are the same as last time.
SourceManager &SM = CGM.getContext().getSourceManager();
if (CurLoc == PrevLoc ||
SM.getExpansionLoc(CurLoc) == SM.getExpansionLoc(PrevLoc))
// New Builder may not be in sync with CGDebugInfo.
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::MDNode *Scope = RegionStack.back();
Builder.SetCurrentDebugLocation(llvm::DebugLoc::get(getLineNumber(CurLoc),
getColumnNumber(CurLoc),
Scope));
}
/// UpdateLineDirectiveRegion - Update region stack only if #line directive
/// has introduced scope change.
// UpdateLineDirectiveRegion - Update region stack only if #line directive
// has introduced scope change.
void CGDebugInfo::UpdateLineDirectiveRegion(CGBuilderTy &Builder) {
if (CurLoc.isInvalid() || CurLoc.isMacroID() ||
PrevLoc.isInvalid() || PrevLoc.isMacroID())
@ -1828,6 +1803,30 @@ void CGDebugInfo::UpdateLineDirectiveRegion(CGBuilderTy &Builder) {
return;
}
void CGDebugInfo::EmitStopPoint(CGBuilderTy &Builder) {
if (CurLoc.isInvalid() || CurLoc.isMacroID()) return;
// Don't bother if things are the same as last time.
SourceManager &SM = CGM.getContext().getSourceManager();
if (CurLoc == PrevLoc ||
SM.getExpansionLoc(CurLoc) == SM.getExpansionLoc(PrevLoc))
// New Builder may not be in sync with CGDebugInfo.
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::MDNode *Scope = RegionStack.back();
Builder.SetCurrentDebugLocation(llvm::DebugLoc::get(getLineNumber(CurLoc),
getColumnNumber(CurLoc),
Scope));
}
/// EmitRegionStart- Constructs the debug code for entering a declarative
/// region - beginning of a DW_TAG_lexical_block.
void CGDebugInfo::EmitRegionStart(CGBuilderTy &Builder) {