]> granicus.if.org Git - clang/commitdiff
IsSpecialLong was only ever set in release mode as all of the uses are in asserts...
authorEric Christopher <echristo@gmail.com>
Mon, 10 Jul 2017 21:28:54 +0000 (21:28 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 10 Jul 2017 21:28:54 +0000 (21:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307594 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index a2ff176df11f99cd4f7b429f81dfaad9bc367e25..fd9723298fca96db29e2e03bbbdeea3a87fb4bcc 100644 (file)
@@ -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");