[llvm-commits] [llvm] r48268 - /llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Mar 11 17:49:19 PDT 2008
Author: asl
Date: Tue Mar 11 19:49:19 2008
New Revision: 48268
URL: http://llvm.org/viewvc/llvm-project?rev=48268&view=rev
Log:
Be backward compatible
Modified:
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=48268&r1=48267&r2=48268&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue Mar 11 19:49:19 2008
@@ -1075,6 +1075,7 @@
FunctionsWithBodies.push_back(Func);
break;
}
+ // ALIAS: [alias type, aliasee val#, linkage]
// ALIAS: [alias type, aliasee val#, linkage, visibility]
case bitc::MODULE_CODE_ALIAS: {
if (Record.size() < 3)
@@ -1085,7 +1086,9 @@
GlobalAlias *NewGA = new GlobalAlias(Ty, GetDecodedLinkage(Record[2]),
"", 0, TheModule);
- NewGA->setVisibility(GetDecodedVisibility(Record[3]));
+ // Old bitcode files didn't have visibility field.
+ if (Record.size() > 3)
+ NewGA->setVisibility(GetDecodedVisibility(Record[3]));
ValueList.push_back(NewGA);
AliasInits.push_back(std::make_pair(NewGA, Record[1]));
break;
More information about the llvm-commits
mailing list