summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-07-10 21:28:54 +0000
committerEric Christopher <echristo@gmail.com>2017-07-10 21:28:54 +0000
commit50daf5fbbb9d6ef03fdf6af44c71e2c7ee4a2edf (patch)
treee0501cc791f5c5d97e5782af149553e9836a2dfb /clang/lib/AST/ASTContext.cpp
parentba5b8c8ee77e7b2c2d05c04a36d15a9b5182e314 (diff)
downloadbcm5719-llvm-50daf5fbbb9d6ef03fdf6af44c71e2c7ee4a2edf.tar.gz
bcm5719-llvm-50daf5fbbb9d6ef03fdf6af44c71e2c7ee4a2edf.zip
IsSpecialLong was only ever set in release mode as all of the uses are in asserts. Wrap in ifndef NDEBUG.
llvm-svn: 307594
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index a2ff176df11..fd9723298fc 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud