diff options
author | Eric Christopher <echristo@gmail.com> | 2017-07-10 21:28:54 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2017-07-10 21:28:54 +0000 |
commit | dc3817f04345e25d8b14db950d9d3d46d792f292 (patch) | |
tree | 923bdc2e2f98ab62acbb183136e540f2abc18d7f | |
parent | de68633e049386d03aa6c96f75b978f8dc794b5f (diff) |
IsSpecialLong was only ever set in release mode as all of the uses are in asserts. Wrap in ifndef NDEBUG.linaro-local/diana.picus/Check307590revert2linaro-local/diana.picus/Check307590revertlinaro-local/diana.picus/Check307590
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307594 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/ASTContext.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index a2ff176df1..fd9723298f 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -8523,7 +8523,10 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, RequiresICE = false; // Read the prefixed modifiers first. - bool Done = false, IsSpecialLong = false; + bool Done = false; + #ifndef NDEBUG + bool IsSpecialLong = false; + #endif while (!Done) { switch (*Str++) { default: Done = true; --Str; break; @@ -8549,7 +8552,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, // 'N' behaves like 'L' for all non LP64 targets and 'int' otherwise. assert(!IsSpecialLong && "Can't use two 'N' or 'W' modifiers!"); assert(HowLong == 0 && "Can't use both 'L' and 'N' modifiers!"); + #ifndef NDEBUG IsSpecialLong = true; + #endif if (Context.getTargetInfo().getLongWidth() == 32) ++HowLong; break; @@ -8558,7 +8563,9 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, // This modifier represents int64 type. assert(!IsSpecialLong && "Can't use two 'N' or 'W' modifiers!"); assert(HowLong == 0 && "Can't use both 'L' and 'W' modifiers!"); + #ifndef NDEBUG IsSpecialLong = true; + #endif switch (Context.getTargetInfo().getInt64Type()) { default: llvm_unreachable("Unexpected integer type"); |