aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-16 01:00:30 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-16 01:00:30 +0000
commit03c6d31a3b308afb2c6a4c506002c88c48c9d58d (patch)
tree755debe0ba8d4df68b9f524f8f689e15b4ec1a4f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent6f1daa4660edb7f401c67b3e23d213bce103bca9 (diff)
downloadllvm-03c6d31a3b308afb2c6a4c506002c88c48c9d58d.zip
llvm-03c6d31a3b308afb2c6a4c506002c88c48c9d58d.tar.gz
llvm-03c6d31a3b308afb2c6a4c506002c88c48c9d58d.tar.bz2
Revert "[IR] Remove the DIExpression field from DIGlobalVariable."
This reverts commit 289902 while investigating bot berakage. llvm-svn: 289906
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 2905a98..cff2fd0 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -210,9 +210,6 @@ private:
SmallVectorImpl<uint64_t> &Record, unsigned Abbrev);
void writeDIExpression(const DIExpression *N,
SmallVectorImpl<uint64_t> &Record, unsigned Abbrev);
- void writeDIGlobalVariableExpression(const DIGlobalVariableExpression *N,
- SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev);
void writeDIObjCProperty(const DIObjCProperty *N,
SmallVectorImpl<uint64_t> &Record, unsigned Abbrev);
void writeDIImportedEntity(const DIImportedEntity *N,
@@ -1686,7 +1683,7 @@ void ModuleBitcodeWriter::writeDIGlobalVariable(
Record.push_back(VE.getMetadataOrNullID(N->getType()));
Record.push_back(N->isLocalToUnit());
Record.push_back(N->isDefinition());
- Record.push_back(/* expr */ 0);
+ Record.push_back(VE.getMetadataOrNullID(N->getRawExpr()));
Record.push_back(VE.getMetadataOrNullID(N->getStaticDataMemberDeclaration()));
Record.push_back(N->getAlignInBits());
@@ -1738,17 +1735,6 @@ void ModuleBitcodeWriter::writeDIExpression(const DIExpression *N,
Record.clear();
}
-void ModuleBitcodeWriter::writeDIGlobalVariableExpression(
- const DIGlobalVariableExpression *N, SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev) {
- Record.push_back(N->isDistinct());
- Record.push_back(VE.getMetadataOrNullID(N->getVariable()));
- Record.push_back(VE.getMetadataOrNullID(N->getExpression()));
-
- Stream.EmitRecord(bitc::METADATA_GLOBAL_VAR_EXPR, Record, Abbrev);
- Record.clear();
-}
-
void ModuleBitcodeWriter::writeDIObjCProperty(const DIObjCProperty *N,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {