fix off-by-one that caused the llvm2cpp test to fail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-05-06 19:27:46 +00:00
parent 51eeb6e536
commit 5f32c01dea

View File

@ -964,9 +964,11 @@ bool BitcodeReader::ParseModule(const std::string &ModuleID) {
Section = SectionTable[Record[5]-1];
}
GlobalValue::VisibilityTypes Visibility = GlobalValue::DefaultVisibility;
if (Record.size() >= 6) Visibility = GetDecodedVisibility(Record[6]);
if (Record.size() > 6)
Visibility = GetDecodedVisibility(Record[6]);
bool isThreadLocal = false;
if (Record.size() >= 7) isThreadLocal = Record[7];
if (Record.size() > 7)
isThreadLocal = Record[7];
GlobalVariable *NewGV =
new GlobalVariable(Ty, isConstant, Linkage, 0, "", TheModule);