Reorder this to make it easier to add more changes for a location set.

llvm-svn: 141730
This commit is contained in:
Eric Christopher 2011-10-11 23:00:45 +00:00
parent 6647b83087
commit fb4cd4082c
1 changed files with 4 additions and 2 deletions

View File

@ -50,8 +50,10 @@ CGDebugInfo::~CGDebugInfo() {
}
void CGDebugInfo::setLocation(SourceLocation Loc) {
if (Loc.isValid())
CurLoc = CGM.getContext().getSourceManager().getExpansionLoc(Loc);
// If the new location isn't valid return.
if (!Loc.isValid()) return;
CurLoc = CGM.getContext().getSourceManager().getExpansionLoc(Loc);
}
/// getContextDescriptor - Get context info for the decl.