DI: Require subprogram definitions to be distinct
[oota-llvm.git] / lib / Bitcode / Reader / BitcodeReader.cpp
index 5cedfe86c1ba4090f62019b24d96213c0465582a..cf72b0ce79191e709d6160fda9a6e15c0e9c06cc 100644 (file)
@@ -1950,7 +1950,8 @@ std::error_code BitcodeReader::parseMetadata() {
 
       MDValueList.assignValue(
           GET_OR_DISTINCT(
-              DISubprogram, Record[0],
+              DISubprogram,
+              Record[0] || Record[8], // All definitions should be distinct.
               (Context, getMDOrNull(Record[1]), getMDString(Record[2]),
                getMDString(Record[3]), getMDOrNull(Record[4]), Record[5],
                getMDOrNull(Record[6]), Record[7], Record[8], Record[9],