Merge pull request #1594 from KhronosGroup/fix-1591

Fix pathological complexity explosion for certain shaders.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de7affc..6c11208 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2016-2020 Google Inc.
+# Copyright 2016-2021 Google Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/main.cpp b/main.cpp
index 2d50e1b..2b99022 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cfg.cpp b/spirv_cfg.cpp
index fa9f3d1..0a66d60 100644
--- a/spirv_cfg.cpp
+++ b/spirv_cfg.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 Arm Limited
+ * Copyright 2016-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cfg.hpp b/spirv_cfg.hpp
index b545993..041526d 100644
--- a/spirv_cfg.hpp
+++ b/spirv_cfg.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 Arm Limited
+ * Copyright 2016-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_common.hpp b/spirv_common.hpp
index 8e3b137..128c416 100644
--- a/spirv_common.hpp
+++ b/spirv_common.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cpp.cpp b/spirv_cpp.cpp
index 4920443..e95fe00 100644
--- a/spirv_cpp.cpp
+++ b/spirv_cpp.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cpp.hpp b/spirv_cpp.hpp
index 6866240..a3bf0ed 100644
--- a/spirv_cpp.hpp
+++ b/spirv_cpp.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross.cpp b/spirv_cross.cpp
index 991bf91..199d0fd 100644
--- a/spirv_cross.cpp
+++ b/spirv_cross.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross.hpp b/spirv_cross.hpp
index 016d13e..c29ce6b 100644
--- a/spirv_cross.hpp
+++ b/spirv_cross.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_c.cpp b/spirv_cross_c.cpp
index a3a3021..a542346 100644
--- a/spirv_cross_c.cpp
+++ b/spirv_cross_c.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2019-2020 Hans-Kristian Arntzen
+ * Copyright 2019-2021 Hans-Kristian Arntzen
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_c.h b/spirv_cross_c.h
index 62d91c1..811bb8c 100644
--- a/spirv_cross_c.h
+++ b/spirv_cross_c.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2019-2020 Hans-Kristian Arntzen
+ * Copyright 2019-2021 Hans-Kristian Arntzen
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_containers.hpp b/spirv_cross_containers.hpp
index c68f670..b9c3737 100644
--- a/spirv_cross_containers.hpp
+++ b/spirv_cross_containers.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2019-2020 Hans-Kristian Arntzen
+ * Copyright 2019-2021 Hans-Kristian Arntzen
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_error_handling.hpp b/spirv_cross_error_handling.hpp
index c0927e4..32af107 100644
--- a/spirv_cross_error_handling.hpp
+++ b/spirv_cross_error_handling.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_parsed_ir.cpp b/spirv_cross_parsed_ir.cpp
index a9ade42..e1a13c5 100644
--- a/spirv_cross_parsed_ir.cpp
+++ b/spirv_cross_parsed_ir.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Arm Limited
+ * Copyright 2018-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_parsed_ir.hpp b/spirv_cross_parsed_ir.hpp
index ca37a9b..88a0691 100644
--- a/spirv_cross_parsed_ir.hpp
+++ b/spirv_cross_parsed_ir.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Arm Limited
+ * Copyright 2018-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_util.cpp b/spirv_cross_util.cpp
index f9b5c5f..9ce6d4f 100644
--- a/spirv_cross_util.cpp
+++ b/spirv_cross_util.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_cross_util.hpp b/spirv_cross_util.hpp
index b0501f3..daa4a79 100644
--- a/spirv_cross_util.hpp
+++ b/spirv_cross_util.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp
index 7a74071..0b93413 100644
--- a/spirv_glsl.cpp
+++ b/spirv_glsl.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_glsl.hpp b/spirv_glsl.hpp
index a32edc0..beb8a8f 100644
--- a/spirv_glsl.hpp
+++ b/spirv_glsl.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2020 Arm Limited
+ * Copyright 2015-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp
index 24eae99..c080ff6 100644
--- a/spirv_hlsl.cpp
+++ b/spirv_hlsl.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 Robert Konrad
+ * Copyright 2016-2021 Robert Konrad
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_hlsl.hpp b/spirv_hlsl.hpp
index 4b481dd..f46b186 100644
--- a/spirv_hlsl.hpp
+++ b/spirv_hlsl.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 Robert Konrad
+ * Copyright 2016-2021 Robert Konrad
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_msl.cpp b/spirv_msl.cpp
index a669457..3d60d38 100644
--- a/spirv_msl.cpp
+++ b/spirv_msl.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 The Brenwill Workshop Ltd.
+ * Copyright 2016-2021 The Brenwill Workshop Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_msl.hpp b/spirv_msl.hpp
index 8c78612..0cce958 100644
--- a/spirv_msl.hpp
+++ b/spirv_msl.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2020 The Brenwill Workshop Ltd.
+ * Copyright 2016-2021 The Brenwill Workshop Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_parser.cpp b/spirv_parser.cpp
index eff50dd..7159a32 100644
--- a/spirv_parser.cpp
+++ b/spirv_parser.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Arm Limited
+ * Copyright 2018-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_parser.hpp b/spirv_parser.hpp
index 190266a..7f4a7d8 100644
--- a/spirv_parser.hpp
+++ b/spirv_parser.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Arm Limited
+ * Copyright 2018-2021 Arm Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_reflect.cpp b/spirv_reflect.cpp
index 90dc62b..447bff1 100644
--- a/spirv_reflect.cpp
+++ b/spirv_reflect.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Bradley Austin Davis
+ * Copyright 2018-2021 Bradley Austin Davis
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/spirv_reflect.hpp b/spirv_reflect.hpp
index d82c0de..8acbd28 100644
--- a/spirv_reflect.hpp
+++ b/spirv_reflect.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018-2020 Bradley Austin Davis
+ * Copyright 2018-2021 Bradley Austin Davis
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/test_shaders.py b/test_shaders.py
index b302bc9..2643b09 100755
--- a/test_shaders.py
+++ b/test_shaders.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-# Copyright 2015-2020 Arm Limited
+# Copyright 2015-2021 Arm Limited
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/tests-other/small_vector.cpp b/tests-other/small_vector.cpp
index 9a3ab79..e9a3bb0 100644
--- a/tests-other/small_vector.cpp
+++ b/tests-other/small_vector.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2019-2020 Hans-Kristian Arntzen
+ * Copyright 2019-2021 Hans-Kristian Arntzen
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.