diff options
author | Eric Christopher <echristo@apple.com> | 2011-10-11 23:00:45 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-10-11 23:00:45 +0000 |
commit | fb4cd4082c854d3904caefb10032ca666279960f (patch) | |
tree | 100b50136e17a28c0307b962bbad1055daaa91a0 /clang/lib | |
parent | 6647b830872363979f7e946cb5d7642b4a95d3d8 (diff) | |
download | bcm5719-llvm-fb4cd4082c854d3904caefb10032ca666279960f.tar.gz bcm5719-llvm-fb4cd4082c854d3904caefb10032ca666279960f.zip |
Reorder this to make it easier to add more changes for a location set.
llvm-svn: 141730
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 313c02dc6fd..962a59861f3 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -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. |