mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-21 01:25:20 +00:00
move check to the right place :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6dbfd7bfbc
commit
e84bcb922d
@ -322,8 +322,11 @@ bool BitcodeReader::ParseModule(BitstreamReader &Stream,
|
|||||||
// Read all the records for this module.
|
// Read all the records for this module.
|
||||||
while (!Stream.AtEndOfStream()) {
|
while (!Stream.AtEndOfStream()) {
|
||||||
unsigned Code = Stream.ReadCode();
|
unsigned Code = Stream.ReadCode();
|
||||||
if (Code == bitc::END_BLOCK)
|
if (Code == bitc::END_BLOCK) {
|
||||||
|
if (!GlobalInits.empty())
|
||||||
|
return Error("Malformed global initializer set");
|
||||||
return Stream.ReadBlockEnd();
|
return Stream.ReadBlockEnd();
|
||||||
|
}
|
||||||
|
|
||||||
if (Code == bitc::ENTER_SUBBLOCK) {
|
if (Code == bitc::ENTER_SUBBLOCK) {
|
||||||
switch (Stream.ReadSubBlockID()) {
|
switch (Stream.ReadSubBlockID()) {
|
||||||
@ -358,8 +361,6 @@ bool BitcodeReader::ParseModule(BitstreamReader &Stream,
|
|||||||
case bitc::MODULE_CODE_VERSION: // VERSION: [version#]
|
case bitc::MODULE_CODE_VERSION: // VERSION: [version#]
|
||||||
if (Record.size() < 1)
|
if (Record.size() < 1)
|
||||||
return Error("Malformed MODULE_CODE_VERSION");
|
return Error("Malformed MODULE_CODE_VERSION");
|
||||||
if (!GlobalInits.empty())
|
|
||||||
return Error("Malformed global initializer set");
|
|
||||||
// Only version #0 is supported so far.
|
// Only version #0 is supported so far.
|
||||||
if (Record[0] != 0)
|
if (Record[0] != 0)
|
||||||
return Error("Unknown bitstream version!");
|
return Error("Unknown bitstream version!");
|
||||||
|
Loading…
Reference in New Issue
Block a user