summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:35:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:35:40 +0000
commitc8f810a017b7ae75760c36dcd5b669d831bf900f (patch)
treeff66edc5388c059bfc9312dcc36b5b7ce2b378dc /llvm/lib/Bitcode/Reader
parent2847f3805ebeeb7787323b2b3a6aafa44022a908 (diff)
downloadbcm5719-llvm-c8f810a017b7ae75760c36dcd5b669d831bf900f.tar.gz
bcm5719-llvm-c8f810a017b7ae75760c36dcd5b669d831bf900f.zip
AsmWriter/Bitcode: MDGlobalVariable
llvm-svn: 229020
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 9731e8c0e03..56855ebb81b 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1525,6 +1525,20 @@ std::error_code BitcodeReader::ParseMetadata() {
NextMDValueNo++);
break;
}
+ case bitc::METADATA_GLOBAL_VAR: {
+ if (Record.size() != 11)
+ return Error("Invalid record");
+
+ MDValueList.AssignValue(
+ GET_OR_DISTINCT(MDGlobalVariable, Record[0],
+ (Context, getMDOrNull(Record[1]),
+ getMDString(Record[2]), getMDString(Record[3]),
+ getMDOrNull(Record[4]), Record[5],
+ getMDOrNull(Record[6]), Record[7], Record[8],
+ getMDOrNull(Record[9]), getMDOrNull(Record[10]))),
+ NextMDValueNo++);
+ break;
+ }
case bitc::METADATA_STRING: {
std::string String(Record.begin(), Record.end());
llvm::UpgradeMDStringConstant(String);
OpenPOWER on IntegriCloud