diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-20 21:25:00 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-20 21:25:00 +0000 |
commit | 77ce46d769b581b8a6ddb0d58231b8be9a8a6026 (patch) | |
tree | a72393a0f8e7d2d7e33bfdb7d63fa43cacd7fe49 /lib | |
parent | 61ab80a8b35e6fe9363e8ef1b3d27209b0e89349 (diff) |
[analyzer] Refactor PathDiagnosticLocation: Use the pre-computed Range and Location for profile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index b8a811a6e1..211c128470 100644 --- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -351,22 +351,9 @@ void PathDiagnosticLocation::flatten() { //===----------------------------------------------------------------------===// void PathDiagnosticLocation::Profile(llvm::FoldingSetNodeID &ID) const { - ID.AddInteger((unsigned) K); - switch (K) { - case RangeK: - ID.AddInteger(R.getBegin().getRawEncoding()); - ID.AddInteger(R.getEnd().getRawEncoding()); - break; - case SingleLocK: - ID.AddInteger(R.getBegin().getRawEncoding()); - break; - case StmtK: - ID.Add(S); - break; - case DeclK: - ID.Add(D); - break; - } + ID.AddInteger(Range.getBegin().getRawEncoding()); + ID.AddInteger(Range.getEnd().getRawEncoding()); + ID.AddInteger(Loc.getRawEncoding()); return; } |