diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-16 03:41:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-16 03:41:37 +0000 |
commit | e4f753233b1e69a22af00468d41ed2b56a844f96 (patch) | |
tree | bb4edc905d43934a5f5855e01d2c1d9129381321 /clang | |
parent | 169fd709998b073b513bf5168887b5668c319b1f (diff) | |
download | bcm5719-llvm-e4f753233b1e69a22af00468d41ed2b56a844f96.tar.gz bcm5719-llvm-e4f753233b1e69a22af00468d41ed2b56a844f96.zip |
switch DiagMappings *back* to 4 bits per diag.
llvm-svn: 69260
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Basic/Diagnostic.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h index 7d2dc689de4..6ac2494d072 100644 --- a/clang/include/clang/Basic/Diagnostic.h +++ b/clang/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; } |