aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-16 03:41:37 +0000
committerChris Lattner <sabre@nondot.org>2009-04-16 03:41:37 +0000
commite29cc89f82261ad899791f47d1c1d9ef91e172b6 (patch)
tree0c48af675448bceda957b6510764fde15428ffbd
parent6ac9ffc9f0c07671211484385ab00e4337f27895 (diff)
switch DiagMappings *back* to 4 bits per diag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69260 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/Diagnostic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 7d2dc689de..6ac2494d07 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -155,7 +155,7 @@ private:
/// DiagMappings - Mapping information for diagnostics. Mapping info is
/// packed into two bits per diagnostic.
- unsigned char DiagMappings[diag::DIAG_UPPER_LIMIT/4];
+ unsigned char DiagMappings[diag::DIAG_UPPER_LIMIT/2];
/// ErrorOccurred / FatalErrorOccurred - This is set to true when an error or
/// fatal error is emitted, and is sticky.
@@ -231,7 +231,7 @@ public:
/// getDiagnosticMapping - Return the mapping currently set for the specified
/// diagnostic.
diag::Mapping getDiagnosticMapping(diag::kind Diag) const {
- return (diag::Mapping)((DiagMappings[Diag/4] >> (Diag & 3)*2) & 3);
+ return (diag::Mapping)((DiagMappings[Diag/2] >> (Diag & 1)*4) & 7);
}
bool hasErrorOccurred() const { return ErrorOccurred; }
@@ -302,9 +302,9 @@ public:
private:
void setDiagnosticMappingInternal(unsigned Diag, unsigned Map) {
- unsigned char &Slot = DiagMappings[Diag/4];
- unsigned Bits = (Diag & 3)*2;
- Slot &= ~(3 << Bits);
+ unsigned char &Slot = DiagMappings[Diag/2];
+ unsigned Bits = (Diag & 1)*4;
+ Slot &= ~(7 << Bits);
Slot |= Map << Bits;
}