Use address-taken to disambiguate global variable and indirect memops.
[oota-llvm.git] / lib / Bitcode / Reader / BitcodeReader.cpp
index e408cd1f981ef1e9605751ddcbb18fe8334df3b3..3fca4ab8e0ddb0d2a3a15930fb98b69bbfde0afc 100644 (file)
@@ -1848,6 +1848,9 @@ bool BitcodeReader::ParseModule(bool Resume) {
         new GlobalVariable(*TheModule, Ty, isConstant, Linkage, 0, "", 0,
                            TLM, AddressSpace, ExternallyInitialized);
       NewGV->setAlignment(Alignment);
+      if (Record.size() > 10)
+        NewGV->setAddressMaybeTaken(Record[10]);
+
       if (!Section.empty())
         NewGV->setSection(Section);
       NewGV->setVisibility(Visibility);