Index: src/PNaClTranslator.cpp |
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp |
index 3380c9ea29e96de3cf26853b82db81407260bb7c..02bbc661ae81524e37a003fbfd26b2c79e572594 100644 |
--- a/src/PNaClTranslator.cpp |
+++ b/src/PNaClTranslator.cpp |
@@ -3158,6 +3158,12 @@ bool ModuleParser::ParseBlock(unsigned BlockID) { |
if (FoundValuesymtab) |
Fatal("Duplicate valuesymtab in module"); |
+ // If we have already processed a function block (i.e. we have already |
Jim Stichnoth
2015/09/22 20:06:06
single space after i.e.
Karl
2015/09/22 20:15:15
Done.
|
+ // installed global names and variable initializers) we can no longer accept |
+ // the value symbol table. Names have already been generated. |
+ if (GlobalDeclarationNamesAndInitializersInstalled) |
+ Fatal("Module valuesymtab not allowed after function blocks"); |
+ |
FoundValuesymtab = true; |
ModuleValuesymtabParser Parser(BlockID, this); |
return Parser.ParseThisBlock(); |