Index: include/llvm/IR/DebugInfoMetadata.h =================================================================== --- include/llvm/IR/DebugInfoMetadata.h +++ include/llvm/IR/DebugInfoMetadata.h @@ -959,25 +959,21 @@ StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, unsigned EmissionKind, DICompositeTypeArray EnumTypes, - DITypeArray RetainedTypes, DISubprogramArray Subprograms, - DIGlobalVariableArray GlobalVariables, + DITypeArray RetainedTypes, DIGlobalVariableArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId, StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, SourceLanguage, File, - getCanonicalMDString(Context, Producer), IsOptimized, - getCanonicalMDString(Context, Flags), RuntimeVersion, - getCanonicalMDString(Context, SplitDebugFilename), - EmissionKind, EnumTypes.get(), RetainedTypes.get(), - Subprograms.get(), GlobalVariables.get(), - ImportedEntities.get(), Macros.get(), DWOId, Storage, - ShouldCreate); + return getImpl( + Context, SourceLanguage, File, getCanonicalMDString(Context, Producer), + IsOptimized, getCanonicalMDString(Context, Flags), RuntimeVersion, + getCanonicalMDString(Context, SplitDebugFilename), EmissionKind, + EnumTypes.get(), RetainedTypes.get(), GlobalVariables.get(), + ImportedEntities.get(), Macros.get(), DWOId, Storage, ShouldCreate); } static DICompileUnit * getImpl(LLVMContext &Context, unsigned SourceLanguage, Metadata *File, MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, - unsigned EmissionKind, Metadata *EnumTypes, - Metadata *RetainedTypes, Metadata *Subprograms, + unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId, StorageType Storage, bool ShouldCreate = true); @@ -986,7 +982,7 @@ return getTemporary( getContext(), getSourceLanguage(), getFile(), getProducer(), isOptimized(), getFlags(), getRuntimeVersion(), getSplitDebugFilename(), - getEmissionKind(), getEnumTypes(), getRetainedTypes(), getSubprograms(), + getEmissionKind(), getEnumTypes(), getRetainedTypes(), getGlobalVariables(), getImportedEntities(), getMacros(), DWOId); } @@ -1000,22 +996,21 @@ bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, DebugEmissionKind EmissionKind, DICompositeTypeArray EnumTypes, DITypeArray RetainedTypes, - DISubprogramArray Subprograms, DIGlobalVariableArray GlobalVariables, + DIGlobalVariableArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId), (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, - SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, Subprograms, + SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId)) DEFINE_MDNODE_GET_DISTINCT_TEMPORARY( DICompileUnit, (unsigned SourceLanguage, Metadata *File, MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, - Metadata *RetainedTypes, Metadata *Subprograms, - Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, - uint64_t DWOId), + Metadata *RetainedTypes, Metadata *GlobalVariables, + Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId), (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, - SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, Subprograms, + SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId)) TempDICompileUnit clone() const { return cloneImpl(); } @@ -1035,9 +1030,6 @@ DITypeArray getRetainedTypes() const { return cast_or_null(getRawRetainedTypes()); } - DISubprogramArray getSubprograms() const { - return cast_or_null(getRawSubprograms()); - } DIGlobalVariableArray getGlobalVariables() const { return cast_or_null(getRawGlobalVariables()); } @@ -1057,10 +1049,9 @@ } Metadata *getRawEnumTypes() const { return getOperand(4); } Metadata *getRawRetainedTypes() const { return getOperand(5); } - Metadata *getRawSubprograms() const { return getOperand(6); } - Metadata *getRawGlobalVariables() const { return getOperand(7); } - Metadata *getRawImportedEntities() const { return getOperand(8); } - Metadata *getRawMacros() const { return getOperand(9); } + Metadata *getRawGlobalVariables() const { return getOperand(6); } + Metadata *getRawImportedEntities() const { return getOperand(7); } + Metadata *getRawMacros() const { return getOperand(8); } /// \brief Replace arrays. /// @@ -1074,16 +1065,13 @@ void replaceRetainedTypes(DITypeArray N) { replaceOperandWith(5, N.get()); } - void replaceSubprograms(DISubprogramArray N) { - replaceOperandWith(6, N.get()); - } void replaceGlobalVariables(DIGlobalVariableArray N) { - replaceOperandWith(7, N.get()); + replaceOperandWith(6, N.get()); } void replaceImportedEntities(DIImportedEntityArray N) { - replaceOperandWith(8, N.get()); + replaceOperandWith(7, N.get()); } - void replaceMacros(DIMacroNodeArray N) { replaceOperandWith(9, N.get()); } + void replaceMacros(DIMacroNodeArray N) { replaceOperandWith(8, N.get()); } /// @} static bool classof(const Metadata *MD) { @@ -1253,13 +1241,13 @@ DISubroutineType *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, DITypeRef ContainingType, unsigned Virtuality, unsigned VirtualIndex, unsigned Flags, bool IsOptimized, - DITemplateParameterArray TemplateParams, DISubprogram *Declaration, - DILocalVariableArray Variables, StorageType Storage, - bool ShouldCreate = true) { + DICompileUnit *Unit, DITemplateParameterArray TemplateParams, + DISubprogram *Declaration, DILocalVariableArray Variables, + StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, LinkageName), File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, - Virtuality, VirtualIndex, Flags, IsOptimized, + Virtuality, VirtualIndex, Flags, IsOptimized, Unit, TemplateParams.get(), Declaration, Variables.get(), Storage, ShouldCreate); } @@ -1268,16 +1256,17 @@ MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, - unsigned Flags, bool IsOptimized, Metadata *TemplateParams, - Metadata *Declaration, Metadata *Variables, StorageType Storage, - bool ShouldCreate = true); + unsigned Flags, bool IsOptimized, Metadata *Unit, + Metadata *TemplateParams, Metadata *Declaration, Metadata *Variables, + StorageType Storage, bool ShouldCreate = true); TempDISubprogram cloneImpl() const { - return getTemporary( - getContext(), getScope(), getName(), getLinkageName(), getFile(), - getLine(), getType(), isLocalToUnit(), isDefinition(), getScopeLine(), - getContainingType(), getVirtuality(), getVirtualIndex(), getFlags(), - isOptimized(), getTemplateParams(), getDeclaration(), getVariables()); + return getTemporary(getContext(), getScope(), getName(), getLinkageName(), + getFile(), getLine(), getType(), isLocalToUnit(), + isDefinition(), getScopeLine(), getContainingType(), + getVirtuality(), getVirtualIndex(), getFlags(), + isOptimized(), getUnit(), getTemplateParams(), + getDeclaration(), getVariables()); } public: @@ -1287,12 +1276,13 @@ bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, DITypeRef ContainingType, unsigned Virtuality, unsigned VirtualIndex, unsigned Flags, bool IsOptimized, + DICompileUnit *Unit, DITemplateParameterArray TemplateParams = nullptr, DISubprogram *Declaration = nullptr, DILocalVariableArray Variables = nullptr), (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, TemplateParams, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)) DEFINE_MDNODE_GET( DISubprogram, @@ -1300,11 +1290,11 @@ unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, unsigned Flags, bool IsOptimized, - Metadata *TemplateParams = nullptr, Metadata *Declaration = nullptr, - Metadata *Variables = nullptr), + Metadata *Unit, Metadata *TemplateParams = nullptr, + Metadata *Declaration = nullptr, Metadata *Variables = nullptr), (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, Flags, IsOptimized, - TemplateParams, Declaration, Variables)) + Unit, TemplateParams, Declaration, Variables)) TempDISubprogram clone() const { return cloneImpl(); } @@ -1363,6 +1353,12 @@ return DITypeRef(getRawContainingType()); } + DICompileUnit *getUnit() const { + return cast_or_null(getRawUnit()); + } + void replaceUnit(DICompileUnit *CU) { + replaceOperandWith(7, CU); + } DITemplateParameterArray getTemplateParams() const { return cast_or_null(getRawTemplateParams()); } @@ -1376,9 +1372,10 @@ Metadata *getRawScope() const { return getOperand(1); } Metadata *getRawType() const { return getOperand(5); } Metadata *getRawContainingType() const { return getOperand(6); } - Metadata *getRawTemplateParams() const { return getOperand(7); } - Metadata *getRawDeclaration() const { return getOperand(8); } - Metadata *getRawVariables() const { return getOperand(9); } + Metadata *getRawUnit() const { return getOperand(7); } + Metadata *getRawTemplateParams() const { return getOperand(8); } + Metadata *getRawDeclaration() const { return getOperand(9); } + Metadata *getRawVariables() const { return getOperand(10); } /// \brief Check if this subprogram describes the given function. /// Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp +++ lib/AsmParser/LLParser.cpp @@ -3875,8 +3875,7 @@ /// ::= !DICompileUnit(language: DW_LANG_C99, file: !0, producer: "clang", /// isOptimized: true, flags: "-O2", runtimeVersion: 1, /// splitDebugFilename: "abc.debug", -/// emissionKind: FullDebug, -/// enums: !1, retainedTypes: !2, subprograms: !3, +/// emissionKind: FullDebug, enums: !1, retainedTypes: !2, /// globals: !4, imports: !5, macros: !6, dwoId: 0x0abcd) bool LLParser::ParseDICompileUnit(MDNode *&Result, bool IsDistinct) { if (!IsDistinct) @@ -3893,7 +3892,6 @@ OPTIONAL(emissionKind, EmissionKindField, ); \ OPTIONAL(enums, MDField, ); \ OPTIONAL(retainedTypes, MDField, ); \ - OPTIONAL(subprograms, MDField, ); \ OPTIONAL(globals, MDField, ); \ OPTIONAL(imports, MDField, ); \ OPTIONAL(macros, MDField, ); \ @@ -3904,8 +3902,7 @@ Result = DICompileUnit::getDistinct( Context, language.Val, file.Val, producer.Val, isOptimized.Val, flags.Val, runtimeVersion.Val, splitDebugFilename.Val, emissionKind.Val, enums.Val, - retainedTypes.Val, subprograms.Val, globals.Val, imports.Val, macros.Val, - dwoId.Val); + retainedTypes.Val, globals.Val, imports.Val, macros.Val, dwoId.Val); return false; } @@ -3934,6 +3931,7 @@ OPTIONAL(virtualIndex, MDUnsignedField, (0, UINT32_MAX)); \ OPTIONAL(flags, DIFlagField, ); \ OPTIONAL(isOptimized, MDBoolField, ); \ + OPTIONAL(unit, MDField, ); \ OPTIONAL(templateParams, MDField, ); \ OPTIONAL(declaration, MDField, ); \ OPTIONAL(variables, MDField, ); @@ -3946,11 +3944,11 @@ "missing 'distinct', required for !DISubprogram when 'isDefinition'"); Result = GET_OR_DISTINCT( - DISubprogram, - (Context, scope.Val, name.Val, linkageName.Val, file.Val, line.Val, - type.Val, isLocal.Val, isDefinition.Val, scopeLine.Val, - containingType.Val, virtuality.Val, virtualIndex.Val, flags.Val, - isOptimized.Val, templateParams.Val, declaration.Val, variables.Val)); + DISubprogram, (Context, scope.Val, name.Val, linkageName.Val, file.Val, + line.Val, type.Val, isLocal.Val, isDefinition.Val, + scopeLine.Val, containingType.Val, virtuality.Val, + virtualIndex.Val, flags.Val, isOptimized.Val, unit.Val, + templateParams.Val, declaration.Val, variables.Val)); return false; } Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -1948,6 +1948,7 @@ if (Stream.EnterSubBlock(bitc::METADATA_BLOCK_ID)) return error("Invalid record"); + std::vector> CUSubprograms; SmallVector Record; auto getMD = [&](unsigned ID) -> Metadata * { @@ -1976,6 +1977,13 @@ case BitstreamEntry::Error: return error("Malformed block"); case BitstreamEntry::EndBlock: + // Upgrade old-style CU <-> SP pointers to point from SP to CU. + for (auto CU_SP : CUSubprograms) + if (auto *SPs = dyn_cast_or_null(CU_SP.second)) + for (auto &Op : SPs->operands()) + if (auto *SP = dyn_cast_or_null(Op)) + SP->replaceOperandWith(7, CU_SP.first); + MetadataList.tryToResolveCycles(); return std::error_code(); case BitstreamEntry::Record: @@ -2232,24 +2240,32 @@ // Ignore Record[0], which indicates whether this compile unit is // distinct. It's always distinct. - MetadataList.assignValue( - DICompileUnit::getDistinct( - Context, Record[1], getMDOrNull(Record[2]), - getMDString(Record[3]), Record[4], getMDString(Record[5]), - Record[6], getMDString(Record[7]), Record[8], - getMDOrNull(Record[9]), getMDOrNull(Record[10]), - getMDOrNull(Record[11]), getMDOrNull(Record[12]), - getMDOrNull(Record[13]), - Record.size() <= 15 ? nullptr : getMDOrNull(Record[15]), - Record.size() <= 14 ? 0 : Record[14]), - NextMetadataNo++); + auto *CU = DICompileUnit::getDistinct( + Context, Record[1], getMDOrNull(Record[2]), getMDString(Record[3]), + Record[4], getMDString(Record[5]), Record[6], getMDString(Record[7]), + Record[8], getMDOrNull(Record[9]), getMDOrNull(Record[10]), + getMDOrNull(Record[12]), getMDOrNull(Record[13]), + Record.size() <= 15 ? nullptr : getMDOrNull(Record[15]), + Record.size() <= 14 ? 0 : Record[14]); + + MetadataList.assignValue(CU, NextMetadataNo++); + + // Move the Upgrade the list of subprograms. + if (Metadata *SPs = getMDOrNull(Record[11])) + CUSubprograms.push_back({CU, SPs}); break; } case bitc::METADATA_SUBPROGRAM: { if (Record.size() != 18 && Record.size() != 19) return error("Invalid record"); - bool HasFn = Record.size() == 19; + // Version 1 has a Function as Record[15]. + // Version 2 has removed Record[15]. + // Version 3 has the Unit as Record[15]. + Metadata *CUorFn = getMDOrNull(Record[15]); + unsigned Offset = Record.size() == 19 ? 1 : 0; + bool HasFn = Offset && dyn_cast_or_null(CUorFn); + bool HasCU = Offset && !HasFn; DISubprogram *SP = GET_OR_DISTINCT( DISubprogram, Record[0] || Record[8], // All definitions should be distinct. @@ -2257,13 +2273,14 @@ getMDString(Record[3]), getMDOrNull(Record[4]), Record[5], getMDOrNull(Record[6]), Record[7], Record[8], Record[9], getMDOrNull(Record[10]), Record[11], Record[12], Record[13], - Record[14], getMDOrNull(Record[15 + HasFn]), - getMDOrNull(Record[16 + HasFn]), getMDOrNull(Record[17 + HasFn]))); + Record[14], HasCU ? CUorFn : nullptr, + getMDOrNull(Record[15 + Offset]), getMDOrNull(Record[16 + Offset]), + getMDOrNull(Record[17 + Offset]))); MetadataList.assignValue(SP, NextMetadataNo++); // Upgrade sp->function mapping to function->sp mapping. - if (HasFn && Record[15]) { - if (auto *CMD = dyn_cast(getMDOrNull(Record[15]))) + if (HasFn) { + if (auto *CMD = dyn_cast(CUorFn)) if (auto *F = dyn_cast(CMD->getValue())) { if (F->isMaterializable()) // Defer until materialized; unmaterialized functions may not have Index: lib/Bitcode/Writer/BitcodeWriter.cpp =================================================================== --- lib/Bitcode/Writer/BitcodeWriter.cpp +++ lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1098,7 +1098,7 @@ Record.push_back(N->getEmissionKind()); Record.push_back(VE.getMetadataOrNullID(N->getEnumTypes().get())); Record.push_back(VE.getMetadataOrNullID(N->getRetainedTypes().get())); - Record.push_back(VE.getMetadataOrNullID(N->getSubprograms().get())); + Record.push_back(/* subprograms */ 0); Record.push_back(VE.getMetadataOrNullID(N->getGlobalVariables().get())); Record.push_back(VE.getMetadataOrNullID(N->getImportedEntities().get())); Record.push_back(N->getDWOId()); @@ -1127,6 +1127,7 @@ Record.push_back(N->getVirtualIndex()); Record.push_back(N->getFlags()); Record.push_back(N->isOptimized()); + Record.push_back(VE.getMetadataOrNullID(N->getRawUnit())); Record.push_back(VE.getMetadataOrNullID(N->getTemplateParams().get())); Record.push_back(VE.getMetadataOrNullID(N->getDeclaration())); Record.push_back(VE.getMetadataOrNullID(N->getVariables().get())); Index: lib/CodeGen/AsmPrinter/DwarfDebug.h =================================================================== --- lib/CodeGen/AsmPrinter/DwarfDebug.h +++ lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -199,9 +199,6 @@ /// Maps MDNode with its corresponding DwarfCompileUnit. MapVector CUMap; - /// Maps subprogram MDNode with its corresponding DwarfCompileUnit. - MapVector SPMap; - /// Maps a CU DIE with its corresponding DwarfCompileUnit. DenseMap CUDieMap; Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -365,8 +365,8 @@ // Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram // was inlined from another compile unit. - auto &CU = SPMap[SP]; - forBothCUs(*CU, [&](DwarfCompileUnit &CU) { + auto &CU = *CUMap.lookup(cast(SP)->getUnit()); + forBothCUs(CU, [&](DwarfCompileUnit &CU) { CU.constructAbstractSubprogramScopeDIE(Scope); }); } @@ -483,8 +483,6 @@ CU.addImportedEntity(IE); for (auto *GV : CUNode->getGlobalVariables()) CU.getOrCreateGlobalVariableDIE(GV); - for (auto *SP : CUNode->getSubprograms()) - SPMap.insert(std::make_pair(SP, &CU)); for (auto *Ty : CUNode->getEnumTypes()) { // The enum types array by design contains pointers to // MDNodes rather than DIRefs. Unique them here. @@ -525,10 +523,19 @@ } void DwarfDebug::finishSubprogramDefinitions() { - for (const auto &P : SPMap) - if (ProcessedSPNodes.count(P.first)) - forBothCUs(*P.second, [&](DwarfCompileUnit &CU) { - CU.finishSubprogramDefinition(cast(P.first)); + for (auto &F : MMI->getModule()->functions()) + if (auto *SP = F.getSubprogram()) + if (ProcessedSPNodes.count(SP) && + SP->getUnit()->getEmissionKind() != DICompileUnit::NoDebug) + forBothCUs(*CUMap.lookup(SP->getUnit()), [&](DwarfCompileUnit &CU) { + CU.finishSubprogramDefinition(SP); + }); + for (auto *AbsScope : LScopes.getAbstractScopesList()) + if (auto *SP = dyn_cast(AbsScope->getScopeNode())) + if (ProcessedSPNodes.count(SP) && + SP->getUnit()->getEmissionKind() != DICompileUnit::NoDebug) + forBothCUs(*CUMap.lookup(SP->getUnit()), [&](DwarfCompileUnit &CU) { + CU.finishSubprogramDefinition(SP); }); } @@ -668,7 +675,6 @@ } // clean up. - SPMap.clear(); AbstractVariables.clear(); } @@ -1067,11 +1073,13 @@ // isn't structurally identical (see: file path/name info from clang, which // includes the directory of the cpp file being built, even when the file name // is absolute (such as an <> lookup header))) - DwarfCompileUnit *TheCU = SPMap.lookup(FnScope->getScopeNode()); - if (!TheCU) - // Once DISubprogram points to the owning CU, we can assert that the CU has - // a NoDebug EmissionKind here. + auto *SP = cast(FnScope->getScopeNode()); + DwarfCompileUnit *TheCU = CUMap.lookup(SP->getUnit()); + if (!TheCU) { + assert(SP->getUnit()->getEmissionKind() == DICompileUnit::NoDebug && + "DICompileUnit missing from llvm.dbg.cu?"); return; + } if (Asm->OutStreamer->hasRawTextSupport()) // Use a single line table if we are generating assembly. Asm->OutStreamer->getContext().setDwarfCompileUnitID(0); @@ -1093,11 +1101,9 @@ assert(CurFn == MF && "endFunction should be called with the same function as beginFunction"); - if (!MMI->hasDebugInfo() || LScopes.empty() || - !MF->getFunction()->getSubprogram() || - // Once DISubprogram points to the owning CU, we can check for a - // CU with a NoDebug EmissionKind here. - !SPMap.lookup(MF->getFunction()->getSubprogram())) { + const DISubprogram *SP = MF->getFunction()->getSubprogram(); + if (!MMI->hasDebugInfo() || LScopes.empty() || !SP || + SP->getUnit()->getEmissionKind() == DICompileUnit::NoDebug) { // If we don't have a lexical scope for this function then there will // be a hole in the range information. Keep note of this by setting the // previously used section to nullptr. @@ -1106,7 +1112,7 @@ DebugHandlerBase::endFunction(MF); // Mark functions with no debug info on any instructions, but a // valid DISubprogram as processed. - if (auto *SP = MF->getFunction()->getSubprogram()) + if (SP) ProcessedSPNodes.insert(SP); return; } @@ -1115,8 +1121,8 @@ Asm->OutStreamer->getContext().setDwarfCompileUnitID(0); LexicalScope *FnScope = LScopes.getCurrentFunctionScope(); - auto *SP = cast(FnScope->getScopeNode()); - DwarfCompileUnit &TheCU = *SPMap.lookup(SP); + SP = cast(FnScope->getScopeNode()); + DwarfCompileUnit &TheCU = *CUMap.lookup(SP->getUnit()); DenseSet ProcessedVars; collectVariableInfo(TheCU, SP, ProcessedVars); Index: lib/IR/AsmWriter.cpp =================================================================== --- lib/IR/AsmWriter.cpp +++ lib/IR/AsmWriter.cpp @@ -1673,7 +1673,6 @@ Printer.printEmissionKind("emissionKind", N->getEmissionKind()); Printer.printMetadata("enums", N->getRawEnumTypes()); Printer.printMetadata("retainedTypes", N->getRawRetainedTypes()); - Printer.printMetadata("subprograms", N->getRawSubprograms()); Printer.printMetadata("globals", N->getRawGlobalVariables()); Printer.printMetadata("imports", N->getRawImportedEntities()); Printer.printMetadata("macros", N->getRawMacros()); @@ -1703,6 +1702,7 @@ Printer.printInt("virtualIndex", N->getVirtualIndex(), false); Printer.printDIFlags("flags", N->getFlags()); Printer.printBool("isOptimized", N->isOptimized()); + Printer.printMetadata("unit", N->getRawUnit()); Printer.printMetadata("templateParams", N->getRawTemplateParams()); Printer.printMetadata("declaration", N->getRawDeclaration()); Printer.printMetadata("variables", N->getRawVariables()); Index: lib/IR/DIBuilder.cpp =================================================================== --- lib/IR/DIBuilder.cpp +++ lib/IR/DIBuilder.cpp @@ -96,9 +96,6 @@ CUNode->replaceRetainedTypes(MDTuple::get(VMContext, RetainValues)); DISubprogramArray SPs = MDTuple::get(VMContext, AllSubprograms); - if (!AllSubprograms.empty()) - CUNode->replaceSubprograms(SPs.get()); - for (auto *SP : SPs) { if (MDTuple *Temp = SP->getVariables().get()) { const auto &PV = PreservedVariables.lookup(SP); @@ -148,8 +145,8 @@ assert(!CUNode && "Can only make one compile unit per DIBuilder instance"); CUNode = DICompileUnit::getDistinct( VMContext, Lang, DIFile::get(VMContext, Filename, Directory), Producer, - isOptimized, Flags, RunTimeVer, SplitName, Kind, nullptr, - nullptr, nullptr, nullptr, nullptr, nullptr, DWOId); + isOptimized, Flags, RunTimeVer, SplitName, Kind, nullptr, nullptr, + nullptr, nullptr, nullptr, DWOId); // Create a named metadata so that it is easier to find cu in a module. NamedMDNode *NMD = M.getOrInsertNamedMetadata("llvm.dbg.cu"); @@ -684,12 +681,12 @@ unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, unsigned Flags, bool isOptimized, DITemplateParameterArray TParams, DISubprogram *Decl) { - auto *Node = - getSubprogram(/* IsDistinct = */ isDefinition, VMContext, - DIScopeRef::get(getNonCompileUnitScope(Context)), Name, - LinkageName, File, LineNo, Ty, isLocalToUnit, isDefinition, - ScopeLine, nullptr, 0, 0, Flags, isOptimized, TParams, Decl, - MDTuple::getTemporary(VMContext, None).release()); + auto *Node = getSubprogram(/* IsDistinct = */ isDefinition, VMContext, + DIScopeRef::get(getNonCompileUnitScope(Context)), + Name, LinkageName, File, LineNo, Ty, isLocalToUnit, + isDefinition, ScopeLine, nullptr, 0, 0, Flags, + isOptimized, CUNode, TParams, Decl, + MDTuple::getTemporary(VMContext, None).release()); if (isDefinition) AllSubprograms.push_back(Node); @@ -705,8 +702,8 @@ return DISubprogram::getTemporary( VMContext, DIScopeRef::get(getNonCompileUnitScope(Context)), Name, LinkageName, File, LineNo, Ty, isLocalToUnit, isDefinition, - ScopeLine, nullptr, 0, 0, Flags, isOptimized, TParams, Decl, - nullptr) + ScopeLine, nullptr, 0, 0, Flags, isOptimized, CUNode, TParams, + Decl, nullptr) .release(); } @@ -724,7 +721,7 @@ /* IsDistinct = */ isDefinition, VMContext, DIScopeRef::get(cast(Context)), Name, LinkageName, F, LineNo, Ty, isLocalToUnit, isDefinition, LineNo, DITypeRef::get(VTableHolder), VK, - VIndex, Flags, isOptimized, TParams, nullptr, nullptr); + VIndex, Flags, isOptimized, CUNode, TParams, nullptr, nullptr); if (isDefinition) AllSubprograms.push_back(SP); Index: lib/IR/DebugInfo.cpp =================================================================== --- lib/IR/DebugInfo.cpp +++ lib/IR/DebugInfo.cpp @@ -94,8 +94,6 @@ processType(DIG->getType().resolve(TypeIdentifierMap)); } } - for (auto *SP : CU->getSubprograms()) - processSubprogram(SP); for (auto *ET : CU->getEnumTypes()) processType(ET); for (auto *RT : CU->getRetainedTypes()) @@ -112,6 +110,9 @@ processScope(M->getScope()); } } + for (auto &F : M.functions()) + if (auto *SP = cast_or_null(F.getSubprogram())) + processSubprogram(SP); } void DebugInfoFinder::processLocation(const Module &M, const DILocation *Loc) { Index: lib/IR/DebugInfoMetadata.cpp =================================================================== --- lib/IR/DebugInfoMetadata.cpp +++ lib/IR/DebugInfoMetadata.cpp @@ -290,17 +290,17 @@ MDString *Producer, bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, - Metadata *Subprograms, Metadata *GlobalVariables, - Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId, - StorageType Storage, bool ShouldCreate) { + Metadata *GlobalVariables, Metadata *ImportedEntities, Metadata *Macros, + uint64_t DWOId, StorageType Storage, bool ShouldCreate) { assert(Storage != Uniqued && "Cannot unique DICompileUnit"); assert(isCanonical(Producer) && "Expected canonical MDString"); assert(isCanonical(Flags) && "Expected canonical MDString"); assert(isCanonical(SplitDebugFilename) && "Expected canonical MDString"); - Metadata *Ops[] = {File, Producer, Flags, SplitDebugFilename, EnumTypes, - RetainedTypes, Subprograms, GlobalVariables, - ImportedEntities, Macros}; + Metadata *Ops[] = { + File, Producer, Flags, SplitDebugFilename, + EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, + Macros}; return storeImpl(new (ArrayRef(Ops).size()) DICompileUnit( Context, Storage, SourceLanguage, IsOptimized, RuntimeVersion, EmissionKind, DWOId, Ops), @@ -336,7 +336,7 @@ MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, - unsigned Flags, bool IsOptimized, Metadata *TemplateParams, + unsigned Flags, bool IsOptimized, Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *Variables, StorageType Storage, bool ShouldCreate) { assert(isCanonical(Name) && "Expected canonical MDString"); @@ -344,11 +344,11 @@ DEFINE_GETIMPL_LOOKUP(DISubprogram, (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, - Virtuality, VirtualIndex, Flags, IsOptimized, + Virtuality, VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); - Metadata *Ops[] = {File, Scope, Name, Name, - LinkageName, Type, ContainingType, TemplateParams, - Declaration, Variables}; + Metadata *Ops[] = {File, Scope, Name, Name, + LinkageName, Type, ContainingType, Unit, + TemplateParams, Declaration, Variables}; DEFINE_GETIMPL_STORE(DISubprogram, (Line, ScopeLine, Virtuality, VirtualIndex, Flags, IsLocalToUnit, IsDefinition, IsOptimized), Index: lib/IR/LLVMContextImpl.h =================================================================== --- lib/IR/LLVMContextImpl.h +++ lib/IR/LLVMContextImpl.h @@ -480,6 +480,7 @@ unsigned VirtualIndex; unsigned Flags; bool IsOptimized; + Metadata *Unit; Metadata *TemplateParams; Metadata *Declaration; Metadata *Variables; @@ -489,14 +490,14 @@ bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, unsigned Flags, bool IsOptimized, - Metadata *TemplateParams, Metadata *Declaration, + Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *Variables) : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File), Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition), ScopeLine(ScopeLine), ContainingType(ContainingType), Virtuality(Virtuality), VirtualIndex(VirtualIndex), Flags(Flags), IsOptimized(IsOptimized), - TemplateParams(TemplateParams), Declaration(Declaration), + Unit(Unit), TemplateParams(TemplateParams), Declaration(Declaration), Variables(Variables) {} MDNodeKeyImpl(const DISubprogram *N) : Scope(N->getRawScope()), Name(N->getRawName()), @@ -506,7 +507,7 @@ ScopeLine(N->getScopeLine()), ContainingType(N->getRawContainingType()), Virtuality(N->getVirtuality()), VirtualIndex(N->getVirtualIndex()), Flags(N->getFlags()), IsOptimized(N->isOptimized()), - TemplateParams(N->getRawTemplateParams()), + Unit(N->getRawUnit()), TemplateParams(N->getRawTemplateParams()), Declaration(N->getRawDeclaration()), Variables(N->getRawVariables()) {} bool isKeyOf(const DISubprogram *RHS) const { @@ -519,7 +520,7 @@ ContainingType == RHS->getRawContainingType() && Virtuality == RHS->getVirtuality() && VirtualIndex == RHS->getVirtualIndex() && Flags == RHS->getFlags() && - IsOptimized == RHS->isOptimized() && + IsOptimized == RHS->isOptimized() && Unit == RHS->getUnit() && TemplateParams == RHS->getRawTemplateParams() && Declaration == RHS->getRawDeclaration() && Variables == RHS->getRawVariables(); Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -954,12 +954,6 @@ Assert(Op && isa(Op), "invalid retained type", &N, Op); } } - if (auto *Array = N.getRawSubprograms()) { - Assert(isa(Array), "invalid subprogram list", &N, Array); - for (Metadata *Op : N.getSubprograms()->operands()) { - Assert(Op && isa(Op), "invalid subprogram ref", &N, Op); - } - } if (auto *Array = N.getRawGlobalVariables()) { Assert(isa(Array), "invalid global variable list", &N, Array); for (Metadata *Op : N.getGlobalVariables()->operands()) { @@ -994,10 +988,9 @@ N.getRawContainingType()); if (auto *Params = N.getRawTemplateParams()) visitTemplateParams(N, *Params); - if (auto *S = N.getRawDeclaration()) { + if (auto *S = N.getRawDeclaration()) Assert(isa(S) && !cast(S)->isDefinition(), "invalid subprogram declaration", &N, S); - } if (auto *RawVars = N.getRawVariables()) { auto *Vars = dyn_cast(RawVars); Assert(Vars, "invalid variable list", &N, RawVars); @@ -1008,9 +1001,16 @@ } Assert(!hasConflictingReferenceFlags(N.getFlags()), "invalid reference flags", &N); - - if (N.isDefinition()) + auto *Unit = N.getRawUnit(); + if (N.isDefinition()) { + // Subprogram definitions (not part of the type hierarchy). Assert(N.isDistinct(), "subprogram definitions must be distinct", &N); + Assert(Unit, "subprogram definitions must have a compile unit", &N); + Assert(isa(Unit), "invalid unit type", &N, Unit); + } else { + // Subprogram declarations (part of the type hierarchy). + Assert(!Unit, "subprogram declarations must not have a compile unit", &N); + } } void Verifier::visitDILexicalBlockBase(const DILexicalBlockBase &N) { @@ -2023,6 +2023,8 @@ if (!N) return; + visitDISubprogram(*N); + // Check that all !dbg attachments lead to back to N (or, at least, another // subprogram that describes the same function). // Index: lib/Linker/IRMover.cpp =================================================================== --- lib/Linker/IRMover.cpp +++ lib/Linker/IRMover.cpp @@ -400,11 +400,6 @@ /// Flags to pass to value mapper invocations. RemapFlags ValueMapperFlags = RF_MoveDistinctMDs | RF_IgnoreMissingLocals; - /// Set of subprogram metadata that does not need to be linked into the - /// destination module, because the functions were not imported directly - /// or via an inlined body in an imported function. - bool HasUnneededSPs = false; - /// Handles cloning of a global values from the source module into /// the destination module, including setting the attributes and visibility. GlobalValue *copyGlobalValueProto(const GlobalValue *SGV, bool ForDefinition); @@ -470,15 +465,6 @@ void linkNamedMDNodes(); - /// Look for subprograms referenced from !llvm.dbg.cu that we don't want to - /// link in and map it to nullptr. - /// - /// \post HasUnneededSPs is true iff any unneeded subprograms were found. - void mapUnneededSubprograms(); - - /// Remove null subprograms from !llvm.dbg.cu. - void stripNullSubprograms(DICompileUnit *CU); - public: IRLinker(Module &DstM, IRMover::IdentifiedStructTypeSet &Set, std::unique_ptr SrcM, ArrayRef ValuesToLink, @@ -1004,60 +990,8 @@ return false; } -void IRLinker::mapUnneededSubprograms() { - // Track unneeded nodes to make it simpler to handle the case - // where we are checking if an already-mapped SP is needed. - NamedMDNode *CompileUnits = SrcM->getNamedMetadata("llvm.dbg.cu"); - if (!CompileUnits) - return; - - // Seed the ValueMap with the imported entities, in case they reference new - // subprograms. - // FIXME: The DISubprogram for functions not linked in but kept due to - // being referenced by a DIImportedEntity should also get their - // IsDefinition flag is unset. - for (unsigned I = 0, E = CompileUnits->getNumOperands(); I != E; ++I) { - if (MDTuple *IEs = cast(CompileUnits->getOperand(I)) - ->getImportedEntities() - .get()) - (void)MapMetadata(IEs, ValueMap, - ValueMapperFlags | RF_NullMapMissingGlobalValues, - &TypeMap, &GValMaterializer); - } - - // Try to insert nullptr into the map for any SP not already mapped. If - // the insertion succeeds, we don't need this subprogram. - for (unsigned I = 0, E = CompileUnits->getNumOperands(); I != E; ++I) { - for (auto *Op : - cast(CompileUnits->getOperand(I))->getSubprograms()) - if (ValueMap.MD().insert(std::make_pair(Op, TrackingMDRef())).second) - HasUnneededSPs = true; - } -} - -// Squash null subprograms from the given compile unit's subprogram list. -void IRLinker::stripNullSubprograms(DICompileUnit *CU) { - // There won't be any nulls if we didn't have any subprograms marked - // as unneeded. - if (!HasUnneededSPs) - return; - SmallVector NewSPs; - NewSPs.reserve(CU->getSubprograms().size()); - bool FoundNull = false; - for (DISubprogram *SP : CU->getSubprograms()) { - if (!SP) { - FoundNull = true; - continue; - } - NewSPs.push_back(SP); - } - if (FoundNull) - CU->replaceSubprograms(MDTuple::get(CU->getContext(), NewSPs)); -} - /// Insert all of the named MDNodes in Src into the Dest module. void IRLinker::linkNamedMDNodes() { - mapUnneededSubprograms(); const NamedMDNode *SrcModFlags = SrcM->getModuleFlagsMetadata(); for (const NamedMDNode &NMD : SrcM->named_metadata()) { // Don't link module flags here. Do them separately. @@ -1069,11 +1003,6 @@ MDNode *DestMD = MapMetadata( op, ValueMap, ValueMapperFlags | RF_NullMapMissingGlobalValues, &TypeMap, &GValMaterializer); - // For each newly mapped compile unit remove any null subprograms, - // which occur when mapUnneededSubprograms identified any as unneeded - // in the dest module. - if (auto *CU = dyn_cast(DestMD)) - stripNullSubprograms(CU); DestNMD->addOperand(DestMD); } } Index: lib/Transforms/IPO/StripSymbols.cpp =================================================================== --- lib/Transforms/IPO/StripSymbols.cpp +++ lib/Transforms/IPO/StripSymbols.cpp @@ -312,20 +312,6 @@ } for (DICompileUnit *DIC : F.compile_units()) { - // Create our live subprogram list. - bool SubprogramChange = false; - for (DISubprogram *DISP : DIC->getSubprograms()) { - // Make sure we visit each subprogram only once. - if (!VisitedSet.insert(DISP).second) - continue; - - // If the function referenced by DISP is not null, the function is live. - if (LiveSPs.count(DISP)) - LiveSubprograms.push_back(DISP); - else - SubprogramChange = true; - } - // Create our live global variable list. bool GlobalVariableChange = false; for (DIGlobalVariable *DIG : DIC->getGlobalVariables()) { @@ -341,14 +327,8 @@ GlobalVariableChange = true; } - // If we found dead subprograms or global variables, replace the current - // subprogram list/global variable list with our new live subprogram/global - // variable list. - if (SubprogramChange) { - DIC->replaceSubprograms(MDTuple::get(C, LiveSubprograms)); - Changed = true; - } - + // If we found dead global variables, replace the current global + // variable list with our new live global variable list. if (GlobalVariableChange) { DIC->replaceGlobalVariables(MDTuple::get(C, LiveGlobalVariables)); Changed = true; Index: lib/Transforms/Instrumentation/GCOVProfiling.cpp =================================================================== --- lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -138,7 +138,6 @@ Module *M; LLVMContext *Ctx; SmallVector, 16> Funcs; - DenseMap FnMap; }; } @@ -450,28 +449,21 @@ this->M = &M; Ctx = &M.getContext(); - FnMap.clear(); - for (Function &F : M) { - if (DISubprogram *SP = F.getSubprogram()) - FnMap[SP] = &F; - } - if (Options.EmitNotes) emitProfileNotes(); if (Options.EmitData) return emitProfileArcs(); return false; } -static bool functionHasLines(Function *F) { +static bool functionHasLines(Function &F) { // Check whether this function actually has any source lines. Not only // do these waste space, they also can crash gcov. - for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - for (BasicBlock::iterator I = BB->begin(), IE = BB->end(); - I != IE; ++I) { + for (auto &BB : F) { + for (auto &I : BB) { // Debug intrinsic locations correspond to the location of the // declaration, not necessarily any statements or expressions. - if (isa(I)) continue; + if (isa(&I)) continue; - const DebugLoc &Loc = I->getDebugLoc(); + const DebugLoc &Loc = I.getDebugLoc(); if (!Loc) continue; @@ -504,27 +496,27 @@ std::string EdgeDestinations; unsigned FunctionIdent = 0; - for (auto *SP : CU->getSubprograms()) { - Function *F = FnMap[SP]; - if (!F) continue; + for (auto &F : M->functions()) { + DISubprogram *SP = F.getSubprogram(); + if (!SP) continue; if (!functionHasLines(F)) continue; // gcov expects every function to start with an entry block that has a // single successor, so split the entry block to make sure of that. - BasicBlock &EntryBlock = F->getEntryBlock(); + BasicBlock &EntryBlock = F.getEntryBlock(); BasicBlock::iterator It = EntryBlock.begin(); while (isa(*It) || isa(*It)) ++It; EntryBlock.splitBasicBlock(It); - Funcs.push_back(make_unique(SP, F, &out, FunctionIdent++, + Funcs.push_back(make_unique(SP, &F, &out, FunctionIdent++, Options.UseCfgChecksum, Options.ExitBlockBeforeBody)); GCOVFunction &Func = *Funcs.back(); - for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - GCOVBlock &Block = Func.getBlock(&*BB); - TerminatorInst *TI = BB->getTerminator(); + for (auto &BB : F) { + GCOVBlock &Block = Func.getBlock(&BB); + TerminatorInst *TI = BB.getTerminator(); if (int successors = TI->getNumSuccessors()) { for (int i = 0; i != successors; ++i) { Block.addEdge(Func.getBlock(TI->getSuccessor(i))); @@ -534,13 +526,12 @@ } uint32_t Line = 0; - for (BasicBlock::iterator I = BB->begin(), IE = BB->end(); - I != IE; ++I) { + for (auto &I : BB) { // Debug intrinsic locations correspond to the location of the // declaration, not necessarily any statements or expressions. - if (isa(I)) continue; + if (isa(&I)) continue; - const DebugLoc &Loc = I->getDebugLoc(); + const DebugLoc &Loc = I.getDebugLoc(); if (!Loc) continue; @@ -581,16 +572,15 @@ bool Result = false; bool InsertIndCounterIncrCode = false; for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) { - auto *CU = cast(CU_Nodes->getOperand(i)); SmallVector, 8> CountersBySP; - for (auto *SP : CU->getSubprograms()) { - Function *F = FnMap[SP]; - if (!F) continue; + for (auto &F : M->functions()) { + DISubprogram *SP = F.getSubprogram(); + if (!SP) continue; if (!functionHasLines(F)) continue; if (!Result) Result = true; unsigned Edges = 0; - for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - TerminatorInst *TI = BB->getTerminator(); + for (auto &BB : F) { + TerminatorInst *TI = BB.getTerminator(); if (isa(TI)) ++Edges; else @@ -610,12 +600,12 @@ UniqueVector ComplexEdgeSuccs; unsigned Edge = 0; - for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - TerminatorInst *TI = BB->getTerminator(); + for (auto &BB : F) { + TerminatorInst *TI = BB.getTerminator(); int Successors = isa(TI) ? 1 : TI->getNumSuccessors(); if (Successors) { if (Successors == 1) { - IRBuilder<> Builder(&*BB->getFirstInsertionPt()); + IRBuilder<> Builder(&*BB.getFirstInsertionPt()); Value *Counter = Builder.CreateConstInBoundsGEP2_64(Counters, 0, Edge); Value *Count = Builder.CreateLoad(Counter); @@ -635,7 +625,7 @@ Count = Builder.CreateAdd(Count, Builder.getInt64(1)); Builder.CreateStore(Count, Counter); } else { - ComplexEdgePreds.insert(&*BB); + ComplexEdgePreds.insert(&BB); for (int i = 0; i != Successors; ++i) ComplexEdgeSuccs.insert(TI->getSuccessor(i)); } @@ -646,7 +636,7 @@ if (!ComplexEdgePreds.empty()) { GlobalVariable *EdgeTable = - buildEdgeLookupTable(F, Counters, + buildEdgeLookupTable(&F, Counters, ComplexEdgePreds, ComplexEdgeSuccs); GlobalVariable *EdgeState = getEdgeStateValue(); Index: lib/Transforms/Utils/CloneFunction.cpp =================================================================== --- lib/Transforms/Utils/CloneFunction.cpp +++ lib/Transforms/Utils/CloneFunction.cpp @@ -172,52 +172,16 @@ TypeMapper, Materializer); } -// Find the MDNode which corresponds to the subprogram data that described F. -static DISubprogram *FindSubprogram(const Function *F, - DebugInfoFinder &Finder) { - for (DISubprogram *Subprogram : Finder.subprograms()) { - if (Subprogram->describes(F)) - return Subprogram; - } - return nullptr; -} - -// Add an operand to an existing MDNode. The new operand will be added at the -// back of the operand list. -static void AddOperand(DICompileUnit *CU, DISubprogramArray SPs, - Metadata *NewSP) { - SmallVector NewSPs; - NewSPs.reserve(SPs.size() + 1); - for (auto *SP : SPs) - NewSPs.push_back(SP); - NewSPs.push_back(NewSP); - CU->replaceSubprograms(MDTuple::get(CU->getContext(), NewSPs)); -} - // Clone the module-level debug info associated with OldFunc. The cloned data // will point to NewFunc instead. static void CloneDebugInfoMetadata(Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap) { - DebugInfoFinder Finder; - Finder.processModule(*OldFunc->getParent()); - - const DISubprogram *OldSubprogramMDNode = FindSubprogram(OldFunc, Finder); - if (!OldSubprogramMDNode) return; - - auto *NewSubprogram = - cast(MapMetadata(OldSubprogramMDNode, VMap)); - NewFunc->setSubprogram(NewSubprogram); - - for (auto *CU : Finder.compile_units()) { - auto Subprograms = CU->getSubprograms(); - // If the compile unit's function list contains the old function, it should - // also contain the new one. - for (auto *SP : Subprograms) { - if (SP == OldSubprogramMDNode) { - AddOperand(CU, Subprograms, NewSubprogram); - break; - } - } + if (const DISubprogram *OldSP = OldFunc->getSubprogram()) { + auto *NewSP = cast(MapMetadata(OldSP, VMap)); + // There ought to be a better way to do this: ValueMapper will + // clone the distinct DICompileUnit. Use the original one instead. + NewSP->replaceUnit(OldSP->getUnit()); + NewFunc->setSubprogram(NewSP); } } Index: test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll =================================================================== --- test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll +++ test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll @@ -27,9 +27,9 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !7 = !{!1} -!6 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9, subprograms: !7) +!6 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9) !0 = !DILocalVariable(name: "c", line: 2, scope: !1, file: !2, type: !5) -!1 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !8, scope: !2, type: !3) +!1 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !6, scopeLine: 1, file: !8, scope: !2, type: !3) !2 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b") !3 = !DISubroutineType(types: !4) !4 = !{!5} Index: test/Assembler/dicompileunit.ll =================================================================== --- test/Assembler/dicompileunit.ll +++ test/Assembler/dicompileunit.ll @@ -16,12 +16,12 @@ !6 = distinct !{} !7 = distinct !{} -; CHECK: !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, flags: "-O2", runtimeVersion: 2, splitDebugFilename: "abc.debug", emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !4, globals: !5, imports: !6, macros: !7, dwoId: 42) +; CHECK: !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, flags: "-O2", runtimeVersion: 2, splitDebugFilename: "abc.debug", emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !5, imports: !6, macros: !7, dwoId: 42) !8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, flags: "-O2", runtimeVersion: 2, splitDebugFilename: "abc.debug", emissionKind: FullDebug, - enums: !2, retainedTypes: !3, subprograms: !4, + enums: !2, retainedTypes: !3, globals: !5, imports: !6, macros: !7, dwoId: 42) ; CHECK: !9 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug) Index: test/Assembler/diimportedentity.ll =================================================================== --- test/Assembler/diimportedentity.ll +++ test/Assembler/diimportedentity.ll @@ -1,30 +1,29 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK: !named = !{!0, !1, !2, !3, !3} -!named = !{!0, !1, !2, !3, !4} +; CHECK: !named = !{!0, !3, !4, !5, !5} +!named = !{!0, !3, !4, !5, !6} !llvm.module.flags = !{!7} -!llvm.dbg.cu = !{!5} +!llvm.dbg.cu = !{!1} ; CHECK: !0 = distinct !DISubprogram({{.*}}) -; CHECK-NEXT: !1 = !DICompositeType({{.*}}) -!0 = distinct !DISubprogram(name: "foo") -!1 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 32, align: 32) +!0 = distinct !DISubprogram(name: "foo", isDefinition: true, unit: !1) -; CHECK-NEXT: !2 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, entity: !1, line: 7) -!2 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !2, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) +!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") +; CHECK: !3 = !DICompositeType({{.*}}) +!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 32, align: 32) + +; CHECK-NEXT: !4 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, entity: !1, line: 7) +!4 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, entity: !1, line: 7) -; CHECK-NEXT: !3 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !0) -!3 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !0) -!4 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "", scope: !0, entity: null, +; CHECK-NEXT: !5 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !0) +!5 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !0) +!6 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "", scope: !0, entity: null, line: 0) - -!5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !6, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!0}) -!6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Assembler/dilexicalblock.ll =================================================================== --- test/Assembler/dilexicalblock.ll +++ test/Assembler/dilexicalblock.ll @@ -1,35 +1,34 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK: !named = !{!0, !1, !2, !3, !4, !4, !5, !6, !7, !7} -!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9} +; CHECK: !named = !{!0, !1, !2, !3, !4, !4, !5, !6, !7, !7, !8} +!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10} !llvm.module.flags = !{!11} -!llvm.dbg.cu = !{!10} +!llvm.dbg.cu = !{!0} -!0 = distinct !{} -!1 = distinct !DISubprogram(name: "foo", scope: !2) -!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !1, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) +!1 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") +!2 = distinct !DISubprogram(name: "foo", scope: !1, unit: !0) -; CHECK: !3 = !DILexicalBlock(scope: !1, file: !2, line: 7, column: 35) -!3 = !DILexicalBlock(scope: !1, file: !2, line: 7, column: 35) +; CHECK: !3 = !DILexicalBlock(scope: !2, file: !1, line: 7, column: 35) +!3 = !DILexicalBlock(scope: !2, file: !1, line: 7, column: 35) -; CHECK: !4 = !DILexicalBlock(scope: !1) -!4 = !DILexicalBlock(scope: !1) -!5 = !DILexicalBlock(scope: !1, file: null, line: 0, column: 0) +; CHECK: !4 = !DILexicalBlock(scope: !2) +!4 = !DILexicalBlock(scope: !2) +!5 = !DILexicalBlock(scope: !2, file: null, line: 0, column: 0) -; CHECK: !5 = !DILexicalBlockFile(scope: !3, file: !2, discriminator: 0) -; CHECK: !6 = !DILexicalBlockFile(scope: !3, file: !2, discriminator: 1) -!6 = !DILexicalBlockFile(scope: !3, file: !2, discriminator: 0) -!7 = !DILexicalBlockFile(scope: !3, file: !2, discriminator: 1) +; CHECK: !5 = !DILexicalBlockFile(scope: !3, file: !1, discriminator: 0) +; CHECK: !6 = !DILexicalBlockFile(scope: !3, file: !1, discriminator: 1) +!6 = !DILexicalBlockFile(scope: !3, file: !1, discriminator: 0) +!7 = !DILexicalBlockFile(scope: !3, file: !1, discriminator: 1) ; CHECK: !7 = !DILexicalBlockFile(scope: !3, discriminator: 7) !8 = !DILexicalBlockFile(scope: !3, discriminator: 7) !9 = !DILexicalBlockFile(scope: !3, file: null, discriminator: 7) +!10 = distinct !{} -!10 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !2, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!1}) !11 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Assembler/dilocalvariable-arg-large.ll =================================================================== --- test/Assembler/dilocalvariable-arg-large.ll +++ test/Assembler/dilocalvariable-arg-large.ll @@ -1,21 +1,20 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK: !named = !{!0, !1} -!named = !{!0, !1} +; CHECK: !named = !{!0, !3} +!named = !{!0, !3} !llvm.module.flags = !{!4} -!llvm.dbg.cu = !{!2} +!llvm.dbg.cu = !{!1} -!0 = distinct !DISubprogram() +!0 = distinct !DISubprogram(unit: !1) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !2, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) +!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") -; CHECK: !1 = !DILocalVariable(name: "foo", arg: 65535, scope: !0) -!1 = !DILocalVariable(name: "foo", arg: 65535, scope: !0) +; CHECK: !3 = !DILocalVariable(name: "foo", arg: 65535, scope: !0) +!3 = !DILocalVariable(name: "foo", arg: 65535, scope: !0) -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !3, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!0}) -!3 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !4 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Assembler/dilocalvariable.ll =================================================================== --- test/Assembler/dilocalvariable.ll +++ test/Assembler/dilocalvariable.ll @@ -3,14 +3,17 @@ @foo = global i32 0 -; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} -!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9} +!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9} !llvm.module.flags = !{!10} -!llvm.dbg.cu = !{!9} +!llvm.dbg.cu = !{!1} -!0 = distinct !DISubprogram() -!1 = distinct !{} +!0 = distinct !DISubprogram(unit: !1) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !2, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) !2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !4 = !DILocation(scope: !0) @@ -27,10 +30,6 @@ ; CHECK: !8 = !DILocalVariable(scope: !0) !7 = !DILocalVariable(scope: !0, arg: 1) !8 = !DILocalVariable(scope: !0) +!9 = distinct !{} -!9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !2, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!0}) !10 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Assembler/dilocation.ll =================================================================== --- test/Assembler/dilocation.ll +++ test/Assembler/dilocation.ll @@ -1,34 +1,35 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK: !named = !{!0, !1, !1, !2, !2, !3, !3, !4} -!named = !{!0, !1, !2, !3, !4, !5, !6, !7} +; CHECK: !named = !{!0, !2, !3, !3, !4, !4, !5, !5, !6} +!named = !{!0, !2, !3, !4, !5, !6, !7, !8, !9} !llvm.module.flags = !{!10} -!llvm.dbg.cu = !{!8} +!llvm.dbg.cu = !{!1} ; CHECK: !0 = distinct !DISubprogram( -!0 = distinct !DISubprogram() +!0 = distinct !DISubprogram(unit: !1) +; CHECK: !1 = distinct !DICompileUnit +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !2, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) +; CHECK: !2 = !DIFile +!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") -; CHECK-NEXT: !1 = !DILocation(line: 3, column: 7, scope: !0) -!1 = !DILocation(line: 3, column: 7, scope: !0) -!2 = !DILocation(scope: !0, column: 7, line: 3) +; CHECK-NEXT: !3 = !DILocation(line: 3, column: 7, scope: !0) +!3 = !DILocation(line: 3, column: 7, scope: !0) +!4 = !DILocation(scope: !0, column: 7, line: 3) -; CHECK-NEXT: !2 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !1) -!3 = !DILocation(scope: !0, inlinedAt: !1, column: 7, line: 3) -!4 = !DILocation(column: 7, line: 3, scope: !0, inlinedAt: !1) +; CHECK-NEXT: !4 = !DILocation(line: 3, column: 7, scope: !0, inlinedAt: !3) +!5 = !DILocation(scope: !0, inlinedAt: !3, column: 7, line: 3) +!6 = !DILocation(column: 7, line: 3, scope: !0, inlinedAt: !3) -; CHECK-NEXT: !3 = !DILocation(line: 0, scope: !0) -!5 = !DILocation(scope: !0) -!6 = !DILocation(scope: !0, column: 0, line: 0) +; CHECK-NEXT: !5 = !DILocation(line: 0, scope: !0) +!7 = !DILocation(scope: !0) +!8 = !DILocation(scope: !0, column: 0, line: 0) -; CHECK-NEXT: !4 = !DILocation(line: 4294967295, column: 65535, scope: !0) -!7 = !DILocation(line: 4294967295, column: 65535, scope: !0) +; CHECK-NEXT: !6 = !DILocation(line: 4294967295, column: 65535, scope: !0) +!9 = !DILocation(line: 4294967295, column: 65535, scope: !0) -!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !9, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!0}) -!9 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !10 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Assembler/disubprogram.ll =================================================================== --- test/Assembler/disubprogram.ll +++ test/Assembler/disubprogram.ll @@ -6,8 +6,8 @@ ret void } -; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11} -!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11} +; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} +!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} !0 = !{null} !1 = distinct !DICompositeType(tag: DW_TAG_structure_type) @@ -17,44 +17,50 @@ !5 = distinct !{} !6 = distinct !{} -; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false) -!7 = distinct !DISubprogram() +; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !8) +!7 = distinct !DISubprogram(unit: !8) -; CHECK: !8 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false) -!8 = !DISubprogram(isDefinition: false) +!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", + file: !2, + isOptimized: true, flags: "-O2", + splitDebugFilename: "abc.debug", emissionKind: 2) -; CHECK: !9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: true, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, templateParams: !5, declaration: !8, variables: !6) -!9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, +; CHECK: !9 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false) +!9 = !DISubprogram(isDefinition: false) + +; CHECK: !10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: true, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, unit: !8, templateParams: !5, declaration: !9, variables: !6) +!10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, - isDefinition: true, scopeLine: 8, containingType: !4, - virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, - flags: DIFlagPrototyped, isOptimized: true, - templateParams: !5, declaration: !8, variables: !6) + isDefinition: true, scopeLine: 8, + containingType: !4, + virtuality: DW_VIRTUALITY_pure_virtual, + virtualIndex: 10, flags: DIFlagPrototyped, + isOptimized: true, unit: !8, templateParams: !5, + declaration: !9, variables: !6) -; CHECK: !10 = distinct !DISubprogram +; CHECK: !11 = distinct !DISubprogram ; CHECK-SAME: virtualIndex: 0, -!10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, +!11 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, - isDefinition: true, scopeLine: 8, containingType: !4, - virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 0, + isDefinition: true, scopeLine: 8, + containingType: !4, + virtuality: DW_VIRTUALITY_pure_virtual, + virtualIndex: 0, flags: DIFlagPrototyped, isOptimized: true, - templateParams: !5, declaration: !8, variables: !6) + unit: !8, templateParams: !5, declaration: !9, + variables: !6) -; CHECK: !11 = distinct !DISubprogram +; CHECK: !12 = distinct !DISubprogram ; CHECK-NOT: virtualIndex -!11 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, +!12 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, - isDefinition: true, scopeLine: 8, containingType: !4, + isDefinition: true, scopeLine: 8, + containingType: !4, virtuality: DW_VIRTUALITY_none, flags: DIFlagPrototyped, isOptimized: true, - templateParams: !5, declaration: !8, variables: !6) + unit: !8, + templateParams: !5, declaration: !9, variables: !6) -!12 = !{i32 1, !"Debug Info Version", i32 3} -!llvm.module.flags = !{!12} -!llvm.dbg.cu = !{!13} - -!13 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", - file: !2, - isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!7, !9, !10, !11}) +!13 = !{i32 1, !"Debug Info Version", i32 3} +!llvm.module.flags = !{!13} +!llvm.dbg.cu = !{!8} Index: test/Assembler/drop-debug-info.ll =================================================================== --- test/Assembler/drop-debug-info.ll +++ test/Assembler/drop-debug-info.ll @@ -12,11 +12,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 195495) (llvm/trunk 195495:195504M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 195495) (llvm/trunk 195495:195504M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release") !2 = !{i32 0} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/Assembler/metadata.ll =================================================================== --- test/Assembler/metadata.ll +++ test/Assembler/metadata.ll @@ -2,8 +2,8 @@ ; RUN: verify-uselistorder %s ; CHECK-LABEL: @test -; CHECK: ret void, !bar !4, !foo !5 -define void @test() { +; CHECK: ret void, !bar !4, !foo !3 +define void @test() !dbg !1 { add i32 2, 1, !bar !0 add i32 1, 2, !foo !1 call void @llvm.dbg.func.start(metadata !"foo") @@ -11,19 +11,19 @@ ret void, !foo !0, !bar !1 } -; CHECK-LABEL: define void @test2() !foo !6 !baz !7 +; CHECK-LABEL: define void @test2() !foo !5 !baz !6 define void @test2() !foo !2 !baz !3 { unreachable } -; CHECK-LABEL: define void @test3() !bar !7 -; CHECK: unreachable, !bar !8 +; CHECK-LABEL: define void @test3() !bar !6 +; CHECK: unreachable, !bar !7 define void @test3() !bar !3 { unreachable, !bar !4 } ; CHECK-LABEL: define void @test_attachment_name() { -; CHECK: unreachable, !\342abc !8 +; CHECK: unreachable, !\342abc !7 define void @test_attachment_name() { ;; Escape the first character when printing text IR, since it's a digit unreachable, !\34\32abc !4 @@ -32,15 +32,14 @@ !llvm.module.flags = !{!7} !llvm.dbg.cu = !{!5} !0 = !DILocation(line: 662302, column: 26, scope: !1) -!1 = distinct !DISubprogram(name: "foo") +!1 = distinct !DISubprogram(name: "foo", isDefinition: true, unit: !5) !2 = distinct !{} !3 = distinct !{} !4 = distinct !{} !5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !6, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!1}) + splitDebugFilename: "abc.debug", emissionKind: 2) !6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Bitcode/DISubprogram-distinct-definitions.ll =================================================================== --- test/Bitcode/DISubprogram-distinct-definitions.ll +++ test/Bitcode/DISubprogram-distinct-definitions.ll @@ -3,9 +3,8 @@ ; Bitcode compiled from r245235 of the 3.7 release branch. !named = !{!0} -!0 = distinct !DICompileUnit(language: 12, file: !1, subprograms: !2) +!0 = distinct !DICompileUnit(language: 12, file: !1) !1 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") -!2 = !{!3} ; CHECK: = distinct !DISubprogram({{.*}}, isDefinition: true !3 = !DISubprogram(name: "foo", isDefinition: true) Index: test/Bitcode/debug-loc-again.ll =================================================================== --- test/Bitcode/debug-loc-again.ll +++ test/Bitcode/debug-loc-again.ll @@ -30,8 +30,7 @@ !llvm.dbg.cu = !{!1} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !DIFile(filename: "f", directory: "/d"), - subprograms: !{!2}) -!2 = distinct !DISubprogram(name: "foo") +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !DIFile(filename: "f", directory: "/d")) +!2 = distinct !DISubprogram(name: "foo", unit: !1) !3 = !DILocation(line: 1, scope: !2) !4 = !DILocation(line: 2, scope: !2) Index: test/Bitcode/upgrade-subprogram.ll =================================================================== --- test/Bitcode/upgrade-subprogram.ll +++ test/Bitcode/upgrade-subprogram.ll @@ -10,7 +10,7 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !llvm.dbg.cu = !{!1} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3}, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, emissionKind: FullDebug) !2 = !DIFile(filename: "foo.c", directory: "/path/to/dir") ; CHECK: [[SP]] = distinct !DISubprogram !3 = distinct !DISubprogram(file: !2, scope: !2, line: 51, name: "foo", function: void ()* @foo, type: !4) Index: test/BugPoint/metadata.ll =================================================================== --- test/BugPoint/metadata.ll +++ test/BugPoint/metadata.ll @@ -31,8 +31,8 @@ !3 = !{!"noise"} !4 = !{!"filler"} -!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !15, subprograms: !{!9}) -!9 = distinct !DISubprogram(name: "test", file: !15) +!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !15) +!9 = distinct !DISubprogram(name: "test", file: !15, unit: !8) !10 = !DILocation(line: 100, column: 101, scope: !9) !11 = !DILocation(line: 102, column: 103, scope: !9) !12 = !DILocation(line: 104, column: 105, scope: !9) Index: test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll =================================================================== --- test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll +++ test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll @@ -44,11 +44,10 @@ !llvm.module.flags = !{!36, !37} !llvm.ident = !{!38} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "", line: 140, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 141, file: !1, scope: !1, type: !6, variables: !12) +!4 = distinct !DISubprogram(name: "", line: 140, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 141, file: !1, scope: !1, type: !6, variables: !12) !6 = !DISubroutineType(types: !7) !7 = !{null, !8} !8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9) Index: test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll =================================================================== --- test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll +++ test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll @@ -21,18 +21,18 @@ !llvm.dbg.cu = !{!0} !0 = !DIGlobalVariable(name: "vsplive", line: 617, isLocal: true, isDefinition: true, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "drt_vsprintf", line: 616, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "drt_vsprintf", line: 616, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, file: !20, scope: !2, type: !4) !2 = !DIFile(filename: "print.i", directory: "/Volumes/Ebi/echeng/radars/r9146594") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (http://llvm.org/git/clang.git git:/git/puzzlebox/clang.git/ c4d1aea01c4444eb81bdbf391f1be309127c3cf1)", isOptimized: true, emissionKind: FullDebug, file: !20, subprograms: !22, enums: !21, retainedTypes: !21, globals: !{!0}) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (http://llvm.org/git/clang.git git:/git/puzzlebox/clang.git/ c4d1aea01c4444eb81bdbf391f1be309127c3cf1)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, globals: !{!0}) !4 = !DISubroutineType(types: !5) !5 = !{!6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!7 = distinct !DISubprogram(name: "putc_mem", line: 30, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8) +!7 = distinct !DISubprogram(name: "putc_mem", line: 30, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, file: !20, scope: !2, type: !8) !8 = !DISubroutineType(types: !9) !9 = !{null} -!10 = distinct !DISubprogram(name: "print_double", line: 203, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4) -!11 = distinct !DISubprogram(name: "print_number", line: 75, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4) -!12 = distinct !DISubprogram(name: "get_flags", line: 508, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8) +!10 = distinct !DISubprogram(name: "print_double", line: 203, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, file: !20, scope: !2, type: !4) +!11 = distinct !DISubprogram(name: "print_number", line: 75, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, file: !20, scope: !2, type: !4) +!12 = distinct !DISubprogram(name: "get_flags", line: 508, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, file: !20, scope: !2, type: !8) !13 = !DILocation(line: 653, column: 5, scope: !14) !14 = distinct !DILexicalBlock(line: 652, column: 35, file: !20, scope: !15) !15 = distinct !DILexicalBlock(line: 616, column: 1, file: !20, scope: !1) @@ -42,4 +42,3 @@ !19 = !DILocation(line: 853, column: 29, scope: !17) !20 = !DIFile(filename: "print.i", directory: "/Volumes/Ebi/echeng/radars/r9146594") !21 = !{i32 0} -!22 = !{!1, !7, !10, !11, !12} Index: test/CodeGen/AMDGPU/llvm.dbg.value.ll =================================================================== --- test/CodeGen/AMDGPU/llvm.dbg.value.ll +++ test/CodeGen/AMDGPU/llvm.dbg.value.ll @@ -20,11 +20,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 244715) (llvm/trunk 244718)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 244715) (llvm/trunk 244718)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "/tmp/test_debug_value.cl", directory: "/Users/matt/src/llvm/build_debug") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test_debug_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !9) +!4 = distinct !DISubprogram(name: "test_debug_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !9) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 32) Index: test/CodeGen/ARM/2009-10-16-Scope.ll =================================================================== --- test/CodeGen/ARM/2009-10-16-Scope.ll +++ test/CodeGen/ARM/2009-10-16-Scope.ll @@ -25,7 +25,7 @@ !llvm.dbg.cu = !{!0} !0 = !DILocation(line: 5, column: 2, scope: !1) !1 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !2) -!2 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !3) +!2 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scope: !3) !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !8, retainedTypes: !9) !4 = !DILocalVariable(name: "count_", line: 5, scope: !5, file: !3, type: !6) !5 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !1) Index: test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll =================================================================== --- test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll +++ test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll @@ -15,10 +15,10 @@ !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!15} !0 = !DILocalVariable(name: "b", line: 93, arg: 2, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: null, type: !4) +!1 = distinct !DISubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !12, scope: null, type: !4) !2 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc") !12 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !13, retainedTypes: !13, subprograms: !14) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !13, retainedTypes: !13) !4 = !DISubroutineType(types: !5) !5 = !{!6, !6, !6} !6 = !DIDerivedType(tag: DW_TAG_typedef, name: "SItype", line: 152, file: !12, baseType: !8) @@ -28,5 +28,4 @@ !10 = distinct !DILexicalBlock(line: 94, column: 0, file: !12, scope: !1) !11 = !DILocation(line: 100, scope: !10) !13 = !{} -!14 = !{!1} !15 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll =================================================================== --- test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll +++ test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll @@ -47,9 +47,9 @@ !llvm.dbg.cu = !{!3} !0 = !DILocalVariable(name: "buf", line: 4, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !26, scope: null, type: !4) +!1 = distinct !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !26, scope: null, type: !4) !2 = !DIFile(filename: "t.c", directory: "/private/tmp") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.0", isOptimized: true, file: !26, subprograms: !{!0, !8, !10, !12}, globals: !{!14}) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.0", isOptimized: true, file: !26, globals: !{!14}) !4 = !DISubroutineType(types: !5) !5 = !{null} !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !26, scope: !2, baseType: !7) Index: test/CodeGen/ARM/2010-08-04-StackVariable.ll =================================================================== --- test/CodeGen/ARM/2010-08-04-StackVariable.ll +++ test/CodeGen/ARM/2010-08-04-StackVariable.ll @@ -83,7 +83,7 @@ !0 = !DISubprogram(name: "SVal", line: 11, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !48, scope: !1, type: !14) !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "SVal", line: 1, size: 64, align: 64, file: !48, elements: !4) !2 = !DIFile(filename: "small.cc", directory: "/Users/manav/R8248330") -!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !48, enums: !47, retainedTypes: !47, subprograms: !46, globals: !47, imports: !47) +!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !48, enums: !47, retainedTypes: !47, globals: !47, imports: !47) !4 = !{!5, !7, !0, !9} !5 = !DIDerivedType(tag: DW_TAG_member, name: "Data", line: 7, size: 64, align: 64, file: !48, scope: !1, baseType: !6) !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !48, baseType: null) @@ -96,11 +96,11 @@ !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !14 = !DISubroutineType(types: !15) !15 = !{null, !12} -!16 = distinct !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !1, type: !14) -!17 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !18) +!16 = distinct !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !48, scope: !1, type: !14) +!17 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !48, scope: !2, type: !18) !18 = !DISubroutineType(types: !19) !19 = !{!13, !13, !1} -!20 = distinct !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !21) +!20 = distinct !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !48, scope: !2, type: !21) !21 = !DISubroutineType(types: !22) !22 = !{!13} !23 = !DILocalVariable(name: "i", line: 16, arg: 1, scope: !17, file: !2, type: !13) @@ -126,7 +126,6 @@ !43 = !DILocation(line: 26, scope: !39) !44 = !DILocalVariable(name: "k", line: 26, scope: !39, file: !2, type: !13) !45 = !DILocation(line: 27, scope: !39) -!46 = !{!16, !17, !20} !47 = !{} !48 = !DIFile(filename: "small.cc", directory: "/Users/manav/R8248330") !49 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll =================================================================== --- test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll +++ test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll @@ -78,16 +78,16 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!49} -!0 = distinct !DISubprogram(name: "get1", linkageName: "get1", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !47, scope: !1, type: !3, variables: !42) +!0 = distinct !DISubprogram(name: "get1", linkageName: "get1", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 4, file: !47, scope: !1, type: !3, variables: !42) !1 = !DIFile(filename: "foo.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2369.8)", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, subprograms: !40, globals: !41, imports: !48) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2369.8)", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, globals: !41, imports: !48) !3 = !DISubroutineType(types: !4) !4 = !{!5, !5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "_Bool", size: 8, align: 8, encoding: DW_ATE_boolean) -!6 = distinct !DISubprogram(name: "get2", linkageName: "get2", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !47, scope: !1, type: !3, variables: !43) -!7 = distinct !DISubprogram(name: "get3", linkageName: "get3", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !47, scope: !1, type: !3, variables: !44) -!8 = distinct !DISubprogram(name: "get4", linkageName: "get4", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !47, scope: !1, type: !3, variables: !45) -!9 = distinct !DISubprogram(name: "get5", linkageName: "get5", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !47, scope: !1, type: !3, variables: !46) +!6 = distinct !DISubprogram(name: "get2", linkageName: "get2", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 7, file: !47, scope: !1, type: !3, variables: !43) +!7 = distinct !DISubprogram(name: "get3", linkageName: "get3", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 10, file: !47, scope: !1, type: !3, variables: !44) +!8 = distinct !DISubprogram(name: "get4", linkageName: "get4", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 13, file: !47, scope: !1, type: !3, variables: !45) +!9 = distinct !DISubprogram(name: "get5", linkageName: "get5", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 16, file: !47, scope: !1, type: !3, variables: !46) !10 = !DILocalVariable(name: "a", line: 4, arg: 1, scope: !0, file: !1, type: !5) !11 = !DILocalVariable(name: "b", line: 4, scope: !12, file: !1, type: !5) !12 = distinct !DILexicalBlock(line: 4, column: 0, file: !47, scope: !0) @@ -118,7 +118,6 @@ !37 = !DILocation(line: 13, scope: !26) !38 = !DILocation(line: 16, scope: !9) !39 = !DILocation(line: 16, scope: !29) -!40 = !{!0, !6, !7, !8, !9} !41 = !{!13, !14, !15, !16, !17} !42 = !{!10, !11} !43 = !{!18, !19} Index: test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll =================================================================== --- test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll +++ test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll @@ -73,16 +73,16 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!49} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, subprograms: !40, globals: !41, imports: !48) -!1 = distinct !DISubprogram(name: "get1", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !47, scope: !2, type: !3, variables: !42) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, globals: !41, imports: !48) +!1 = distinct !DISubprogram(name: "get1", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !47, scope: !2, type: !3, variables: !42) !2 = !DIFile(filename: "ss3.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "get2", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !47, scope: !2, type: !3, variables: !43) -!7 = distinct !DISubprogram(name: "get3", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !47, scope: !2, type: !3, variables: !44) -!8 = distinct !DISubprogram(name: "get4", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 14, file: !47, scope: !2, type: !3, variables: !45) -!9 = distinct !DISubprogram(name: "get5", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 17, file: !47, scope: !2, type: !3, variables: !46) +!6 = distinct !DISubprogram(name: "get2", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 8, file: !47, scope: !2, type: !3, variables: !43) +!7 = distinct !DISubprogram(name: "get3", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !47, scope: !2, type: !3, variables: !44) +!8 = distinct !DISubprogram(name: "get4", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !47, scope: !2, type: !3, variables: !45) +!9 = distinct !DISubprogram(name: "get5", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 17, file: !47, scope: !2, type: !3, variables: !46) !10 = !DILocalVariable(name: "a", line: 5, arg: 1, scope: !1, file: !2, type: !5) !11 = !DILocalVariable(name: "b", line: 5, scope: !12, file: !2, type: !5) !12 = distinct !DILexicalBlock(line: 5, column: 19, file: !47, scope: !1) @@ -110,7 +110,6 @@ !37 = !DILocation(line: 14, column: 32, scope: !21) !38 = !DILocation(line: 17, column: 16, scope: !9) !39 = !DILocation(line: 17, column: 32, scope: !29) -!40 = !{!1, !6, !7, !8, !9} !41 = !{!25, !26} !42 = !{!10, !11} !43 = !{!13, !14} Index: test/CodeGen/ARM/arm-shrink-wrapping.ll =================================================================== --- test/CodeGen/ARM/arm-shrink-wrapping.ll +++ test/CodeGen/ARM/arm-shrink-wrapping.ll @@ -677,7 +677,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "LLVM", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "LLVM", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "b") !2 = !{} !3 = !{i32 2, !"Debug Info Version", i32 3} Index: test/CodeGen/ARM/coalesce-dbgvalue.ll =================================================================== --- test/CodeGen/ARM/coalesce-dbgvalue.ll +++ test/CodeGen/ARM/coalesce-dbgvalue.ll @@ -79,11 +79,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!33} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 182024) (llvm/trunk 182023)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !15, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 182024) (llvm/trunk 182023)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !15, imports: !2) !1 = !DIFile(filename: "pr16110.c", directory: "/d/b") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "pr16110", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "pr16110", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "pr16110.c", directory: "/d/b") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/CodeGen/ARM/debug-frame-vararg.ll =================================================================== --- test/CodeGen/ARM/debug-frame-vararg.ll +++ test/CodeGen/ARM/debug-frame-vararg.ll @@ -25,11 +25,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "var.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "sum", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "sum", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "var.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/CodeGen/ARM/debug-frame.ll =================================================================== --- test/CodeGen/ARM/debug-frame.ll +++ test/CodeGen/ARM/debug-frame.ll @@ -125,11 +125,10 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "exp.cpp", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testiiiiiddddd", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testiiiiiddddd", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "exp.cpp", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null, !8, !8, !8, !8, !8, !9, !9, !9, !9, !9} Index: test/CodeGen/ARM/debug-info-arg.ll =================================================================== --- test/CodeGen/ARM/debug-info-arg.ll +++ test/CodeGen/ARM/debug-info-arg.ll @@ -32,8 +32,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!33} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !{}, retainedTypes: !{}, subprograms: !30, imports: null) -!1 = distinct !DISubprogram(name: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !2, scope: !2, type: !3, variables: !31) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !{}, retainedTypes: !{}, imports: null) +!1 = distinct !DISubprogram(name: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !2, scope: !2, type: !3, variables: !31) !2 = !DIFile(filename: "one.c", directory: "/Volumes/Athwagate/R10048772") !3 = !DISubroutineType(types: !4) !4 = !{null} @@ -62,7 +62,6 @@ !27 = distinct !DILexicalBlock(line: 11, column: 107, file: !2, scope: !1) !28 = !DILocation(line: 13, column: 5, scope: !27) !29 = !DILocation(line: 14, column: 1, scope: !27) -!30 = !{!1} !31 = !{!5, !13, !14, !17, !18, !19} !32 = !DIFile(filename: "one.c", directory: "/Volumes/Athwagate/R10048772") !33 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/ARM/debug-info-blocks.ll =================================================================== --- test/CodeGen/ARM/debug-info-blocks.ll +++ test/CodeGen/ARM/debug-info-blocks.ll @@ -111,7 +111,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!162} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "Apple clang version 2.1", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !153, enums: !147, retainedTypes: !{}, subprograms: !148) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "Apple clang version 2.1", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !153, enums: !147, retainedTypes: !{}) !1 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 248, size: 32, align: 32, file: !160, scope: !0, elements: !3) !2 = !DIFile(filename: "header.h", directory: "/Volumes/Sandbox/llvm") !3 = !{!4} @@ -134,7 +134,7 @@ !20 = !DIFile(filename: "header4.h", directory: "/Volumes/Sandbox/llvm") !21 = !{!22} !22 = !DIEnumerator(name: "Eleven", value: 0) ; [ DW_TAG_enumerator ] -!23 = distinct !DISubprogram(name: "foobar_func_block_invoke_0", line: 609, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 609, file: !152, scope: !24, type: !25) +!23 = distinct !DISubprogram(name: "foobar_func_block_invoke_0", line: 609, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 609, file: !152, scope: !24, type: !25) !24 = !DIFile(filename: "MyLibrary.m", directory: "/Volumes/Sandbox/llvm") !25 = !DISubroutineType(types: !26) !26 = !{null} @@ -259,7 +259,6 @@ !145 = !DILocation(line: 613, column: 17, scope: !142) !146 = !DILocation(line: 615, column: 13, scope: !142) !147 = !{!1, !1, !5, !5, !9, !14, !19, !19, !14, !14, !14, !19, !19, !19} -!148 = !{!23} !149 = !DIFile(filename: "header3.h", directory: "/Volumes/Sandbox/llvm") !150 = !DIFile(filename: "Private.h", directory: "/Volumes/Sandbox/llvm") !151 = !DIFile(filename: "header4.h", directory: "/Volumes/Sandbox/llvm") Index: test/CodeGen/ARM/debug-info-branch-folding.ll =================================================================== --- test/CodeGen/ARM/debug-info-branch-folding.ll +++ test/CodeGen/ARM/debug-info-branch-folding.ll @@ -42,9 +42,9 @@ !llvm.module.flags = !{!56} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "test0001", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !54, scope: null, type: !3, variables: !51) +!0 = distinct !DISubprogram(name: "test0001", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !54, scope: null, type: !3, variables: !51) !1 = !DIFile(filename: "build2.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !54, enums: !{}, retainedTypes: !{}, subprograms: !50, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !54, enums: !{}, retainedTypes: !{}, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4f32", line: 14, file: !54, scope: !2, baseType: !6) @@ -52,11 +52,11 @@ !7 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) !8 = !{!9} !9 = !DISubrange(count: 4) -!10 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !54, scope: null, type: !11, variables: !52) +!10 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !54, scope: null, type: !11, variables: !52) !11 = !DISubroutineType(types: !12) !12 = !{!13} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = distinct !DISubprogram(name: "printFV", line: 41, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !55, scope: null, type: !16, variables: !53) +!14 = distinct !DISubprogram(name: "printFV", line: 41, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !55, scope: null, type: !16, variables: !53) !15 = !DIFile(filename: "/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/UnitTests/Vector/helpers.h", directory: "/private/tmp") !16 = !DISubroutineType(types: !17) !17 = !{null} @@ -92,7 +92,6 @@ !47 = distinct !DILexicalBlock(line: 41, column: 28, file: !15, scope: !14) !48 = !DILocation(line: 95, column: 3, scope: !25) !49 = !DILocation(line: 99, column: 3, scope: !25) -!50 = !{!0, !10, !14} !51 = !{!18} !52 = !{!19, !20, !24, !26, !27, !28, !29} !53 = !{!30} Index: test/CodeGen/ARM/debug-info-d16-reg.ll =================================================================== --- test/CodeGen/ARM/debug-info-d16-reg.ll +++ test/CodeGen/ARM/debug-info-d16-reg.ll @@ -59,17 +59,17 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!48} -!0 = distinct !DISubprogram(name: "printer", linkageName: "printer", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !46, scope: !1, type: !3, variables: !43) +!0 = distinct !DISubprogram(name: "printer", linkageName: "printer", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 12, file: !46, scope: !1, type: !3, variables: !43) !1 = !DIFile(filename: "a.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "(LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !46, enums: !47, retainedTypes: !47, subprograms: !42, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "(LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !46, enums: !47, retainedTypes: !47, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5, !6, !7, !8} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !46, scope: !1, baseType: null) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 32, encoding: DW_ATE_float) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) -!9 = distinct !DISubprogram(name: "inlineprinter", linkageName: "inlineprinter", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !46, scope: !1, type: !3, variables: !44) -!10 = distinct !DISubprogram(name: "main", linkageName: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !46, scope: !1, type: !11, variables: !45) +!9 = distinct !DISubprogram(name: "inlineprinter", linkageName: "inlineprinter", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 5, file: !46, scope: !1, type: !3, variables: !44) +!10 = distinct !DISubprogram(name: "main", linkageName: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 18, file: !46, scope: !1, type: !11, variables: !45) !11 = !DISubroutineType(types: !12) !12 = !{!5, !5, !13} !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !46, scope: !1, baseType: !14) @@ -106,7 +106,6 @@ !39 = !DILocation(line: 6, scope: !28, inlinedAt: !37) !40 = !DILocation(line: 22, scope: !25) !41 = !DILocation(line: 23, scope: !25) -!42 = !{!0, !9, !10} !43 = !{!16, !17, !18} !44 = !{!19, !20, !21} !45 = !{!22, !23, !24} Index: test/CodeGen/ARM/debug-info-no-frame.ll =================================================================== --- test/CodeGen/ARM/debug-info-no-frame.ll +++ test/CodeGen/ARM/debug-info-no-frame.ll @@ -21,10 +21,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !{!3}, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "file.c", directory: "/dir") !2 = !{} -!3 = distinct !DISubprogram(name: "need_cfi_def_cfa_offset", scope: !1, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!3 = distinct !DISubprogram(name: "need_cfi_def_cfa_offset", scope: !1, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !4 = !DISubroutineType(types: !5) !5 = !{null} !6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/ARM/debug-info-qreg.ll =================================================================== --- test/CodeGen/ARM/debug-info-qreg.ll +++ test/CodeGen/ARM/debug-info-qreg.ll @@ -38,9 +38,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!56} -!0 = distinct !DISubprogram(name: "test0001", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !54, scope: !1, type: !3, variables: !51) +!0 = distinct !DISubprogram(name: "test0001", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 3, file: !54, scope: !1, type: !3, variables: !51) !1 = !DIFile(filename: "build2.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !54, enums: !{}, retainedTypes: !{}, subprograms: !50, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !54, enums: !{}, retainedTypes: !{}, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4f32", line: 14, file: !54, scope: !2, baseType: !6) @@ -48,11 +48,11 @@ !7 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) !8 = !{!9} !9 = !DISubrange(count: 4) -!10 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 59, file: !54, scope: !1, type: !11, variables: !52) +!10 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 59, file: !54, scope: !1, type: !11, variables: !52) !11 = !DISubroutineType(types: !12) !12 = !{!13} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = distinct !DISubprogram(name: "printFV", line: 41, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 41, file: !55, scope: !15, type: !16, variables: !53) +!14 = distinct !DISubprogram(name: "printFV", line: 41, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 41, file: !55, scope: !15, type: !16, variables: !53) !15 = !DIFile(filename: "/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/UnitTests/Vector/helpers.h", directory: "/private/tmp") !16 = !DISubroutineType(types: !17) !17 = !{null} @@ -88,7 +88,6 @@ !47 = distinct !DILexicalBlock(line: 41, column: 28, file: !55, scope: !14) !48 = !DILocation(line: 95, column: 3, scope: !25) !49 = !DILocation(line: 99, column: 3, scope: !25) -!50 = !{!0, !10, !14} !51 = !{!18} !52 = !{!19, !20, !24, !26, !27, !28, !29} !53 = !{!30} Index: test/CodeGen/ARM/debug-info-s16-reg.ll =================================================================== --- test/CodeGen/ARM/debug-info-s16-reg.ll +++ test/CodeGen/ARM/debug-info-s16-reg.ll @@ -65,14 +65,14 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!53} -!0 = distinct !DISubprogram(name: "inlineprinter", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !51, scope: !1, type: !3, variables: !48) +!0 = distinct !DISubprogram(name: "inlineprinter", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 5, file: !51, scope: !1, type: !3, variables: !48) !1 = !DIFile(filename: "a.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !51, enums: !52, retainedTypes: !52, subprograms: !47, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !51, enums: !52, retainedTypes: !52, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "printer", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !51, scope: !1, type: !3, variables: !49) -!7 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !51, scope: !1, type: !3, variables: !50) +!6 = distinct !DISubprogram(name: "printer", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 12, file: !51, scope: !1, type: !3, variables: !49) +!7 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 18, file: !51, scope: !1, type: !3, variables: !50) !8 = !DILocalVariable(name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9) !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: null) !10 = !DILocalVariable(name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11) @@ -117,7 +117,6 @@ !44 = !DILocation(line: 6, column: 3, scope: !28, inlinedAt: !40) !45 = !DILocation(line: 22, column: 3, scope: !23) !46 = !DILocation(line: 23, column: 1, scope: !23) -!47 = !{!0, !6, !7} !48 = !{!8, !10, !12} !49 = !{!14, !15, !16} !50 = !{!17, !18, !22} Index: test/CodeGen/ARM/debug-info-sreg2.ll =================================================================== --- test/CodeGen/ARM/debug-info-sreg2.ll +++ test/CodeGen/ARM/debug-info-sreg2.ll @@ -43,8 +43,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !16, imports: null) -!1 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !18, scope: !2, type: !3, variables: !17) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null) +!1 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !18, scope: !2, type: !3, variables: !17) !2 = !DIFile(filename: "k.cc", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{null} @@ -59,7 +59,6 @@ !13 = !DILocation(line: 8, column: 20, scope: !9) !14 = !DILocation(line: 7, column: 20, scope: !10) !15 = !DILocation(line: 10, column: 1, scope: !6) -!16 = !{!1} !17 = !{!5, !8} !18 = !DIFile(filename: "k.cc", directory: "/private/tmp") !19 = !{} Index: test/CodeGen/ARM/debug-segmented-stacks.ll =================================================================== --- test/CodeGen/ARM/debug-segmented-stacks.ll +++ test/CodeGen/ARM/debug-segmented-stacks.ll @@ -39,11 +39,10 @@ ; ARM-linux .cfi_same_value r5 } -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "var.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test_basic", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test_basic", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "var.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/CodeGen/ARM/vfp-regs-dwarf.ll =================================================================== --- test/CodeGen/ARM/vfp-regs-dwarf.ll +++ test/CodeGen/ARM/vfp-regs-dwarf.ll @@ -31,11 +31,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "tmp.c", directory: "/Users/tim/llvm/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "tmp.c", directory: "/Users/tim/llvm/build") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/CodeGen/Hexagon/cfi-late.ll =================================================================== --- test/CodeGen/Hexagon/cfi-late.ll +++ test/CodeGen/Hexagon/cfi-late.ll @@ -41,11 +41,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git 15506a21305e212c406f980ed9b6b1bac785df56)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git 15506a21305e212c406f980ed9b6b1bac785df56)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "cfi-late.c", directory: "/test") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/Hexagon/hwloop-dbg.ll =================================================================== --- test/CodeGen/Hexagon/hwloop-dbg.ll +++ test/CodeGen/Hexagon/hwloop-dbg.ll @@ -37,10 +37,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "QuIC LLVM Hexagon Clang version 6.1-pre-unknown, (git://git-hexagon-aus.quicinc.com/llvm/clang-mainline.git e9382867661454cdf44addb39430741578e9765c) (llvm/llvm-mainline.git 36412bb1fcf03ed426d4437b41198bae066675ac)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "QuIC LLVM Hexagon Clang version 6.1-pre-unknown, (git://git-hexagon-aus.quicinc.com/llvm/clang-mainline.git e9382867661454cdf44addb39430741578e9765c) (llvm/llvm-mainline.git 36412bb1fcf03ed426d4437b41198bae066675ac)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !28, scope: null, type: !7, variables: !11) +!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !28, scope: null, type: !7, variables: !11) !6 = !DIFile(filename: "hwloop-dbg.c", directory: "/usr2/kparzysz/s.hex/t") !7 = !DISubroutineType(types: !8) !8 = !{null, !9, !9} Index: test/CodeGen/Inputs/DbgValueOtherTargets.ll =================================================================== --- test/CodeGen/Inputs/DbgValueOtherTargets.ll +++ test/CodeGen/Inputs/DbgValueOtherTargets.ll @@ -14,9 +14,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!13} -!0 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !12, scope: !1, type: !3) !1 = !DIFile(filename: "/tmp/x.c", directory: "/Users/manav") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 120996)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !6, retainedTypes: !6, subprograms: !11) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 120996)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !6, retainedTypes: !6) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -25,6 +25,5 @@ !8 = distinct !DILexicalBlock(line: 2, column: 12, file: !12, scope: !0) !9 = !DILocation(line: 3, column: 11, scope: !8) !10 = !DILocation(line: 4, column: 2, scope: !8) -!11 = !{!0} !12 = !DIFile(filename: "/tmp/x.c", directory: "/Users/manav") !13 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir =================================================================== --- test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir +++ test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir @@ -39,11 +39,10 @@ !llvm.module.flags = !{!22, !23, !24, !25} !llvm.ident = !{!26} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (llvm/trunk 237059)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (llvm/trunk 237059)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/Users/compnerd/Source/llvm") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !17) + !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !17) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8, !11, !12, !16} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/MIR/ARM/sched-it-debug-nodes.mir =================================================================== --- test/CodeGen/MIR/ARM/sched-it-debug-nodes.mir +++ test/CodeGen/MIR/ARM/sched-it-debug-nodes.mir @@ -50,11 +50,10 @@ !llvm.module.flags = !{!22, !23, !24, !25} !llvm.ident = !{!26} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (llvm/trunk 237059)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (llvm/trunk 237059)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/Users/compnerd/Source/llvm") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !17) + !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !17) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8, !11, !12, !16} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/MIR/X86/expected-metadata-node-after-debug-location.mir =================================================================== --- test/CodeGen/MIR/X86/expected-metadata-node-after-debug-location.mir +++ test/CodeGen/MIR/X86/expected-metadata-node-after-debug-location.mir @@ -20,11 +20,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.ll", directory: "") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) + !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/CodeGen/MIR/X86/expected-metadata-node-after-exclaim.mir =================================================================== --- test/CodeGen/MIR/X86/expected-metadata-node-after-exclaim.mir +++ test/CodeGen/MIR/X86/expected-metadata-node-after-exclaim.mir @@ -20,11 +20,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.ll", directory: "") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) + !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/CodeGen/MIR/X86/instructions-debug-location.mir =================================================================== --- test/CodeGen/MIR/X86/instructions-debug-location.mir +++ test/CodeGen/MIR/X86/instructions-debug-location.mir @@ -31,11 +31,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.ll", directory: "") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) + !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} @@ -62,9 +61,9 @@ body: | bb.0.entry: liveins: %edi - ; CHECK: DBG_VALUE debug-use _, 0, !12, !13, debug-location !14 - ; CHECK: %eax = COPY %0, debug-location !15 - ; CHECK: RETQ %eax, debug-location !15 + ; CHECK: DBG_VALUE debug-use _, 0, !11, !12, debug-location !13 + ; CHECK: %eax = COPY %0, debug-location !14 + ; CHECK: RETQ %eax, debug-location !14 %0 = COPY %edi DBG_VALUE debug-use _, 0, !12, !13, debug-location !14 MOV32mr %stack.0.x.addr, 1, _, 0, _, %0 @@ -86,9 +85,9 @@ liveins: %edi %0 = COPY %edi - ; CHECK: DBG_VALUE _, i32 0, !12, !13 - ; CHECK-NEXT: DBG_VALUE _, i64 -22, !12, !13 - ; CHECK-NEXT: DBG_VALUE _, i128 123492148938512984928424384934328985928, !12, !13 + ; CHECK: DBG_VALUE _, i32 0, !11, !12 + ; CHECK-NEXT: DBG_VALUE _, i64 -22, !11, !12 + ; CHECK-NEXT: DBG_VALUE _, i128 123492148938512984928424384934328985928, !11, !12 DBG_VALUE _, i32 0, !12, !13 DBG_VALUE _, i64 -22, !12, !13 DBG_VALUE _, i128 123492148938512984928424384934328985928, !12, !13 Index: test/CodeGen/MIR/X86/invalid-metadata-node-type.mir =================================================================== --- test/CodeGen/MIR/X86/invalid-metadata-node-type.mir +++ test/CodeGen/MIR/X86/invalid-metadata-node-type.mir @@ -22,12 +22,12 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3} - !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !{!5}) + !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2) !1 = !DIFile(filename: "t.c", directory: "") !2 = !{} !3 = !{i32 1, !"Debug Info Version", i32 3} !4 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 16, type: !6) - !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false) + !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0) !6 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !7 = !DIExpression() !8 = !DILocation(line: 0, scope: !5) Index: test/CodeGen/MIR/X86/metadata-operands.mir =================================================================== --- test/CodeGen/MIR/X86/metadata-operands.mir +++ test/CodeGen/MIR/X86/metadata-operands.mir @@ -22,11 +22,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.ll", directory: "") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) + !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} @@ -54,7 +53,7 @@ bb.0.entry: liveins: %edi ; CHECK: %0 = COPY %edi - ; CHECK-NEXT: DBG_VALUE _, 0, !12, !13 + ; CHECK-NEXT: DBG_VALUE _, 0, !11, !12 %0 = COPY %edi DBG_VALUE _, 0, !12, ! 13 MOV32mr %stack.0.x.addr, 1, _, 0, _, %0 Index: test/CodeGen/MIR/X86/stack-object-debug-info.mir =================================================================== --- test/CodeGen/MIR/X86/stack-object-debug-info.mir +++ test/CodeGen/MIR/X86/stack-object-debug-info.mir @@ -31,13 +31,12 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3} - !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, - subprograms: !{!5}) + !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2) !1 = !DIFile(filename: "t.c", directory: "") !2 = !{} !3 = !{i32 1, !"Debug Info Version", i32 3} !4 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 16, type: !9) - !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false) + !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0) !6 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !7 = !DIExpression() !8 = !DILocation(line: 0, scope: !5) @@ -53,8 +52,8 @@ maxAlignment: 16 # CHECK-LABEL: foo # CHECK: stack: -# CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!6', -# CHECK-NEXT: di-expression: '!11', di-location: '!12' } +# CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4', +# CHECK-NEXT: di-expression: '!10', di-location: '!11' } stack: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4', di-expression: '!7', di-location: '!8' } Index: test/CodeGen/MIR/X86/unknown-metadata-node.mir =================================================================== --- test/CodeGen/MIR/X86/unknown-metadata-node.mir +++ test/CodeGen/MIR/X86/unknown-metadata-node.mir @@ -20,11 +20,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.ll", directory: "") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) + !4 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/CodeGen/NVPTX/debug-file-loc.ll =================================================================== --- test/CodeGen/NVPTX/debug-file-loc.ll +++ test/CodeGen/NVPTX/debug-file-loc.ll @@ -30,14 +30,13 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) !1 = !DIFile(filename: "bar.cu", directory: "/source/dir") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "foo.h", directory: "/source/dir") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 2, !"Debug Info Version", i32 3} !10 = !DILocation(line: 1, column: 31, scope: !4) Index: test/CodeGen/PowerPC/dbg.ll =================================================================== --- test/CodeGen/PowerPC/dbg.ll +++ test/CodeGen/PowerPC/dbg.ll @@ -17,10 +17,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1", isOptimized: true, emissionKind: FullDebug, file: !21, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1", isOptimized: true, emissionKind: FullDebug, file: !21, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !21, scope: null, type: !7, variables: !13) +!5 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, file: !21, scope: null, type: !7, variables: !13) !6 = !DIFile(filename: "dbg.c", directory: "/src") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9, !10} Index: test/CodeGen/PowerPC/pr17168.ll =================================================================== --- test/CodeGen/PowerPC/pr17168.ll +++ test/CodeGen/PowerPC/pr17168.ll @@ -54,11 +54,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!438, !464} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 190311)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !298, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 190311)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !298, imports: !2) !1 = !DIFile(filename: "bt.c", directory: "/home/hfinkel/src/NPB2.3-omp-C/BT") !2 = !{} -!3 = !{!4, !82, !102, !114, !132, !145, !154, !155, !162, !183, !200, !201, !207, !208, !215, !221, !230, !238, !246, !255, !260, !261, !268, !274, !279, !280, !287, !293} -!4 = distinct !DISubprogram(name: "main", line: 74, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 74, file: !1, scope: !5, type: !6, variables: !12) +!4 = distinct !DISubprogram(name: "main", line: 74, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 74, file: !1, scope: !5, type: !6, variables: !12) !5 = !DIFile(filename: "bt.c", directory: "/home/hfinkel/src/NPB2.3-omp-C/BT") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8, !9} @@ -136,7 +135,7 @@ !79 = !DICompositeType(tag: DW_TAG_array_type, size: 160, align: 8, baseType: !11, elements: !80) !80 = !{!81} !81 = !DISubrange(count: 20) -!82 = distinct !DISubprogram(name: "verify", line: 2388, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2388, file: !1, scope: !5, type: !83, variables: !86) +!82 = distinct !DISubprogram(name: "verify", line: 2388, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2388, file: !1, scope: !5, type: !83, variables: !86) !83 = !DISubroutineType(types: !84) !84 = !{null, !8, !10, !85} !85 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !24) @@ -156,7 +155,7 @@ !99 = !DILocalVariable(name: "xcr", line: 2398, scope: !82, file: !5, type: !91) !100 = !DILocalVariable(name: "dtref", line: 2398, scope: !82, file: !5, type: !20) !101 = !DILocalVariable(name: "m", line: 2399, scope: !82, file: !5, type: !8) -!102 = distinct !DISubprogram(name: "rhs_norm", line: 266, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 266, file: !1, scope: !5, type: !103, variables: !106) +!102 = distinct !DISubprogram(name: "rhs_norm", line: 266, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 266, file: !1, scope: !5, type: !103, variables: !106) !103 = !DISubroutineType(types: !104) !104 = !{null, !105} !105 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !20) @@ -168,7 +167,7 @@ !111 = !DILocalVariable(name: "d", line: 271, scope: !102, file: !5, type: !8) !112 = !DILocalVariable(name: "m", line: 271, scope: !102, file: !5, type: !8) !113 = !DILocalVariable(name: "add", line: 272, scope: !102, file: !5, type: !20) -!114 = distinct !DISubprogram(name: "compute_rhs", line: 1767, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1767, file: !1, scope: !5, type: !115, variables: !117) +!114 = distinct !DISubprogram(name: "compute_rhs", line: 1767, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1767, file: !1, scope: !5, type: !115, variables: !117) !115 = !DISubroutineType(types: !116) !116 = !{null} !117 = !{!118, !119, !120, !121, !122, !123, !124, !125, !126, !127, !128, !129, !130, !131} @@ -186,7 +185,7 @@ !129 = !DILocalVariable(name: "wijk", line: 1770, scope: !114, file: !5, type: !20) !130 = !DILocalVariable(name: "wp1", line: 1770, scope: !114, file: !5, type: !20) !131 = !DILocalVariable(name: "wm1", line: 1770, scope: !114, file: !5, type: !20) -!132 = distinct !DISubprogram(name: "error_norm", line: 225, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 225, file: !1, scope: !5, type: !103, variables: !133) +!132 = distinct !DISubprogram(name: "error_norm", line: 225, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 225, file: !1, scope: !5, type: !103, variables: !133) !133 = !{!134, !135, !136, !137, !138, !139, !140, !141, !142, !143, !144} !134 = !DILocalVariable(name: "rms", line: 225, arg: 1, scope: !132, file: !5, type: !105) !135 = !DILocalVariable(name: "i", line: 232, scope: !132, file: !5, type: !8) @@ -199,7 +198,7 @@ !142 = !DILocalVariable(name: "zeta", line: 233, scope: !132, file: !5, type: !20) !143 = !DILocalVariable(name: "u_exact", line: 233, scope: !132, file: !5, type: !91) !144 = !DILocalVariable(name: "add", line: 233, scope: !132, file: !5, type: !20) -!145 = distinct !DISubprogram(name: "exact_solution", line: 643, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 644, file: !1, scope: !5, type: !146, variables: !148) +!145 = distinct !DISubprogram(name: "exact_solution", line: 643, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 644, file: !1, scope: !5, type: !146, variables: !148) !146 = !DISubroutineType(types: !147) !147 = !{null, !20, !20, !20, !105} !148 = !{!149, !150, !151, !152, !153} @@ -208,15 +207,15 @@ !151 = !DILocalVariable(name: "zeta", line: 643, arg: 3, scope: !145, file: !5, type: !20) !152 = !DILocalVariable(name: "dtemp", line: 644, arg: 4, scope: !145, file: !5, type: !105) !153 = !DILocalVariable(name: "m", line: 653, scope: !145, file: !5, type: !8) -!154 = distinct !DISubprogram(name: "set_constants", line: 2191, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2191, file: !1, scope: !5, type: !115, variables: !2) -!155 = distinct !DISubprogram(name: "lhsinit", line: 855, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 855, file: !1, scope: !5, type: !115, variables: !156) +!154 = distinct !DISubprogram(name: "set_constants", line: 2191, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2191, file: !1, scope: !5, type: !115, variables: !2) +!155 = distinct !DISubprogram(name: "lhsinit", line: 855, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 855, file: !1, scope: !5, type: !115, variables: !156) !156 = !{!157, !158, !159, !160, !161} !157 = !DILocalVariable(name: "i", line: 857, scope: !155, file: !5, type: !8) !158 = !DILocalVariable(name: "j", line: 857, scope: !155, file: !5, type: !8) !159 = !DILocalVariable(name: "k", line: 857, scope: !155, file: !5, type: !8) !160 = !DILocalVariable(name: "m", line: 857, scope: !155, file: !5, type: !8) !161 = !DILocalVariable(name: "n", line: 857, scope: !155, file: !5, type: !8) -!162 = distinct !DISubprogram(name: "initialize", line: 669, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 669, file: !1, scope: !5, type: !115, variables: !163) +!162 = distinct !DISubprogram(name: "initialize", line: 669, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 669, file: !1, scope: !5, type: !115, variables: !163) !163 = !{!164, !165, !166, !167, !168, !169, !170, !171, !172, !173, !174, !179, !180, !181, !182} !164 = !DILocalVariable(name: "i", line: 679, scope: !162, file: !5, type: !8) !165 = !DILocalVariable(name: "j", line: 679, scope: !162, file: !5, type: !8) @@ -237,7 +236,7 @@ !180 = !DILocalVariable(name: "Peta", line: 680, scope: !162, file: !5, type: !20) !181 = !DILocalVariable(name: "Pzeta", line: 680, scope: !162, file: !5, type: !20) !182 = !DILocalVariable(name: "temp", line: 680, scope: !162, file: !5, type: !91) -!183 = distinct !DISubprogram(name: "exact_rhs", line: 301, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 301, file: !1, scope: !5, type: !115, variables: !184) +!183 = distinct !DISubprogram(name: "exact_rhs", line: 301, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 301, file: !1, scope: !5, type: !115, variables: !184) !184 = !{!185, !186, !187, !188, !189, !190, !191, !192, !193, !194, !195, !196, !197, !198, !199} !185 = !DILocalVariable(name: "dtemp", line: 310, scope: !183, file: !5, type: !91) !186 = !DILocalVariable(name: "xi", line: 310, scope: !183, file: !5, type: !20) @@ -254,28 +253,28 @@ !197 = !DILocalVariable(name: "jm1", line: 311, scope: !183, file: !5, type: !8) !198 = !DILocalVariable(name: "km1", line: 311, scope: !183, file: !5, type: !8) !199 = !DILocalVariable(name: "kp1", line: 311, scope: !183, file: !5, type: !8) -!200 = distinct !DISubprogram(name: "adi", line: 210, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 210, file: !1, scope: !5, type: !115, variables: !2) -!201 = distinct !DISubprogram(name: "add", line: 187, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 187, file: !1, scope: !5, type: !115, variables: !202) +!200 = distinct !DISubprogram(name: "adi", line: 210, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 210, file: !1, scope: !5, type: !115, variables: !2) +!201 = distinct !DISubprogram(name: "add", line: 187, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 187, file: !1, scope: !5, type: !115, variables: !202) !202 = !{!203, !204, !205, !206} !203 = !DILocalVariable(name: "i", line: 193, scope: !201, file: !5, type: !8) !204 = !DILocalVariable(name: "j", line: 193, scope: !201, file: !5, type: !8) !205 = !DILocalVariable(name: "k", line: 193, scope: !201, file: !5, type: !8) !206 = !DILocalVariable(name: "m", line: 193, scope: !201, file: !5, type: !8) -!207 = distinct !DISubprogram(name: "z_solve", line: 3457, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3457, file: !1, scope: !5, type: !115, variables: !2) -!208 = distinct !DISubprogram(name: "z_backsubstitute", line: 3480, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3480, file: !1, scope: !5, type: !115, variables: !209) +!207 = distinct !DISubprogram(name: "z_solve", line: 3457, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3457, file: !1, scope: !5, type: !115, variables: !2) +!208 = distinct !DISubprogram(name: "z_backsubstitute", line: 3480, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3480, file: !1, scope: !5, type: !115, variables: !209) !209 = !{!210, !211, !212, !213, !214} !210 = !DILocalVariable(name: "i", line: 3492, scope: !208, file: !5, type: !8) !211 = !DILocalVariable(name: "j", line: 3492, scope: !208, file: !5, type: !8) !212 = !DILocalVariable(name: "k", line: 3492, scope: !208, file: !5, type: !8) !213 = !DILocalVariable(name: "m", line: 3492, scope: !208, file: !5, type: !8) !214 = !DILocalVariable(name: "n", line: 3492, scope: !208, file: !5, type: !8) -!215 = distinct !DISubprogram(name: "z_solve_cell", line: 3512, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3512, file: !1, scope: !5, type: !115, variables: !216) +!215 = distinct !DISubprogram(name: "z_solve_cell", line: 3512, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3512, file: !1, scope: !5, type: !115, variables: !216) !216 = !{!217, !218, !219, !220} !217 = !DILocalVariable(name: "i", line: 3527, scope: !215, file: !5, type: !8) !218 = !DILocalVariable(name: "j", line: 3527, scope: !215, file: !5, type: !8) !219 = !DILocalVariable(name: "k", line: 3527, scope: !215, file: !5, type: !8) !220 = !DILocalVariable(name: "ksize", line: 3527, scope: !215, file: !5, type: !8) -!221 = distinct !DISubprogram(name: "binvrhs", line: 3154, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3154, file: !1, scope: !5, type: !222, variables: !225) +!221 = distinct !DISubprogram(name: "binvrhs", line: 3154, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3154, file: !1, scope: !5, type: !222, variables: !225) !222 = !DISubroutineType(types: !223) !223 = !{null, !224, !105} !224 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !91) @@ -284,7 +283,7 @@ !227 = !DILocalVariable(name: "r", line: 3154, arg: 2, scope: !221, file: !5, type: !105) !228 = !DILocalVariable(name: "pivot", line: 3159, scope: !221, file: !5, type: !20) !229 = !DILocalVariable(name: "coeff", line: 3159, scope: !221, file: !5, type: !20) -!230 = distinct !DISubprogram(name: "matmul_sub", line: 2841, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2842, file: !1, scope: !5, type: !231, variables: !233) +!230 = distinct !DISubprogram(name: "matmul_sub", line: 2841, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2842, file: !1, scope: !5, type: !231, variables: !233) !231 = !DISubroutineType(types: !232) !232 = !{null, !224, !224, !224} !233 = !{!234, !235, !236, !237} @@ -292,7 +291,7 @@ !235 = !DILocalVariable(name: "bblock", line: 2841, arg: 2, scope: !230, file: !5, type: !224) !236 = !DILocalVariable(name: "cblock", line: 2842, arg: 3, scope: !230, file: !5, type: !224) !237 = !DILocalVariable(name: "j", line: 2851, scope: !230, file: !5, type: !8) -!238 = distinct !DISubprogram(name: "matvec_sub", line: 2814, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2814, file: !1, scope: !5, type: !239, variables: !241) +!238 = distinct !DISubprogram(name: "matvec_sub", line: 2814, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2814, file: !1, scope: !5, type: !239, variables: !241) !239 = !DISubroutineType(types: !240) !240 = !{null, !224, !105, !105} !241 = !{!242, !243, !244, !245} @@ -300,7 +299,7 @@ !243 = !DILocalVariable(name: "avec", line: 2814, arg: 2, scope: !238, file: !5, type: !105) !244 = !DILocalVariable(name: "bvec", line: 2814, arg: 3, scope: !238, file: !5, type: !105) !245 = !DILocalVariable(name: "i", line: 2823, scope: !238, file: !5, type: !8) -!246 = distinct !DISubprogram(name: "binvcrhs", line: 2885, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2885, file: !1, scope: !5, type: !247, variables: !249) +!246 = distinct !DISubprogram(name: "binvcrhs", line: 2885, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2885, file: !1, scope: !5, type: !247, variables: !249) !247 = !DISubroutineType(types: !248) !248 = !{null, !224, !224, !105} !249 = !{!250, !251, !252, !253, !254} @@ -309,45 +308,45 @@ !252 = !DILocalVariable(name: "r", line: 2885, arg: 3, scope: !246, file: !5, type: !105) !253 = !DILocalVariable(name: "pivot", line: 2890, scope: !246, file: !5, type: !20) !254 = !DILocalVariable(name: "coeff", line: 2890, scope: !246, file: !5, type: !20) -!255 = distinct !DISubprogram(name: "lhsz", line: 1475, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1475, file: !1, scope: !5, type: !115, variables: !256) +!255 = distinct !DISubprogram(name: "lhsz", line: 1475, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1475, file: !1, scope: !5, type: !115, variables: !256) !256 = !{!257, !258, !259} !257 = !DILocalVariable(name: "i", line: 1484, scope: !255, file: !5, type: !8) !258 = !DILocalVariable(name: "j", line: 1484, scope: !255, file: !5, type: !8) !259 = !DILocalVariable(name: "k", line: 1484, scope: !255, file: !5, type: !8) -!260 = distinct !DISubprogram(name: "y_solve", line: 3299, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3299, file: !1, scope: !5, type: !115, variables: !2) -!261 = distinct !DISubprogram(name: "y_backsubstitute", line: 3323, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3323, file: !1, scope: !5, type: !115, variables: !262) +!260 = distinct !DISubprogram(name: "y_solve", line: 3299, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3299, file: !1, scope: !5, type: !115, variables: !2) +!261 = distinct !DISubprogram(name: "y_backsubstitute", line: 3323, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3323, file: !1, scope: !5, type: !115, variables: !262) !262 = !{!263, !264, !265, !266, !267} !263 = !DILocalVariable(name: "i", line: 3335, scope: !261, file: !5, type: !8) !264 = !DILocalVariable(name: "j", line: 3335, scope: !261, file: !5, type: !8) !265 = !DILocalVariable(name: "k", line: 3335, scope: !261, file: !5, type: !8) !266 = !DILocalVariable(name: "m", line: 3335, scope: !261, file: !5, type: !8) !267 = !DILocalVariable(name: "n", line: 3335, scope: !261, file: !5, type: !8) -!268 = distinct !DISubprogram(name: "y_solve_cell", line: 3355, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3355, file: !1, scope: !5, type: !115, variables: !269) +!268 = distinct !DISubprogram(name: "y_solve_cell", line: 3355, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3355, file: !1, scope: !5, type: !115, variables: !269) !269 = !{!270, !271, !272, !273} !270 = !DILocalVariable(name: "i", line: 3370, scope: !268, file: !5, type: !8) !271 = !DILocalVariable(name: "j", line: 3370, scope: !268, file: !5, type: !8) !272 = !DILocalVariable(name: "k", line: 3370, scope: !268, file: !5, type: !8) !273 = !DILocalVariable(name: "jsize", line: 3370, scope: !268, file: !5, type: !8) -!274 = distinct !DISubprogram(name: "lhsy", line: 1181, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1181, file: !1, scope: !5, type: !115, variables: !275) +!274 = distinct !DISubprogram(name: "lhsy", line: 1181, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1181, file: !1, scope: !5, type: !115, variables: !275) !275 = !{!276, !277, !278} !276 = !DILocalVariable(name: "i", line: 1190, scope: !274, file: !5, type: !8) !277 = !DILocalVariable(name: "j", line: 1190, scope: !274, file: !5, type: !8) !278 = !DILocalVariable(name: "k", line: 1190, scope: !274, file: !5, type: !8) -!279 = distinct !DISubprogram(name: "x_solve", line: 2658, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2658, file: !1, scope: !5, type: !115, variables: !2) -!280 = distinct !DISubprogram(name: "x_backsubstitute", line: 2684, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2684, file: !1, scope: !5, type: !115, variables: !281) +!279 = distinct !DISubprogram(name: "x_solve", line: 2658, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2658, file: !1, scope: !5, type: !115, variables: !2) +!280 = distinct !DISubprogram(name: "x_backsubstitute", line: 2684, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2684, file: !1, scope: !5, type: !115, variables: !281) !281 = !{!282, !283, !284, !285, !286} !282 = !DILocalVariable(name: "i", line: 2696, scope: !280, file: !5, type: !8) !283 = !DILocalVariable(name: "j", line: 2696, scope: !280, file: !5, type: !8) !284 = !DILocalVariable(name: "k", line: 2696, scope: !280, file: !5, type: !8) !285 = !DILocalVariable(name: "m", line: 2696, scope: !280, file: !5, type: !8) !286 = !DILocalVariable(name: "n", line: 2696, scope: !280, file: !5, type: !8) -!287 = distinct !DISubprogram(name: "x_solve_cell", line: 2716, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2716, file: !1, scope: !5, type: !115, variables: !288) +!287 = distinct !DISubprogram(name: "x_solve_cell", line: 2716, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2716, file: !1, scope: !5, type: !115, variables: !288) !288 = !{!289, !290, !291, !292} !289 = !DILocalVariable(name: "i", line: 2728, scope: !287, file: !5, type: !8) !290 = !DILocalVariable(name: "j", line: 2728, scope: !287, file: !5, type: !8) !291 = !DILocalVariable(name: "k", line: 2728, scope: !287, file: !5, type: !8) !292 = !DILocalVariable(name: "isize", line: 2728, scope: !287, file: !5, type: !8) -!293 = distinct !DISubprogram(name: "lhsx", line: 898, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 898, file: !1, scope: !5, type: !115, variables: !294) +!293 = distinct !DISubprogram(name: "lhsx", line: 898, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 898, file: !1, scope: !5, type: !115, variables: !294) !294 = !{!295, !296, !297} !295 = !DILocalVariable(name: "i", line: 907, scope: !293, file: !5, type: !8) !296 = !DILocalVariable(name: "j", line: 907, scope: !293, file: !5, type: !8) Index: test/CodeGen/PowerPC/pr24546.ll =================================================================== --- test/CodeGen/PowerPC/pr24546.ll +++ test/CodeGen/PowerPC/pr24546.ll @@ -56,13 +56,12 @@ !llvm.module.flags = !{!29, !30} !llvm.ident = !{!31} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (git://github.com/llvm-mirror/clang.git e0848b6353721eb1b278a5bbea257bbf6316251e) (git://github.com/llvm-mirror/llvm.git 8724a428dfd5e78d7865bb01783708e83f9ed128)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !5, globals: !23) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (git://github.com/llvm-mirror/clang.git e0848b6353721eb1b278a5bbea257bbf6316251e) (git://github.com/llvm-mirror/llvm.git 8724a428dfd5e78d7865bb01783708e83f9ed128)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !23) !1 = !DIFile(filename: "testcase.i", directory: "/tmp/glibc.build") !2 = !{} !3 = !{!4} !4 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) -!5 = !{!6, !18} -!6 = distinct !DISubprogram(name: "_php_math_round", scope: !1, file: !1, line: 15, type: !7, isLocal: false, isDefinition: true, scopeLine: 16, flags: DIFlagPrototyped, isOptimized: true, variables: !10) +!6 = distinct !DISubprogram(name: "_php_math_round", scope: !1, file: !1, line: 15, type: !7, isLocal: false, isDefinition: true, scopeLine: 16, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !10) !7 = !DISubroutineType(types: !8) !8 = !{!4, !4, !9, !9} !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -74,7 +73,7 @@ !15 = !DILocalVariable(name: "f2", scope: !6, file: !1, line: 17, type: !4) !16 = !DILocalVariable(name: "tmp_value", scope: !6, file: !1, line: 18, type: !4) !17 = !DILocalVariable(name: "precision_places", scope: !6, file: !1, line: 19, type: !9) -!18 = distinct !DISubprogram(name: "php_intpow10", scope: !1, file: !1, line: 1, type: !19, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !21) +!18 = distinct !DISubprogram(name: "php_intpow10", scope: !1, file: !1, line: 1, type: !19, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !21) !19 = !DISubroutineType(types: !20) !20 = !{!4, !9} !21 = !{!22} Index: test/CodeGen/PowerPC/unwind-dw2-g.ll =================================================================== --- test/CodeGen/PowerPC/unwind-dw2-g.ll +++ test/CodeGen/PowerPC/unwind-dw2-g.ll @@ -21,11 +21,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "/tmp/unwind-dw2.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "/tmp/unwind-dw2.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/CodeGen/Thumb/2010-07-15-debugOrdering.ll =================================================================== --- test/CodeGen/Thumb/2010-07-15-debugOrdering.ll +++ test/CodeGen/Thumb/2010-07-15-debugOrdering.ll @@ -51,9 +51,9 @@ !0 = !DILocation(line: 46, scope: !1) !1 = distinct !DILexicalBlock(line: 44, column: 0, file: !101, scope: !2) !2 = distinct !DILexicalBlock(line: 44, column: 0, file: !101, scope: !3) -!3 = distinct !DISubprogram(name: "getClosestDiagonal3", linkageName: "_Z19getClosestDiagonal3ii", line: 44, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !101, scope: null, type: !6) +!3 = distinct !DISubprogram(name: "getClosestDiagonal3", linkageName: "_Z19getClosestDiagonal3ii", line: 44, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, file: !101, scope: null, type: !6) !4 = !DIFile(filename: "ggEdgeDiscrepancy.cc", directory: "/Volumes/Home/grosbaj/sources/llvm-externals/speccpu2000/benchspec/CINT2000/252.eon/src") -!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102, subprograms: !{!3, !37, !41, !42, !77}) +!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102) !6 = !DISubroutineType(types: !7) !7 = !{!8, !22, !22} !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "ggVector3", line: 66, size: 192, align: 32, file: !99, elements: !10) @@ -87,12 +87,12 @@ !34 = !DIDerivedType(tag: DW_TAG_const_type, size: 192, align: 32, file: !101, scope: !4, baseType: !8) !35 = !DISubprogram(name: "y", linkageName: "_ZNK9ggVector31yEv", line: 83, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !31) !36 = !DISubprogram(name: "z", linkageName: "_ZNK9ggVector31zEv", line: 84, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !31) -!37 = distinct !DISubprogram(name: "x", linkageName: "_ZN9ggVector31xEv", line: 85, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !38) +!37 = distinct !DISubprogram(name: "x", linkageName: "_ZN9ggVector31xEv", line: 85, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, file: !9, scope: !8, type: !38) !38 = !DISubroutineType(types: !39) !39 = !{!40, !19} !40 = !DIDerivedType(tag: DW_TAG_reference_type, name: "double", size: 32, align: 32, file: !101, scope: !4, baseType: !13) -!41 = distinct !DISubprogram(name: "y", linkageName: "_ZN9ggVector31yEv", line: 86, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !38) -!42 = distinct !DISubprogram(name: "z", linkageName: "_ZN9ggVector31zEv", line: 87, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !38) +!41 = distinct !DISubprogram(name: "y", linkageName: "_ZN9ggVector31yEv", line: 86, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, file: !9, scope: !8, type: !38) +!42 = distinct !DISubprogram(name: "z", linkageName: "_ZN9ggVector31zEv", line: 87, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, file: !9, scope: !8, type: !38) !43 = !DISubprogram(name: "SetX", linkageName: "_ZN9ggVector34SetXEd", line: 88, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !44) !44 = !DISubroutineType(types: !45) !45 = !{null, !19, !13} @@ -127,7 +127,7 @@ !74 = !DISubprogram(name: "operator/=", linkageName: "_ZN9ggVector3dVEd", line: 324, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !72) !75 = !DISubprogram(name: "length", linkageName: "_ZNK9ggVector36lengthEv", line: 121, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !31) !76 = !DISubprogram(name: "squaredLength", linkageName: "_ZNK9ggVector313squaredLengthEv", line: 122, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !31) -!77 = distinct !DISubprogram(name: "MakeUnitVector", linkageName: "_ZN9ggVector314MakeUnitVectorEv", line: 217, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !24) +!77 = distinct !DISubprogram(name: "MakeUnitVector", linkageName: "_ZN9ggVector314MakeUnitVectorEv", line: 217, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, file: !9, scope: !8, type: !24) !78 = !DISubprogram(name: "Perturb", linkageName: "_ZNK9ggVector37PerturbEdd", line: 126, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, file: !9, scope: !8, type: !79) !79 = !DISubroutineType(types: !80) !80 = !{!8, !33, !13, !13} Index: test/CodeGen/WinEH/wineh-cloning.ll =================================================================== --- test/CodeGen/WinEH/wineh-cloning.ll +++ test/CodeGen/WinEH/wineh-cloning.ll @@ -383,11 +383,10 @@ !llvm.dbg.cu = !{!1} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, subprograms: !4) +!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3) !2 = !DIFile(filename: "test.cpp", directory: ".") !3 = !{} -!4 = !{!5} -!5 = distinct !DISubprogram(name: "test12", scope: !2, file: !2, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !3) +!5 = distinct !DISubprogram(name: "test12", scope: !2, file: !2, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !1, variables: !3) !6 = !DISubroutineType(types: !7) !7 = !{null} !8 = !DILocation(line: 1, scope: !5) Index: test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll =================================================================== --- test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll +++ test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll @@ -78,7 +78,7 @@ !llvm.dbg.cu = !{!2} !0 = !DILocalVariable(name: "s1", line: 2, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !2, type: !3) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, scope: !2, type: !3) !2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !18, retainedTypes: !18) !3 = !DISubroutineType(types: !4) !4 = !{!5, !6} Index: test/CodeGen/X86/2009-10-16-Scope.ll =================================================================== --- test/CodeGen/X86/2009-10-16-Scope.ll +++ test/CodeGen/X86/2009-10-16-Scope.ll @@ -25,7 +25,7 @@ !llvm.dbg.cu = !{!3} !0 = !DILocation(line: 5, column: 2, scope: !1) !1 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !2) -!2 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !3) +!2 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scope: !3) !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !8, retainedTypes: !9) !4 = !DILocalVariable(name: "count_", line: 5, scope: !5, file: !3, type: !6) !5 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !1) Index: test/CodeGen/X86/2010-01-18-DbgValue.ll =================================================================== --- test/CodeGen/X86/2010-01-18-DbgValue.ll +++ test/CodeGen/X86/2010-01-18-DbgValue.ll @@ -32,9 +32,9 @@ !llvm.module.flags = !{!21} !0 = !DILocalVariable(name: "my_r0", line: 11, arg: 1, scope: !1, file: !2, type: !7) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 11, file: !19, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 11, file: !19, scope: !2, type: !4) !2 = !DIFile(filename: "b2.c", directory: "/tmp/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20, subprograms: !18) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20) !4 = !DISubroutineType(types: !5) !5 = !{!6, !7} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float) @@ -49,7 +49,6 @@ !15 = !DILocation(line: 11, scope: !1) !16 = !DILocation(line: 12, scope: !17) !17 = distinct !DILexicalBlock(line: 11, column: 0, file: !19, scope: !1) -!18 = !{!1} !19 = !DIFile(filename: "b2.c", directory: "/tmp/") !20 = !{} !21 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/X86/2010-02-01-DbgValueCrash.ll =================================================================== --- test/CodeGen/X86/2010-02-01-DbgValueCrash.ll +++ test/CodeGen/X86/2010-02-01-DbgValueCrash.ll @@ -29,7 +29,7 @@ !7 = !DIDerivedType(tag: DW_TAG_member, name: "z", line: 1, size: 64, align: 64, offset: 128, file: !15, scope: !2, baseType: !5) !8 = !DILocalVariable(name: "t", line: 5, scope: !9, file: !0, type: !2) !9 = distinct !DILexicalBlock(line: 0, column: 0, file: null, scope: !10) -!10 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !0, type: !11) +!10 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scope: !0, type: !11) !11 = !DISubroutineType(types: !12) !12 = !{!13} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/X86/2010-05-25-DotDebugLoc.ll =================================================================== --- test/CodeGen/X86/2010-05-25-DotDebugLoc.ll +++ test/CodeGen/X86/2010-05-25-DotDebugLoc.ll @@ -200,9 +200,9 @@ !llvm.module.flags = !{!48} !0 = !DILocalVariable(name: "a", line: 1921, arg: 1, scope: !1, file: !2, type: !9) -!1 = distinct !DISubprogram(name: "__divsc3", linkageName: "__divsc3", line: 1922, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 1922, file: !45, scope: !2, type: !4, variables: !43) +!1 = distinct !DISubprogram(name: "__divsc3", linkageName: "__divsc3", line: 1922, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !3, scopeLine: 1922, file: !45, scope: !2, type: !4, variables: !43) !2 = !DIFile(filename: "libgcc2.c", directory: "/Users/yash/clean/LG.D/gcc/../../llvmgcc/gcc") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !45, enums: !47, retainedTypes: !47, subprograms: !44, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !45, enums: !47, retainedTypes: !47, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6, !9, !9, !9, !9} !6 = !DIDerivedType(tag: DW_TAG_typedef, name: "SCtype", line: 170, file: !46, scope: !7, baseType: !8) @@ -243,7 +243,6 @@ !41 = !DILocation(line: 1965, scope: !15) !42 = !DILocation(line: 1969, scope: !15) !43 = !{!0, !11, !12, !13, !14, !16, !17, !18} -!44 = !{!1} !45 = !DIFile(filename: "libgcc2.c", directory: "/Users/yash/clean/LG.D/gcc/../../llvmgcc/gcc") !46 = !DIFile(filename: "libgcc2.h", directory: "/Users/yash/clean/LG.D/gcc/../../llvmgcc/gcc") !47 = !{} Index: test/CodeGen/X86/2010-05-26-DotDebugLoc.ll =================================================================== --- test/CodeGen/X86/2010-05-26-DotDebugLoc.ll +++ test/CodeGen/X86/2010-05-26-DotDebugLoc.ll @@ -26,14 +26,14 @@ !0 = !DIGlobalVariable(name: "ret", line: 7, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !3) !1 = !DIFile(filename: "foo.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !36, enums: !37, retainedTypes: !37, subprograms: !32, globals: !31, imports: !37) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !36, enums: !37, retainedTypes: !37, globals: !31, imports: !37) !3 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !4 = !DILocalVariable(name: "x", line: 12, arg: 1, scope: !5, file: !1, type: !3) -!5 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 13, file: !36, scope: !1, type: !6, variables: !33) +!5 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 13, file: !36, scope: !1, type: !6, variables: !33) !6 = !DISubroutineType(types: !7) !7 = !{null, !3} !8 = !DILocalVariable(name: "myvar", line: 17, arg: 1, scope: !9, file: !1, type: !13) -!9 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 17, file: !36, scope: !1, type: !10, variables: !34) +!9 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 17, file: !36, scope: !1, type: !10, variables: !34) !10 = !DISubroutineType(types: !11) !11 = !{!12, !13} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !36, scope: !1, baseType: null) @@ -43,7 +43,7 @@ !16 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 3, size: 32, align: 32, file: !36, scope: !14, baseType: !3) !17 = !DIDerivedType(tag: DW_TAG_member, name: "d", line: 4, size: 64, align: 64, offset: 64, file: !36, scope: !14, baseType: !13) !18 = !DILocalVariable(name: "argc", line: 22, arg: 1, scope: !19, file: !1, type: !3) -!19 = distinct !DISubprogram(name: "main", linkageName: "main", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 22, file: !36, scope: !1, type: !20, variables: !35) +!19 = distinct !DISubprogram(name: "main", linkageName: "main", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 22, file: !36, scope: !1, type: !20, variables: !35) !20 = !DISubroutineType(types: !21) !21 = !{!3, !3, !22} !22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !36, scope: !1, baseType: !23) @@ -56,7 +56,6 @@ !29 = distinct !DILexicalBlock(line: 17, column: 0, file: !36, scope: !9) !30 = !DILocation(line: 19, scope: !29) !31 = !{!0} -!32 = !{!5, !9, !19} !33 = !{!4} !34 = !{!8} !35 = !{!18, !25, !26} Index: test/CodeGen/X86/2010-05-28-Crash.ll =================================================================== --- test/CodeGen/X86/2010-05-28-Crash.ll +++ test/CodeGen/X86/2010-05-28-Crash.ll @@ -26,14 +26,14 @@ !llvm.module.flags = !{!20} !0 = !DILocalVariable(name: "y", line: 2, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 2, file: !18, scope: !2, type: !4, variables: !15) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !3, scopeLine: 2, file: !18, scope: !2, type: !4, variables: !15) !2 = !DIFile(filename: "f.c", directory: "/tmp") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !17, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6, !6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocalVariable(name: "x", line: 6, arg: 1, scope: !8, file: !2, type: !6) -!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 6, file: !18, scope: !2, type: !4, variables: !16) +!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !3, scopeLine: 6, file: !18, scope: !2, type: !4, variables: !16) !9 = !DILocation(line: 3, scope: !10) !10 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !1) !11 = !{i32 1} @@ -42,7 +42,6 @@ !14 = distinct !DILexicalBlock(line: 6, column: 0, file: !18, scope: !8) !15 = !{!0} !16 = !{!7} -!17 = !{!1, !8} !18 = !DIFile(filename: "f.c", directory: "/tmp") !19 = !{} Index: test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll =================================================================== --- test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll +++ test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll @@ -24,14 +24,14 @@ !llvm.dbg.lv = !{!0, !14, !15, !16, !17, !24, !25, !28} !0 = !DILocalVariable(name: "this", line: 11, arg: 1, scope: !1, file: !3, type: !12) -!1 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEi", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 11, file: !31, scope: !2, type: !9) +!1 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEi", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4, scopeLine: 11, file: !31, scope: !2, type: !9) !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 3, size: 32, align: 32, file: !31, scope: !3, elements: !5) !3 = !DIFile(filename: "foo.cp", directory: "/tmp/") -!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 LLVM build", isOptimized: true, emissionKind: FullDebug, file: !31, enums: !32, retainedTypes: !32, subprograms: !33) +!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 LLVM build", isOptimized: true, emissionKind: FullDebug, file: !31, enums: !32, retainedTypes: !32) !5 = !{!6, !1, !8} !6 = !DIDerivedType(tag: DW_TAG_member, name: "y", line: 8, size: 32, align: 32, file: !31, scope: !2, baseType: !7) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3foo3bazEi", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 15, file: !31, scope: !2, type: !9) +!8 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3foo3bazEi", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4, scopeLine: 15, file: !31, scope: !2, type: !9) !9 = !DISubroutineType(types: !10) !10 = !{!7, !11, !7} !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !31, scope: !3, baseType: !2) @@ -41,7 +41,7 @@ !15 = !DILocalVariable(name: "this", line: 15, arg: 1, scope: !8, file: !3, type: !12) !16 = !DILocalVariable(name: "x", line: 15, arg: 2, scope: !8, file: !3, type: !7) !17 = !DILocalVariable(name: "argc", line: 19, arg: 1, scope: !18, file: !3, type: !7) -!18 = distinct !DISubprogram(name: "main", linkageName: "main", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 19, file: !31, scope: !3, type: !19) +!18 = distinct !DISubprogram(name: "main", linkageName: "main", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4, scopeLine: 19, file: !31, scope: !3, type: !19) !19 = !DISubroutineType(types: !20) !20 = !{!7, !7, !21} !21 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !31, scope: !3, baseType: !22) @@ -56,5 +56,4 @@ !30 = distinct !DILexicalBlock(line: 15, column: 0, file: !31, scope: !8) !31 = !DIFile(filename: "foo.cp", directory: "/tmp/") !32 = !{} -!33 = !{!1, !8, !18} !34 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/X86/2010-07-06-DbgCrash.ll =================================================================== --- test/CodeGen/X86/2010-07-06-DbgCrash.ll +++ test/CodeGen/X86/2010-07-06-DbgCrash.ll @@ -10,7 +10,7 @@ !39 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: FullDebug, file: !109, enums: !108, retainedTypes: !108) !46 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !109, baseType: !47) !47 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) -!97 = distinct !DISubprogram(name: "main", linkageName: "main", line: 73, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !39, type: !98) +!97 = distinct !DISubprogram(name: "main", linkageName: "main", line: 73, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !39, scope: !39, type: !98) !98 = !DISubroutineType(types: !99) !99 = !{!100} !100 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/X86/2010-08-04-StackVariable.ll =================================================================== --- test/CodeGen/X86/2010-08-04-StackVariable.ll +++ test/CodeGen/X86/2010-08-04-StackVariable.ll @@ -81,7 +81,7 @@ !0 = !DISubprogram(name: "SVal", line: 11, isLocal: false, isDefinition: false, virtualIndex: 6, isOptimized: false, scopeLine: 11, file: !47, scope: !1, type: !14) !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "SVal", line: 1, size: 128, align: 64, file: !47, scope: !2, elements: !4) !2 = !DIFile(filename: "small.cc", directory: "/Users/manav/R8248330") -!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, subprograms: !46, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !47, enums: !48, retainedTypes: !48, imports: null) !4 = !{!5, !7, !0, !9} !5 = !DIDerivedType(tag: DW_TAG_member, name: "Data", line: 7, size: 64, align: 64, file: !47, scope: !1, baseType: !6) !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !47, scope: !2, baseType: null) @@ -94,11 +94,11 @@ !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !14 = !DISubroutineType(types: !15) !15 = !{null, !12} -!16 = distinct !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 11, file: !47, scope: !1, type: !14) -!17 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 16, file: !47, scope: !2, type: !18) +!16 = distinct !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 11, file: !47, scope: !1, type: !14) +!17 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 16, file: !47, scope: !2, type: !18) !18 = !DISubroutineType(types: !19) !19 = !{!13, !13, !1} -!20 = distinct !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 23, file: !47, scope: !2, type: !21) +!20 = distinct !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 23, file: !47, scope: !2, type: !21) !21 = !DISubroutineType(types: !22) !22 = !{!13} !23 = !DILocalVariable(name: "i", line: 16, arg: 1, scope: !17, file: !2, type: !13) Index: test/CodeGen/X86/2010-09-16-EmptyFilename.ll =================================================================== --- test/CodeGen/X86/2010-09-16-EmptyFilename.ll +++ test/CodeGen/X86/2010-09-16-EmptyFilename.ll @@ -15,20 +15,19 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!17} -!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 53, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !14, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 53, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !14, scope: !1, type: !3) !1 = !DIFile(filename: "", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 114084)", isOptimized: false, emissionKind: FullDebug, file: !15, enums: !16, retainedTypes: !16, subprograms: !13) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 114084)", isOptimized: false, emissionKind: FullDebug, file: !15, enums: !16, retainedTypes: !16) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !15, scope: !7, type: !3) +!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !15, scope: !7, type: !3) !7 = !DIFile(filename: "bug.c", directory: "/private/tmp") !8 = !DILocation(line: 53, column: 13, scope: !9) !9 = distinct !DILexicalBlock(line: 53, column: 11, file: !14, scope: !0) !10 = !DILocation(line: 4, column: 13, scope: !11) !11 = distinct !DILexicalBlock(line: 4, column: 13, file: !15, scope: !12) !12 = distinct !DILexicalBlock(line: 4, column: 11, file: !15, scope: !6) -!13 = !{!0, !6} !14 = !DIFile(filename: "", directory: "/private/tmp") !15 = !DIFile(filename: "bug.c", directory: "/private/tmp") !16 = !{} Index: test/CodeGen/X86/2010-11-02-DbgParameter.ll =================================================================== --- test/CodeGen/X86/2010-11-02-DbgParameter.ll +++ test/CodeGen/X86/2010-11-02-DbgParameter.ll @@ -18,9 +18,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!19} -!0 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !17, scope: !1, type: !3, variables: !16) +!0 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 3, file: !17, scope: !1, type: !3, variables: !16) !1 = !DIFile(filename: "one.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 117922)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !18, retainedTypes: !18, subprograms: !15, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 117922)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !18, retainedTypes: !18, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -33,7 +33,6 @@ !12 = !DILocation(line: 3, column: 47, scope: !0) !13 = !DILocation(line: 4, column: 2, scope: !14) !14 = distinct !DILexicalBlock(line: 3, column: 50, file: !17, scope: !0) -!15 = !{!0} !16 = !{!6} !17 = !DIFile(filename: "one.c", directory: "/private/tmp") !18 = !{} Index: test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll =================================================================== --- test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll +++ test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll @@ -78,13 +78,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!33} -!0 = distinct !DISubprogram(name: "gcd", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !31, scope: !1, type: !3, variables: !29) +!0 = distinct !DISubprogram(name: "gcd", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !31, scope: !1, type: !3, variables: !29) !1 = !DIFile(filename: "rem_small.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 124117)", isOptimized: true, emissionKind: FullDebug, file: !31, enums: !32, retainedTypes: !32, subprograms: !28, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 124117)", isOptimized: true, emissionKind: FullDebug, file: !31, enums: !32, retainedTypes: !32, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "main", line: 25, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !31, scope: !1, type: !7, variables: !30) +!6 = distinct !DISubprogram(name: "main", line: 25, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !31, scope: !1, type: !7, variables: !30) !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -106,7 +106,6 @@ !25 = !DILocation(line: 27, column: 38, scope: !15) !26 = !DILocation(line: 28, column: 9, scope: !15) !27 = !DILocation(line: 30, column: 1, scope: !15) -!28 = !{!0, !6} !29 = !{!10, !11, !12} !30 = !{!14, !17} !31 = !DIFile(filename: "rem_small.c", directory: "/private/tmp") Index: test/CodeGen/X86/2012-11-30-handlemove-dbg.ll =================================================================== --- test/CodeGen/X86/2012-11-30-handlemove-dbg.ll +++ test/CodeGen/X86/2012-11-30-handlemove-dbg.ll @@ -38,7 +38,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 168918) (llvm/trunk 168920)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, subprograms: !13, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 168918) (llvm/trunk 168920)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} !4 = !DILocalVariable(name: "hg", line: 725, arg: 4, scope: !14, file: !5, type: !6) !5 = !DIFile(filename: "MultiSource/Benchmarks/Olden/bh/newbh.c", directory: "MultiSource/Benchmarks/Olden/bh") @@ -46,7 +46,6 @@ !7 = !DICompositeType(tag: DW_TAG_structure_type, line: 487, size: 512, align: 64, file: !11) !11 = !DIFile(filename: "MultiSource/Benchmarks/Olden/bh/newbh.c", directory: "MultiSource/Benchmarks/Olden/bh") !12 = !{i32 1, !"Debug Info Version", i32 3} -!13 = !{!14} -!14 = distinct !DISubprogram(name: "subdivp", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !11, scope: !5, type: !15) +!14 = distinct !DISubprogram(name: "subdivp", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !11, scope: !5, type: !15) !15 = !DISubroutineType(types: !16) !16 = !{null} Index: test/CodeGen/X86/2012-11-30-misched-dbg.ll =================================================================== --- test/CodeGen/X86/2012-11-30-misched-dbg.ll +++ test/CodeGen/X86/2012-11-30-misched-dbg.ll @@ -65,7 +65,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!35} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 168918) (llvm/trunk 168920)", isOptimized: true, emissionKind: FullDebug, file: !19, enums: !2, retainedTypes: !2, subprograms: !20, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 168918) (llvm/trunk 168920)", isOptimized: true, emissionKind: FullDebug, file: !19, enums: !2, retainedTypes: !2, globals: !2) !1 = !{!2} !2 = !{} !4 = !DILocalVariable(name: "num1", line: 815, scope: !5, file: !14, type: !15) @@ -85,8 +85,7 @@ !18 = !DISubrange(count: 20) !19 = !DIFile(filename: "MultiSource/Benchmarks/MiBench/consumer-typeset/z19.c", directory: "MultiSource/Benchmarks/MiBench/consumer-typeset") -!20 = !{!21} -!21 = distinct !DISubprogram(name: "AttachGalley", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !19, scope: !14, type: !22) +!21 = distinct !DISubprogram(name: "AttachGalley", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !19, scope: !14, type: !22) !22 = !DISubroutineType(types: !23) !23 = !{null} @@ -134,11 +133,10 @@ !llvm.dbg.cu = !{!30} -!30 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169129) (llvm/trunk 169135)", isOptimized: true, emissionKind: FullDebug, file: !34, enums: !2, retainedTypes: !2, subprograms: !36) +!30 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169129) (llvm/trunk 169135)", isOptimized: true, emissionKind: FullDebug, file: !34, enums: !2, retainedTypes: !2) !31 = !DILocalVariable(name: "X", line: 29, scope: !37, type: !32) !32 = !DIDerivedType(tag: DW_TAG_typedef, name: "HM", line: 28, file: !34, baseType: null) !33 = !DIFile(filename: "SingleSource/Benchmarks/Shootout-C++/hash.cpp", directory: "SingleSource/Benchmarks/Shootout-C++") !34 = !DIFile(filename: "SingleSource/Benchmarks/Shootout-C++/hash.cpp", directory: "SingleSource/Benchmarks/Shootout-C++") !35 = !{i32 1, !"Debug Info Version", i32 3} -!36 = !{!37} -!37 = distinct !DISubprogram(name: "main", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !19, scope: !14, type: !22) +!37 = distinct !DISubprogram(name: "main", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !30, scopeLine: 1, file: !19, scope: !14, type: !22) Index: test/CodeGen/X86/2012-11-30-regpres-dbg.ll =================================================================== --- test/CodeGen/X86/2012-11-30-regpres-dbg.ll +++ test/CodeGen/X86/2012-11-30-regpres-dbg.ll @@ -36,9 +36,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 168984) (llvm/trunk 168983)", isOptimized: true, emissionKind: FullDebug, file: !6, subprograms: !1) -!1 = !{!2} -!2 = distinct !DISubprogram(name: "test", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !6, scope: !5, type: !7) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 168984) (llvm/trunk 168983)", isOptimized: true, emissionKind: FullDebug, file: !6) +!2 = distinct !DISubprogram(name: "test", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !6, scope: !5, type: !7) !3 = !DILocalVariable(name: "callback", line: 214, scope: !2, type: !4) !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "btCompoundLeafCallback", line: 90, size: 64, align: 64, file: !6) !5 = !DIFile(filename: "MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp", directory: "MultiSource/Benchmarks/Bullet") Index: test/CodeGen/X86/MachineSink-DbgValue.ll =================================================================== --- test/CodeGen/X86/MachineSink-DbgValue.ll +++ test/CodeGen/X86/MachineSink-DbgValue.ll @@ -28,8 +28,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, subprograms: !18, imports: null) -!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !20, scope: !2, type: !3, variables: !19) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, imports: null) +!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, file: !20, scope: !2, type: !3, variables: !19) !2 = !DIFile(filename: "a.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -46,7 +46,6 @@ !15 = !DILocation(line: 4, column: 3, scope: !11) !16 = !DILocation(line: 5, column: 5, scope: !11) !17 = !DILocation(line: 7, column: 1, scope: !11) -!18 = !{!1} !19 = !{!6, !7, !10} !20 = !DIFile(filename: "a.c", directory: "/private/tmp") !21 = !{} Index: test/CodeGen/X86/StackColoring-dbg.ll =================================================================== --- test/CodeGen/X86/StackColoring-dbg.ll +++ test/CodeGen/X86/StackColoring-dbg.ll @@ -28,9 +28,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !{!2}) +!0 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}) !1 = !DIFile(filename: "t.c", directory: "") !16 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) -!2 = distinct !DISubprogram() +!2 = distinct !DISubprogram(unit: !0) !22 = !DILocalVariable(name: "x", line: 16, scope: !2, file: !1, type: !16) !23 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/X86/bit-piece-comment.ll =================================================================== --- test/CodeGen/X86/bit-piece-comment.ll +++ test/CodeGen/X86/bit-piece-comment.ll @@ -39,11 +39,10 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256088) (llvm/trunk 256097)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256088) (llvm/trunk 256097)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.cpp", directory: "/mnt/extra") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !7) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8} Index: test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll =================================================================== --- test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll +++ test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll @@ -124,7 +124,7 @@ !llvm.module.flags = !{!43, !44} !llvm.ident = !{!45} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 255993) (llvm/trunk 256074)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !23) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 255993) (llvm/trunk 256074)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "test.cpp", directory: "/mnt/extra") !2 = !{} !3 = !{!4} @@ -147,8 +147,7 @@ !20 = !{!15, !21} !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !22, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) !22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS4AAA3") -!23 = !{!24, !34, !39} -!24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barii", scope: !1, file: !1, line: 11, type: !25, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, variables: !28) +!24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barii", scope: !1, file: !1, line: 11, type: !25, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !28) !25 = !DISubroutineType(types: !26) !26 = !{null, !27, !27} !27 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -158,12 +157,12 @@ !31 = !DILocalVariable(name: "temp", scope: !24, file: !1, line: 12, type: !15) !32 = !DILocalVariable(name: "var1", scope: !24, file: !1, line: 17, type: !"_ZTS4AAA3") !33 = !DILocalVariable(name: "var2", scope: !24, file: !1, line: 18, type: !"_ZTS4AAA3") -!34 = distinct !DISubprogram(name: "AAA3", linkageName: "_ZN4AAA3C2EPKc", scope: !"_ZTS4AAA3", file: !1, line: 5, type: !12, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, declaration: !11, variables: !35) +!34 = distinct !DISubprogram(name: "AAA3", linkageName: "_ZN4AAA3C2EPKc", scope: !"_ZTS4AAA3", file: !1, line: 5, type: !12, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !11, variables: !35) !35 = !{!36, !38} !36 = !DILocalVariable(name: "this", arg: 1, scope: !34, type: !37, flags: DIFlagArtificial | DIFlagObjectPointer) !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4AAA3", size: 64, align: 64) !38 = !DILocalVariable(name: "value", arg: 2, scope: !34, file: !1, line: 5, type: !15) -!39 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !"_ZTS4AAA3", file: !1, line: 6, type: !12, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, declaration: !17, variables: !40) +!39 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN4AAA3aSEPKc", scope: !"_ZTS4AAA3", file: !1, line: 6, type: !12, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !17, variables: !40) !40 = !{!41, !42} !41 = !DILocalVariable(name: "this", arg: 1, scope: !39, type: !37, flags: DIFlagArtificial | DIFlagObjectPointer) !42 = !DILocalVariable(name: "value", arg: 2, scope: !39, file: !1, line: 6, type: !15) Index: test/CodeGen/X86/dbg-combine.ll =================================================================== --- test/CodeGen/X86/dbg-combine.ll +++ test/CodeGen/X86/dbg-combine.ll @@ -74,11 +74,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227074)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227074)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "dbg-combine.c", directory: "/home/probinson/projects/scratch") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "dbg-combine.c", directory: "/home/probinson/projects/scratch") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/CodeGen/X86/debugloc-argsize.ll =================================================================== --- test/CodeGen/X86/debugloc-argsize.ll +++ test/CodeGen/X86/debugloc-argsize.ll @@ -38,11 +38,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 249520)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 249520)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.cpp", directory: "foo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/CodeGen/X86/dwarf-comp-dir.ll =================================================================== --- test/CodeGen/X86/dwarf-comp-dir.ll +++ test/CodeGen/X86/dwarf-comp-dir.ll @@ -7,7 +7,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !7, subprograms: !2, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !7, globals: !2) !2 = !{} !3 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") !4 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") Index: test/CodeGen/X86/fpstack-debuginstr-kill.ll =================================================================== --- test/CodeGen/X86/fpstack-debuginstr-kill.ll +++ test/CodeGen/X86/fpstack-debuginstr-kill.ll @@ -43,11 +43,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!24, !25} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (http://llvm.org/git/clang 8444ae7cfeaefae031f8fedf0d1435ca3b14d90b) (http://llvm.org/git/llvm 886f0101a7d176543b831f5efb74c03427244a55)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !21, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (http://llvm.org/git/clang 8444ae7cfeaefae031f8fedf0d1435ca3b14d90b) (http://llvm.org/git/llvm 886f0101a7d176543b831f5efb74c03427244a55)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !21, imports: !2) !1 = !DIFile(filename: "fpu_ieee.cpp", directory: "x87stackifier") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "fpuop_arithmetic", linkageName: "_Z16fpuop_arithmeticjj", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !5, scope: !6, type: !7, variables: !10) +!4 = distinct !DISubprogram(name: "fpuop_arithmetic", linkageName: "_Z16fpuop_arithmeticjj", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !6, type: !7, variables: !10) !5 = !DIFile(filename: "f1.cpp", directory: "x87stackifier") !6 = !DIFile(filename: "f1.cpp", directory: "x87stackifier") !7 = !DISubroutineType(types: !8) Index: test/CodeGen/X86/loc-remat.ll =================================================================== --- test/CodeGen/X86/loc-remat.ll +++ test/CodeGen/X86/loc-remat.ll @@ -37,11 +37,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!6, !7} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259383) (llvm/trunk 259385)", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259383) (llvm/trunk 259385)", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) !1 = !DIFile(filename: "t.c", directory: "/home/majnemer/llvm/src") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !2) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/CodeGen/X86/machine-trace-metrics-crash.ll =================================================================== --- test/CodeGen/X86/machine-trace-metrics-crash.ll +++ test/CodeGen/X86/machine-trace-metrics-crash.ll @@ -51,10 +51,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!2} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, subprograms: !{!3}) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) !1 = !DIFile(filename: "24199.cpp", directory: "/bin") !2 = !{i32 2, !"Debug Info Version", i32 3} -!3 = distinct !DISubprogram(linkageName: "foo", file: !1, line: 18, isLocal: false, isDefinition: true, scopeLine: 18) +!3 = distinct !DISubprogram(linkageName: "foo", file: !1, line: 18, isLocal: false, isDefinition: true, scopeLine: 18, unit: !0) !4 = !DIExpression() !5 = !DILocalVariable(name: "this", arg: 1, scope: !3, flags: DIFlagArtificial | DIFlagObjectPointer) !6 = !DILocation(line: 0, scope: !3) Index: test/CodeGen/X86/misched-code-difference-with-debug.ll =================================================================== --- test/CodeGen/X86/misched-code-difference-with-debug.ll +++ test/CodeGen/X86/misched-code-difference-with-debug.ll @@ -62,7 +62,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22, !23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !20, imports: !2, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, enums: !2, retainedTypes: !3, globals: !20, imports: !2, emissionKind: FullDebug) !1 = !DIFile(filename: "test.cpp", directory: "") !2 = !{} !3 = !{!4} @@ -74,8 +74,7 @@ !9 = !DIBasicType(encoding: DW_ATE_signed, size: 32, align: 32, name: "int") !10 = !DIDerivedType(baseType: !"_ZTS1C", tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial) !11 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) -!12 = !{!13} -!13 = distinct !DISubprogram(name: "test_with_debug", linkageName: "test_with_debug", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !14, type: !15, variables: !17) +!13 = distinct !DISubprogram(name: "test_with_debug", linkageName: "test_with_debug", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !14, type: !15, variables: !17) !14 = !DIFile(filename: "test.cpp", directory: "") !15 = !DISubroutineType(types: !16) !16 = !{null} Index: test/CodeGen/X86/movpc32-check.ll =================================================================== --- test/CodeGen/X86/movpc32-check.ll +++ test/CodeGen/X86/movpc32-check.ll @@ -19,11 +19,10 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git 3490ab8630d5643f71f1f04e46984f05b27b8d67) (http://llvm.org/git/llvm.git d2643e2ff955ed234944fe3c6b4ffc1250085843)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git 3490ab8630d5643f71f1f04e46984f05b27b8d67) (http://llvm.org/git/llvm.git d2643e2ff955ed234944fe3c6b4ffc1250085843)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "movpc-test") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/CodeGen/X86/null-streamer.ll =================================================================== --- test/CodeGen/X86/null-streamer.ll +++ test/CodeGen/X86/null-streamer.ll @@ -14,11 +14,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: " ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: " ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !1 = !DIFile(filename: "file.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !1, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !1, type: !6, variables: !2) !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(tag: DW_TAG_base_type, size: 32, align: 32, encoding: DW_ATE_signed) Index: test/CodeGen/X86/push-cfi-debug.ll =================================================================== --- test/CodeGen/X86/push-cfi-debug.ll +++ test/CodeGen/X86/push-cfi-debug.ll @@ -38,11 +38,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 250289)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 250289)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.c", directory: "foo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test1", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "test1", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/CodeGen/X86/stack-protector-dbginfo.ll =================================================================== --- test/CodeGen/X86/stack-protector-dbginfo.ll +++ test/CodeGen/X86/stack-protector-dbginfo.ll @@ -25,7 +25,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21, !72} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !5, subprograms: !8, globals: !20, imports: !5) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !5, globals: !20, imports: !5) !1 = !DIFile(filename: "", directory: "/Users/matt/ryan_bug") !2 = !{!3} !3 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 20, size: 32, align: 32, file: !1, scope: !4, elements: !6) @@ -33,8 +33,7 @@ !5 = !{} !6 = !{!7} !7 = !DIEnumerator(name: "max_frame_size", value: 0) ; [ DW_TAG_enumerator ] [max_frame_size :: 0] -!8 = !{!9, !24, !41, !65} -!9 = distinct !DISubprogram(name: "read_response_size", linkageName: "_Z18read_response_sizev", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 27, file: !1, scope: !10, type: !11, variables: !14) +!9 = distinct !DISubprogram(name: "read_response_size", linkageName: "_Z18read_response_sizev", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 27, file: !1, scope: !10, type: !11, variables: !14) !10 = !DIFile(filename: "", directory: "/Users/matt/ryan_bug") !11 = !DISubroutineType(types: !12) !12 = !{!13} @@ -49,7 +48,7 @@ !21 = !{i32 2, !"Dwarf Version", i32 2} !22 = !{i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0)} !23 = !DILocalVariable(name: "p2", line: 12, arg: 2, scope: !24, file: !10, type: !32) -!24 = distinct !DISubprogram(name: "min", linkageName: "_ZN3__13minIyEERKT_S3_RS1_", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !1, scope: !25, type: !27, templateParams: !33, variables: !35) +!24 = distinct !DISubprogram(name: "min", linkageName: "_ZN3__13minIyEERKT_S3_RS1_", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !1, scope: !25, type: !27, templateParams: !33, variables: !35) !25 = !DINamespace(name: "__1", line: 1, file: !26, scope: null) !26 = !DIFile(filename: "main.cpp", directory: "/Users/matt/ryan_bug") !27 = !DISubroutineType(types: !28) @@ -66,7 +65,7 @@ !38 = !DILocation(line: 33, scope: !9) !39 = !DILocation(line: 12, scope: !24, inlinedAt: !38) !40 = !DILocation(line: 9, scope: !41, inlinedAt: !59) -!41 = distinct !DISubprogram(name: "min", linkageName: "_ZN3__13minIyNS_1AEEERKT_S4_RS2_T0_", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !1, scope: !25, type: !42, templateParams: !53, variables: !55) +!41 = distinct !DISubprogram(name: "min", linkageName: "_ZN3__13minIyNS_1AEEERKT_S4_RS2_T0_", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 8, file: !1, scope: !25, type: !42, templateParams: !53, variables: !55) !42 = !DISubroutineType(types: !43) !43 = !{!29, !29, !32, !44} !44 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", size: 8, align: 8, file: !1, scope: !25, elements: !45) @@ -86,7 +85,7 @@ !59 = !DILocation(line: 13, scope: !24, inlinedAt: !38) !63 = !{i32 undef} !64 = !DILocalVariable(name: "p1", line: 1, arg: 2, scope: !65, file: !10, type: !50) -!65 = distinct !DISubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !25, type: !47, declaration: !46, variables: !66) +!65 = distinct !DISubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !25, type: !47, declaration: !46, variables: !66) !66 = !{!67, !69, !70} !67 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !65, type: !68) !68 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !44) Index: test/CodeGen/X86/unknown-location.ll =================================================================== --- test/CodeGen/X86/unknown-location.ll +++ test/CodeGen/X86/unknown-location.ll @@ -22,15 +22,14 @@ !llvm.module.flags = !{!12} !0 = !DILocalVariable(name: "x", line: 1, arg: 2, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !10, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 1, file: !10, scope: !2, type: !4) !2 = !DIFile(filename: "test.c", directory: "/dir") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "producer", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, subprograms: !9) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "producer", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11) !4 = !DISubroutineType(types: !5) !5 = !{!6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = distinct !DILexicalBlock(line: 1, column: 30, file: !10, scope: !1) !8 = !DILocation(line: 4, column: 3, scope: !7) -!9 = !{!1} !10 = !DIFile(filename: "test.c", directory: "/dir") !11 = !{} !12 = !{i32 1, !"Debug Info Version", i32 3} Index: test/CodeGen/XCore/dwarf_debug.ll =================================================================== --- test/CodeGen/XCore/dwarf_debug.ll +++ test/CodeGen/XCore/dwarf_debug.ll @@ -23,11 +23,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !1, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !1, type: !6, variables: !2) !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/AArch64/big-endian.ll =================================================================== --- test/DebugInfo/AArch64/big-endian.ll +++ test/DebugInfo/AArch64/big-endian.ll @@ -9,7 +9,7 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "-", directory: "/work/validation") !2 = !{} !3 = !{!4} Index: test/DebugInfo/AArch64/bitfields.ll =================================================================== --- test/DebugInfo/AArch64/bitfields.ll +++ test/DebugInfo/AArch64/bitfields.ll @@ -54,7 +54,7 @@ !llvm.module.flags = !{!13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "bitfields.c", directory: "/") !2 = !{} !3 = !{!4} Index: test/DebugInfo/AArch64/cfi-eof-prologue.ll =================================================================== --- test/DebugInfo/AArch64/cfi-eof-prologue.ll +++ test/DebugInfo/AArch64/cfi-eof-prologue.ll @@ -61,7 +61,7 @@ !llvm.module.flags = !{!35, !36} !llvm.ident = !{!37} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !27, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4, !13} @@ -88,12 +88,11 @@ !24 = !{null, !25} !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") !26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !"_ZTS1A", type: !23, containingType: !"_ZTS1A") -!27 = !{!28, !32} -!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29) +!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29) !29 = !{!30} !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31) !31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1B") -!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33) +!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33) !33 = !{!34} !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31) !35 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/AArch64/coalescing.ll =================================================================== --- test/DebugInfo/AArch64/coalescing.ll +++ test/DebugInfo/AArch64/coalescing.ll @@ -44,11 +44,10 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 223149) (llvm/trunk 223115)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 223149) (llvm/trunk 223115)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "start", linkageName: "_Z5startv", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !9) +!4 = distinct !DISubprogram(name: "start", linkageName: "_Z5startv", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !9) !5 = !DIFile(filename: "test1.c", directory: "") !6 = !DIFile(filename: "test1.c", directory: "") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/AArch64/constant-dbgloc.ll =================================================================== --- test/DebugInfo/AArch64/constant-dbgloc.ll +++ test/DebugInfo/AArch64/constant-dbgloc.ll @@ -23,11 +23,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/AArch64/dwarfdump.ll =================================================================== --- test/DebugInfo/AArch64/dwarfdump.ll +++ test/DebugInfo/AArch64/dwarfdump.ll @@ -27,10 +27,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !1, retainedTypes: !1, subprograms: !2, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!2 = !{!3} -!3 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !9, scope: !4, type: !5, variables: !1) +!3 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !9, scope: !4, type: !5, variables: !1) !4 = !DIFile(filename: "tmp.c", directory: "/home/tim/llvm/build") !5 = !DISubroutineType(types: !6) !6 = !{!7} Index: test/DebugInfo/AArch64/frameindices.ll =================================================================== --- test/DebugInfo/AArch64/frameindices.ll +++ test/DebugInfo/AArch64/frameindices.ll @@ -160,7 +160,7 @@ !llvm.module.flags = !{!43, !44} !llvm.ident = !{!45} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !24, globals: !40, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !40, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4, !12, !14} @@ -184,17 +184,16 @@ !21 = !DISubprogram(name: "~B", line: 10, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !5, scope: !"_ZTS1B", type: !22) !22 = !DISubroutineType(types: !23) !23 = !{null, !19} -!24 = !{!25, !31, !34} -!25 = distinct !DISubprogram(name: "f13", linkageName: "_Z3f131A", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !5, scope: !26, type: !27, variables: !29) +!25 = distinct !DISubprogram(name: "f13", linkageName: "_Z3f131A", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !26, type: !27, variables: !29) !26 = !DIFile(filename: "test.cpp", directory: "") !27 = !DISubroutineType(types: !28) !28 = !{null, !"_ZTS1A"} !29 = !{!30} !30 = !DILocalVariable(name: "p1", line: 13, arg: 1, scope: !25, file: !26, type: !"_ZTS1A") -!31 = distinct !DISubprogram(name: "f11", linkageName: "_Z3f111A", line: 17, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 17, file: !5, scope: !26, type: !27, variables: !32) +!31 = distinct !DISubprogram(name: "f11", linkageName: "_Z3f111A", line: 17, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 17, file: !5, scope: !26, type: !27, variables: !32) !32 = !{!33} !33 = !DILocalVariable(name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !"_ZTS1A") -!34 = distinct !DISubprogram(name: "f16", linkageName: "_Z3f16v", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !5, scope: !26, type: !35, variables: !37) +!34 = distinct !DISubprogram(name: "f16", linkageName: "_Z3f16v", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !5, scope: !26, type: !35, variables: !37) !35 = !DISubroutineType(types: !36) !36 = !{null} !37 = !{!38, !39} Index: test/DebugInfo/AArch64/prologue_end.ll =================================================================== --- test/DebugInfo/AArch64/prologue_end.ll +++ test/DebugInfo/AArch64/prologue_end.ll @@ -27,11 +27,10 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/AArch64/struct_by_value.ll =================================================================== --- test/DebugInfo/AArch64/struct_by_value.ll +++ test/DebugInfo/AArch64/struct_by_value.ll @@ -48,11 +48,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!16, !20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "LLVM version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "LLVM version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "struct_by_value.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "return_five_int", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "return_five_int", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 14, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "struct_by_value.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/ARM/PR16736.ll =================================================================== --- test/DebugInfo/ARM/PR16736.ll +++ test/DebugInfo/ARM/PR16736.ll @@ -41,11 +41,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17, !21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 190804) (llvm/trunk 190797)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 190804) (llvm/trunk 190797)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "/", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "h", linkageName: "_Z1hiiiif", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !11) +!4 = distinct !DISubprogram(name: "h", linkageName: "_Z1hiiiif", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !11) !5 = !DIFile(filename: "/arm.cpp", directory: "") !6 = !DIFile(filename: "/arm.cpp", directory: "") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/ARM/PR26163.ll =================================================================== --- test/DebugInfo/ARM/PR26163.ll +++ test/DebugInfo/ARM/PR26163.ll @@ -71,18 +71,17 @@ !llvm.module.flags = !{!22, !23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257891)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257891)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "", directory: "/home/ubuntu/bugs") !2 = !{} -!3 = !{!4, !11} -!4 = distinct !DISubprogram(name: "parse_config_file", scope: !5, file: !5, line: 22, type: !6, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, variables: !9) +!4 = distinct !DISubprogram(name: "parse_config_file", scope: !5, file: !5, line: 22, type: !6, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !9) !5 = !DIFile(filename: "test.c", directory: "/home/ubuntu/bugs") !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !{!10} !10 = !DILocalVariable(name: "value", scope: !4, file: !5, line: 24, type: !8) -!11 = distinct !DISubprogram(name: "bar", scope: !5, file: !5, line: 11, type: !12, isLocal: true, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, variables: !14) +!11 = distinct !DISubprogram(name: "bar", scope: !5, file: !5, line: 11, type: !12, isLocal: true, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !14) !12 = !DISubroutineType(types: !13) !13 = !{null, !8} !14 = !{!15, !16} Index: test/DebugInfo/ARM/bitfield.ll =================================================================== --- test/DebugInfo/ARM/bitfield.ll +++ test/DebugInfo/ARM/bitfield.ll @@ -26,7 +26,7 @@ !llvm.module.flags = !{!11, !12, !13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "test.i", directory: "/") !2 = !{} !3 = !{!4} Index: test/DebugInfo/ARM/cfi-eof-prologue.ll =================================================================== --- test/DebugInfo/ARM/cfi-eof-prologue.ll +++ test/DebugInfo/ARM/cfi-eof-prologue.ll @@ -62,7 +62,7 @@ !llvm.module.flags = !{!35, !36, !37, !38} !llvm.ident = !{!39} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !27, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4, !13} @@ -89,12 +89,11 @@ !24 = !{null, !25} !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") !26 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !"_ZTS1A", type: !23, containingType: !"_ZTS1A") -!27 = !{!28, !32} -!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29) +!28 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !29) !29 = !{!30} !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31) !31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"_ZTS1B") -!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33) +!32 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", line: 9, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !5, scope: !"_ZTS1B", type: !9, declaration: !8, variables: !33) !33 = !{!34} !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !31) !35 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/ARM/constant-dbgloc.ll =================================================================== --- test/DebugInfo/ARM/constant-dbgloc.ll +++ test/DebugInfo/ARM/constant-dbgloc.ll @@ -23,11 +23,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/ARM/float-args.ll =================================================================== --- test/DebugInfo/ARM/float-args.ll +++ test/DebugInfo/ARM/float-args.ll @@ -27,11 +27,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!10, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float) Index: test/DebugInfo/ARM/header.ll =================================================================== --- test/DebugInfo/ARM/header.ll +++ test/DebugInfo/ARM/header.ll @@ -18,11 +18,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "/foo/test.c", directory: "/foo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/ARM/lowerbdgdeclare_vla.ll =================================================================== --- test/DebugInfo/ARM/lowerbdgdeclare_vla.ll +++ test/DebugInfo/ARM/lowerbdgdeclare_vla.ll @@ -67,11 +67,10 @@ !llvm.module.flags = !{!20, !33} !llvm.ident = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/Volumes/Data/radar/15464571") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "run", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !10) +!4 = distinct !DISubprogram(name: "run", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !10) !5 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/15464571") !6 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/15464571") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll =================================================================== --- test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll +++ test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll @@ -32,11 +32,10 @@ !llvm.module.flags = !{!12, !13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "proc", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "proc", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8, !10} Index: test/DebugInfo/ARM/prologue_end.ll =================================================================== --- test/DebugInfo/ARM/prologue_end.ll +++ test/DebugInfo/ARM/prologue_end.ll @@ -28,11 +28,10 @@ !llvm.module.flags = !{!7, !8, !9, !10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/ARM/s-super-register.ll =================================================================== --- test/DebugInfo/ARM/s-super-register.ll +++ test/DebugInfo/ARM/s-super-register.ll @@ -40,8 +40,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !16, imports: null) -!1 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !18, scope: !2, type: !3, variables: !17) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null) +!1 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !18, scope: !2, type: !3, variables: !17) !2 = !DIFile(filename: "k.cc", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{null} @@ -56,7 +56,6 @@ !13 = !DILocation(line: 8, column: 20, scope: !9) !14 = !DILocation(line: 7, column: 20, scope: !10) !15 = !DILocation(line: 10, column: 1, scope: !6) -!16 = !{!1} !17 = !{!5, !8} !18 = !DIFile(filename: "k.cc", directory: "/private/tmp") !19 = !{} Index: test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll =================================================================== --- test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll +++ test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll @@ -48,11 +48,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/ARM/split-complex.ll =================================================================== --- test/DebugInfo/ARM/split-complex.ll +++ test/DebugInfo/ARM/split-complex.ll @@ -35,11 +35,10 @@ !llvm.module.flags = !{!9, !10, !11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259998) (llvm/trunk 259999)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259998) (llvm/trunk 259999)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "", directory: "/") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/ARM/sroa-complex.ll =================================================================== --- test/DebugInfo/ARM/sroa-complex.ll +++ test/DebugInfo/ARM/sroa-complex.ll @@ -39,11 +39,10 @@ !llvm.module.flags = !{!9, !10, !11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259998) (llvm/trunk 259999)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 259998) (llvm/trunk 259999)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "", directory: "/") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/ARM/tls.ll =================================================================== --- test/DebugInfo/ARM/tls.ll +++ test/DebugInfo/ARM/tls.ll @@ -22,7 +22,7 @@ ; TODO: Add expected output for -emulated-tls tests. ; EMU-NOT: .long x(tlsldo) -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "tls.c", directory: "/tmp") !2 = !{} !3 = !{!4} Index: test/DebugInfo/COFF/asan-module-ctor.ll =================================================================== --- test/DebugInfo/COFF/asan-module-ctor.ll +++ test/DebugInfo/COFF/asan-module-ctor.ll @@ -82,11 +82,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "asan.c", directory: "D:\5C") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "asan.c", directory: "D:C") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"CodeView", i32 1} Index: test/DebugInfo/COFF/asan-module-without-functions.ll =================================================================== --- test/DebugInfo/COFF/asan-module-without-functions.ll +++ test/DebugInfo/COFF/asan-module-without-functions.ll @@ -45,7 +45,7 @@ !llvm.module.flags = !{!3, !4} !llvm.ident = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "asan.c", directory: "D:\5C") !2 = !{} !3 = !{i32 2, !"CodeView", i32 1} Index: test/DebugInfo/COFF/asm.ll =================================================================== --- test/DebugInfo/COFF/asm.ll +++ test/DebugInfo/COFF/asm.ll @@ -213,11 +213,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "D:\5C") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "asm.c", directory: "D:\5C") !6 = !DIFile(filename: "asm.c", directory: "D:C") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/COFF/cpp-mangling.ll =================================================================== --- test/DebugInfo/COFF/cpp-mangling.ll +++ test/DebugInfo/COFF/cpp-mangling.ll @@ -35,11 +35,10 @@ !llvm.module.flags = !{!9, !10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 257652)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 257652)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "t2.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo::bar", linkageName: "\01?bar@foo@@YAHH@Z", scope: !5, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo::bar", linkageName: "\01?bar@foo@@YAHH@Z", scope: !5, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DINamespace(name: "foo", scope: null, file: !1, line: 1) !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/DebugInfo/COFF/fp-stack.ll =================================================================== --- test/DebugInfo/COFF/fp-stack.ll +++ test/DebugInfo/COFF/fp-stack.ll @@ -28,11 +28,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 261537) (llvm/trunk 261463)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 261537) (llvm/trunk 261463)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "", directory: "/") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", linkageName: "f", scope: !5, file: !5, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !9) +!4 = distinct !DISubprogram(name: "f", linkageName: "f", scope: !5, file: !5, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !9) !5 = !DIFile(filename: "t.ii", directory: "/") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/COFF/inlining-files.ll =================================================================== --- test/DebugInfo/COFF/inlining-files.ll +++ test/DebugInfo/COFF/inlining-files.ll @@ -76,14 +76,13 @@ !llvm.module.flags = !{!12, !13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !8) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !8) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DISubprogram(name: "file_change", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!7 = distinct !DISubprogram(name: "file_change", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !8 = !{!9} !9 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, variable: i32* @x) !10 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !11) Index: test/DebugInfo/COFF/inlining-levels.ll =================================================================== --- test/DebugInfo/COFF/inlining-levels.ll +++ test/DebugInfo/COFF/inlining-levels.ll @@ -58,19 +58,18 @@ !llvm.module.flags = !{!16, !17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !13) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !13) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4, !8, !11, !12} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "h", linkageName: "\01?h@@YAXXZ", scope: !1, file: !1, line: 9, type: !9, isLocal: true, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!8 = distinct !DISubprogram(name: "h", linkageName: "\01?h@@YAXXZ", scope: !1, file: !1, line: 9, type: !9, isLocal: true, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{null} -!11 = distinct !DISubprogram(name: "g", linkageName: "\01?g@@YAXXZ", scope: !1, file: !1, line: 6, type: !9, isLocal: true, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2) -!12 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXXZ", scope: !1, file: !1, line: 2, type: !9, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!11 = distinct !DISubprogram(name: "g", linkageName: "\01?g@@YAXXZ", scope: !1, file: !1, line: 6, type: !9, isLocal: true, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) +!12 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXXZ", scope: !1, file: !1, line: 2, type: !9, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !13 = !{!14} !14 = !DIGlobalVariable(name: "x", linkageName: "\01?x@@3HC", scope: !0, file: !1, line: 1, type: !15, isLocal: false, isDefinition: true, variable: i32* @"\01?x@@3HC") !15 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) Index: test/DebugInfo/COFF/inlining.ll =================================================================== --- test/DebugInfo/COFF/inlining.ll +++ test/DebugInfo/COFF/inlining.ll @@ -221,14 +221,13 @@ !llvm.module.flags = !{!8, !9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4, !6, !7} -!4 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 13, type: !5, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 13, type: !5, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !2) -!6 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 8, type: !5, isLocal: true, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !2) -!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!6 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 8, type: !5, isLocal: true, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) +!7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !8 = !{i32 2, !"CodeView", i32 1} !9 = !{i32 2, !"Debug Info Version", i32 3} !10 = !{i32 1, !"PIC Level", i32 2} Index: test/DebugInfo/COFF/local-constant.ll =================================================================== --- test/DebugInfo/COFF/local-constant.ll +++ test/DebugInfo/COFF/local-constant.ll @@ -51,11 +51,10 @@ !llvm.module.flags = !{!10, !11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 260957)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 260957)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "constant_var", linkageName: "\01?constant_var@@YAXXZ", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "constant_var", linkageName: "\01?constant_var@@YAXXZ", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !7) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8} Index: test/DebugInfo/COFF/local-variables.ll =================================================================== --- test/DebugInfo/COFF/local-variables.ll +++ test/DebugInfo/COFF/local-variables.ll @@ -276,15 +276,14 @@ !llvm.module.flags = !{!11, !12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "will_be_inlined", linkageName: "\01?will_be_inlined@@YAXXZ", scope: !1, file: !1, line: 3, type: !9, isLocal: true, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "will_be_inlined", linkageName: "\01?will_be_inlined@@YAXXZ", scope: !1, file: !1, line: 3, type: !9, isLocal: true, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{null} !11 = !{i32 2, !"CodeView", i32 1} Index: test/DebugInfo/COFF/multifile.ll =================================================================== --- test/DebugInfo/COFF/multifile.ll +++ test/DebugInfo/COFF/multifile.ll @@ -246,11 +246,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "D:\5C") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "input.c", directory: "D:\5C") !6 = !DIFile(filename: "input.c", directory: "D:C") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/COFF/multifunction.ll =================================================================== --- test/DebugInfo/COFF/multifunction.ll +++ test/DebugInfo/COFF/multifunction.ll @@ -584,17 +584,16 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "D:\5C") !2 = !{} -!3 = !{!4, !9, !10} -!4 = distinct !DISubprogram(name: "x", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "x", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "source.c", directory: "D:\5C") !6 = !DIFile(filename: "source.c", directory: "D:C") !7 = !DISubroutineType(types: !8) !8 = !{null} -!9 = distinct !DISubprogram(name: "y", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) -!10 = distinct !DISubprogram(name: "f", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !7, variables: !2) +!9 = distinct !DISubprogram(name: "y", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) +!10 = distinct !DISubprogram(name: "f", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !6, type: !7, variables: !2) !11 = !{i32 2, !"CodeView", i32 1} !12 = !{i32 1, !"Debug Info Version", i32 3} !13 = !{!"clang version 3.5 "} Index: test/DebugInfo/COFF/register-variables.ll =================================================================== --- test/DebugInfo/COFF/register-variables.ll +++ test/DebugInfo/COFF/register-variables.ll @@ -239,11 +239,10 @@ !llvm.module.flags = !{!25, !26, !27} !llvm.ident = !{!28} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !22) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !22) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4, !16} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -255,7 +254,7 @@ !13 = !DILocalVariable(name: "b", scope: !11, file: !1, line: 12, type: !7) !14 = !DILocalVariable(name: "c", scope: !15, file: !1, line: 15, type: !7) !15 = distinct !DILexicalBlock(scope: !12, file: !1, line: 14, column: 10) -!16 = distinct !DISubprogram(name: "inlineinc", scope: !1, file: !1, line: 4, type: !17, isLocal: true, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, variables: !19) +!16 = distinct !DISubprogram(name: "inlineinc", scope: !1, file: !1, line: 4, type: !17, isLocal: true, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !19) !17 = !DISubroutineType(types: !18) !18 = !{!7, !7} !19 = !{!20, !21} Index: test/DebugInfo/COFF/simple.ll =================================================================== --- test/DebugInfo/COFF/simple.ll +++ test/DebugInfo/COFF/simple.ll @@ -206,11 +206,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "D:\5C") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "test.c", directory: "D:\5C") !6 = !DIFile(filename: "test.c", directory: "D:C") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll =================================================================== --- test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll +++ test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll @@ -58,14 +58,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.cpp", directory: "D:\5C") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "spam", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "spam", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.cpp", directory: "D:C") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "bar", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "bar", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"CodeView", i32 1} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/Generic/2009-11-03-InsertExtractValue.ll =================================================================== --- test/DebugInfo/Generic/2009-11-03-InsertExtractValue.ll +++ test/DebugInfo/Generic/2009-11-03-InsertExtractValue.ll @@ -8,9 +8,9 @@ !2 = !DISubroutineType(types: !3) !3 = !{null} !4 = !DIFile(filename: "/foo", directory: "bar.cpp") -!5 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: true, emissionKind: FullDebug, file: !4, subprograms: !{!0}, enums: !{}, retainedTypes: !{}) +!5 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: true, emissionKind: FullDebug, file: !4, enums: !{}, retainedTypes: !{}) -define <{i32, i32}> @f1() { +define <{i32, i32}> @f1() !dbg !0 { ; CHECK: !dbgx ![[NUMBER:[0-9]+]] %r = insertvalue <{ i32, i32 }> zeroinitializer, i32 4, 1, !dbgx !1 ; CHECK: !dbgx ![[NUMBER]] Index: test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll =================================================================== --- test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll +++ test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll @@ -10,10 +10,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, subprograms: !3, globals: !12) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, globals: !12) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !17, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !17, scope: !6, type: !7) !6 = !DIFile(filename: "fb.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll =================================================================== --- test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll +++ test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll @@ -4,7 +4,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, globals: !3) !2 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i32* @0) Index: test/DebugInfo/Generic/2009-11-10-CurrentFn.ll =================================================================== --- test/DebugInfo/Generic/2009-11-10-CurrentFn.ll +++ test/DebugInfo/Generic/2009-11-10-CurrentFn.ll @@ -13,10 +13,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, globals: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !17, scope: !6, type: !7, variables: !9) +!5 = distinct !DISubprogram(name: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, file: !17, scope: !6, type: !7, variables: !9) !6 = !DIFile(filename: "cf.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null} Index: test/DebugInfo/Generic/2010-01-05-DbgScope.ll =================================================================== --- test/DebugInfo/Generic/2010-01-05-DbgScope.ll +++ test/DebugInfo/Generic/2010-01-05-DbgScope.ll @@ -13,13 +13,12 @@ !0 = !DILocation(line: 571, column: 3, scope: !1) !1 = distinct !DILexicalBlock(line: 1, column: 1, file: !11, scope: !2) -!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 561, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !3, type: !4) -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !12, retainedTypes: !12, subprograms: !13) +!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 561, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scope: !3, type: !4) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !12, retainedTypes: !12) !4 = !DISubroutineType(types: !5) !5 = !{!6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !10 = !DILocation(line: 588, column: 1, scope: !2) !11 = !DIFile(filename: "hashtab.c", directory: "/usr/src/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcclibs/libiberty") !12 = !{} -!13 = !{!2} !14 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-03-12-llc-crash.ll =================================================================== --- test/DebugInfo/Generic/2010-03-12-llc-crash.ll +++ test/DebugInfo/Generic/2010-03-12-llc-crash.ll @@ -11,7 +11,7 @@ !llvm.dbg.cu = !{!3} !0 = !DILocalVariable(name: "sy", line: 890, arg: 1, scope: !1, file: !2, type: !7) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 892, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !3, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 892, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !8, scope: !3, type: !4) !2 = !DIFile(filename: "qpainter.h", directory: "QtGui") !3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.1", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !10, retainedTypes: !10) !4 = !DISubroutineType(types: !6) Index: test/DebugInfo/Generic/2010-03-19-DbgDeclare.ll =================================================================== --- test/DebugInfo/Generic/2010-03-19-DbgDeclare.ll +++ test/DebugInfo/Generic/2010-03-19-DbgDeclare.ll @@ -9,12 +9,12 @@ } !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!5} -!2 = distinct !DICompileUnit(language: DW_LANG_Mips_Assembler, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !4, enums: !3, retainedTypes: !3, subprograms: !{!6}, globals: !3, imports: !3) +!2 = distinct !DICompileUnit(language: DW_LANG_Mips_Assembler, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !4, enums: !3, retainedTypes: !3, globals: !3, imports: !3) !3 = !{} !0 = !DILocation(line: 662302, column: 26, scope: !1) !1 = !DILocalVariable(name: "foo", scope: !6) !4 = !DIFile(filename: "scratch.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") -!6 = distinct !DISubprogram() +!6 = distinct !DISubprogram(unit: !2) declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !5 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-03-24-MemberFn.ll =================================================================== --- test/DebugInfo/Generic/2010-03-24-MemberFn.ll +++ test/DebugInfo/Generic/2010-03-24-MemberFn.ll @@ -42,16 +42,16 @@ !0 = !DILocalVariable(name: "s1", line: 3, scope: !1, file: !4, type: !9) !1 = distinct !DILexicalBlock(line: 3, column: 0, file: !25, scope: !2) !2 = distinct !DILexicalBlock(line: 3, column: 0, file: !25, scope: !3) -!3 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !25, scope: !4, type: !6) +!3 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, scopeLine: 3, file: !25, scope: !4, type: !6) !4 = !DIFile(filename: "one.cc", directory: "/tmp/") -!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !25, enums: !27, retainedTypes: !27, subprograms: !24, imports: null) +!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !25, enums: !27, retainedTypes: !27, imports: null) !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", line: 2, size: 8, align: 8, file: !26, scope: !4, elements: !11) !10 = !DIFile(filename: "one.h", directory: "/tmp/") !11 = !{!12} -!12 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1S3fooEv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !26, scope: !9, type: !13) +!12 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1S3fooEv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, scopeLine: 3, file: !26, scope: !9, type: !13) !13 = !DISubroutineType(types: !14) !14 = !{!8, !15} !15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !25, scope: !4, baseType: !9) @@ -64,7 +64,6 @@ !21 = !DILocation(line: 3, scope: !12) !22 = !DILocation(line: 3, scope: !23) !23 = distinct !DILexicalBlock(line: 3, column: 0, file: !26, scope: !12) -!24 = !{!3, !12} !25 = !DIFile(filename: "one.cc", directory: "/tmp/") !26 = !DIFile(filename: "one.h", directory: "/tmp/") !27 = !{} Index: test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll =================================================================== --- test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll +++ test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll @@ -72,15 +72,15 @@ !0 = !DILocalVariable(name: "b", line: 16, scope: !1, file: !3, type: !8) !1 = distinct !DILexicalBlock(line: 15, column: 12, file: !38, scope: !2) -!2 = distinct !DISubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 15, file: !38, scope: !3, type: !5) +!2 = distinct !DISubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, scopeLine: 15, file: !38, scope: !3, type: !5) !3 = !DIFile(filename: "one.cc", directory: "/tmp") -!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: FullDebug, file: !38, enums: !39, retainedTypes: !39, subprograms: !37, imports: null) +!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: FullDebug, file: !38, enums: !39, retainedTypes: !39, imports: null) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 2, size: 8, align: 8, file: !38, scope: !3, elements: !9) !9 = !{!10} -!10 = distinct !DISubprogram(name: "fn", linkageName: "_ZN1B2fnEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !38, scope: !8, type: !11) +!10 = distinct !DISubprogram(name: "fn", linkageName: "_ZN1B2fnEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, scopeLine: 4, file: !38, scope: !8, type: !11) !11 = !DISubroutineType(types: !12) !12 = !{!7, !13} !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !8) @@ -94,7 +94,7 @@ !20 = distinct !DILexicalBlock(line: 4, column: 12, file: !38, scope: !10) !21 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 5, size: 8, align: 8, file: !38, scope: !10, elements: !22) !22 = !{!23} -!23 = distinct !DISubprogram(name: "foo", linkageName: "_ZZN1B2fnEvEN1A3fooEv", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !38, scope: !21, type: !24) +!23 = distinct !DISubprogram(name: "foo", linkageName: "_ZZN1B2fnEvEN1A3fooEv", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, scopeLine: 7, file: !38, scope: !21, type: !24) !24 = !DISubroutineType(types: !25) !25 = !{!7, !26} !26 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !21) Index: test/DebugInfo/Generic/2010-04-19-FramePtr.ll =================================================================== --- test/DebugInfo/Generic/2010-04-19-FramePtr.ll +++ test/DebugInfo/Generic/2010-04-19-FramePtr.ll @@ -24,9 +24,9 @@ !9 = !{!1} !0 = !DILocation(line: 2, scope: !1) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !10, scope: null, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 2, file: !10, scope: null, type: !4) !2 = !DIFile(filename: "a.c", directory: "/tmp") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, subprograms: !9, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/2010-05-03-DisableFramePtr.ll =================================================================== --- test/DebugInfo/Generic/2010-05-03-DisableFramePtr.ll +++ test/DebugInfo/Generic/2010-05-03-DisableFramePtr.ll @@ -19,9 +19,9 @@ !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!19} !0 = !DILocalVariable(name: "userUPP", line: 7, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "DisposeDMNotificationUPP", linkageName: "DisposeDMNotificationUPP", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !16, scope: null, type: !4) +!1 = distinct !DISubprogram(name: "DisposeDMNotificationUPP", linkageName: "DisposeDMNotificationUPP", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !16, scope: null, type: !4) !2 = !DIFile(filename: "t.c", directory: "/Users/echeng/LLVM/radars/r7937664/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !17, retainedTypes: !17, subprograms: !18) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !17, retainedTypes: !17) !4 = !DISubroutineType(types: !5) !5 = !{null, !6} ; Manually modified to avoid dependence on pointer size in generic test @@ -37,5 +37,4 @@ !15 = distinct !DILexicalBlock(line: 7, column: 0, file: !16, scope: !1) !16 = !DIFile(filename: "t.c", directory: "/Users/echeng/LLVM/radars/r7937664/") !17 = !{} -!18 = !{!1} !19 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-05-03-OriginDIE.ll =================================================================== --- test/DebugInfo/Generic/2010-05-03-OriginDIE.ll +++ test/DebugInfo/Generic/2010-05-03-OriginDIE.ll @@ -52,21 +52,21 @@ !llvm.module.flags = !{!41} !0 = !DILocation(line: 808, scope: !1) !1 = distinct !DILexicalBlock(line: 807, column: 0, file: !39, scope: !2) -!2 = distinct !DISubprogram(name: "gpt2gpm", linkageName: "gpt2gpm", line: 807, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !39, scope: null, type: !5) +!2 = distinct !DISubprogram(name: "gpt2gpm", linkageName: "gpt2gpm", line: 807, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, file: !39, scope: null, type: !5) !3 = !DIFile(filename: "G.c", directory: "/tmp") -!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "llvm-gcc", isOptimized: true, emissionKind: FullDebug, file: !39, enums: !18, retainedTypes: !18, subprograms: !40) +!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "llvm-gcc", isOptimized: true, emissionKind: FullDebug, file: !39, enums: !18, retainedTypes: !18) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !DILocation(line: 810, scope: !1) !8 = !DILocalVariable(name: "data", line: 201, arg: 1, scope: !9, file: !10, type: !11) -!9 = distinct !DISubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5) +!9 = distinct !DISubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, file: !10, scope: null, type: !5) !10 = !DIFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc") !11 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13) !12 = !DIFile(filename: "stdint.h", directory: "/usr/4.2.1/include") !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) !14 = !DILocation(line: 202, scope: !9, inlinedAt: !7) !15 = !DILocalVariable(name: "base", line: 92, arg: 2, scope: !16, file: !10, type: !17) -!16 = distinct !DISubprogram(name: "OSReadSwapInt64", linkageName: "OSReadSwapInt64", line: 95, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !38, scope: null, type: !5) +!16 = distinct !DISubprogram(name: "OSReadSwapInt64", linkageName: "OSReadSwapInt64", line: 95, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, file: !38, scope: null, type: !5) !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !39, scope: !3, baseType: null) !18 = !{} !19 = !DILocalVariable(name: "byteOffset", line: 94, arg: 3, scope: !16, file: !10, type: !20) @@ -90,5 +90,4 @@ !37 = !DIFile(filename: "types.h", directory: "/usr/include/ppc") !38 = !DIFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc") !39 = !DIFile(filename: "G.c", directory: "/tmp") -!40 = !{!2, !9, !16} !41 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-05-10-MultipleCU.ll =================================================================== --- test/DebugInfo/Generic/2010-05-10-MultipleCU.ll +++ test/DebugInfo/Generic/2010-05-10-MultipleCU.ll @@ -24,17 +24,17 @@ !0 = !DILocation(line: 3, scope: !1) !1 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !2) -!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !18, scope: !3, type: !5) +!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, file: !18, scope: !3, type: !5) !3 = !DIFile(filename: "a.c", directory: "/tmp/") -!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !16) +!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DILocation(line: 3, scope: !9) !9 = distinct !DILexicalBlock(line: 2, column: 0, file: !20, scope: !10) -!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !20, scope: !11, type: !13) +!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !12, file: !20, scope: !11, type: !13) !11 = !DIFile(filename: "b.c", directory: "/tmp/") -!12 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !19, retainedTypes: !19, subprograms: !17) +!12 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !19, retainedTypes: !19) !13 = !DISubroutineType(types: !14) !14 = !{!15} !15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll =================================================================== --- test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll +++ test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll @@ -25,13 +25,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!28} -!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) +!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) !1 = !DIFile(filename: "bar.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, subprograms: !25, globals: !26, imports: !20) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, globals: !26, imports: !20) !3 = !DISubroutineType(types: !4) !4 = !{!5, !5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !27, scope: !1, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{!5} !9 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) @@ -54,7 +54,6 @@ !22 = !DILocation(line: 11, scope: !11, inlinedAt: !17) !23 = !DILocation(line: 16, scope: !18) !24 = !{!9, !10} -!25 = !{!0, !6} !26 = !{!16} !27 = !DIFile(filename: "bar.c", directory: "/tmp/") !28 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-07-19-Crash.ll =================================================================== --- test/DebugInfo/Generic/2010-07-19-Crash.ll +++ test/DebugInfo/Generic/2010-07-19-Crash.ll @@ -11,19 +11,18 @@ !llvm.module.flags = !{!15} !llvm.dbg.lv.foo = !{!7} -!0 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !12, scope: !1, type: !3) !1 = !DIFile(filename: "one.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.8", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !14, retainedTypes: !14, subprograms: !13) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.8", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !14, retainedTypes: !14) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3, declaration: !11) +!6 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !12, scope: !1, type: !3, declaration: !11) !7 = !DILocalVariable(name: "one", line: 8, scope: !8, file: !1, type: !5) !8 = distinct !DILexicalBlock(line: 7, column: 18, file: !12, scope: !6) !9 = !DILocation(line: 4, column: 3, scope: !10) !10 = distinct !DILexicalBlock(line: 3, column: 11, file: !12, scope: !0) !11 = !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: true, isDefinition: false, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3) !12 = !DIFile(filename: "one.c", directory: "/private/tmp") -!13 = !{!0, !6} !14 = !{} !15 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/2010-10-01-crash.ll =================================================================== --- test/DebugInfo/Generic/2010-10-01-crash.ll +++ test/DebugInfo/Generic/2010-10-01-crash.ll @@ -13,9 +13,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!27} -!0 = distinct !DISubprogram(name: "CGRectStandardize", linkageName: "CGRectStandardize", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !1, scope: null) +!0 = distinct !DISubprogram(name: "CGRectStandardize", linkageName: "CGRectStandardize", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !1, scope: null) !1 = !DIFile(filename: "GSFusedSilica.m", directory: "/Volumes/Data/Users/sabre/Desktop") -!2 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 2.9 (trunk 115292)", isOptimized: true, runtimeVersion: 1, emissionKind: FullDebug, file: !25, enums: !26, retainedTypes: !26, subprograms: !{!0}) +!2 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 2.9 (trunk 115292)", isOptimized: true, runtimeVersion: 1, emissionKind: FullDebug, file: !25, enums: !26, retainedTypes: !26) !5 = !DIDerivedType(tag: DW_TAG_typedef, name: "CGRect", line: 49, file: !25, baseType: null) !23 = !DILocalVariable(name: "rect", line: 53, arg: 2, scope: !0, file: !1, type: !5) !24 = !DILocation(line: 53, column: 33, scope: !0) Index: test/DebugInfo/Generic/Inputs/gmlt.ll =================================================================== --- test/DebugInfo/Generic/Inputs/gmlt.ll +++ test/DebugInfo/Generic/Inputs/gmlt.ll @@ -131,16 +131,15 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !7, !8, !9} -!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) -!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) -!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 2, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.6.0 "} Index: test/DebugInfo/Generic/PR20038.ll =================================================================== --- test/DebugInfo/Generic/PR20038.ll +++ test/DebugInfo/Generic/PR20038.ll @@ -123,7 +123,7 @@ !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !11, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -134,13 +134,12 @@ !8 = !DISubroutineType(types: !9) !9 = !{null, !10} !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C") -!11 = !{!12, !16, !17} -!12 = distinct !DISubprogram(name: "fun4", linkageName: "_Z4fun4v", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !13, type: !14, variables: !2) +!12 = distinct !DISubprogram(name: "fun4", linkageName: "_Z4fun4v", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !5, scope: !13, type: !14, variables: !2) !13 = !DIFile(filename: "PR20038.cpp", directory: "/tmp/dbginfo") !14 = !DISubroutineType(types: !15) !15 = !{null} -!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2) -!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2) +!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2) +!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2) !18 = !{i32 2, !"Dwarf Version", i32 4} !19 = !{i32 2, !"Debug Info Version", i32 3} !20 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/Generic/accel-table-hash-collisions.ll =================================================================== --- test/DebugInfo/Generic/accel-table-hash-collisions.ll +++ test/DebugInfo/Generic/accel-table-hash-collisions.ll @@ -69,7 +69,7 @@ !llvm.module.flags = !{!17, !18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "hash-collisions.c", directory: "/tmp") !2 = !{} !3 = !{!4, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16} Index: test/DebugInfo/Generic/array.ll =================================================================== --- test/DebugInfo/Generic/array.ll +++ test/DebugInfo/Generic/array.ll @@ -15,9 +15,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!16} -!0 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !14, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, scopeLine: 3, file: !14, scope: !1, type: !3) !1 = !DIFile(filename: "array.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129138)", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !15, retainedTypes: !15, subprograms: !13, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129138)", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !15, retainedTypes: !15, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -34,7 +34,6 @@ !10 = !DISubrange(count: -1) !11 = !DILocation(line: 4, column: 7, scope: !7) !12 = !DILocation(line: 5, column: 3, scope: !7) -!13 = !{!0} !14 = !DIFile(filename: "array.c", directory: "/private/tmp") !15 = !{} !16 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/block-asan.ll =================================================================== --- test/DebugInfo/Generic/block-asan.ll +++ test/DebugInfo/Generic/block-asan.ll @@ -58,11 +58,10 @@ !llvm.module.flags = !{!8, !9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 223120) (llvm/trunk 223119)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 223120) (llvm/trunk 223119)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "block.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "block.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Generic/constant-pointers.ll =================================================================== --- test/DebugInfo/Generic/constant-pointers.ll +++ test/DebugInfo/Generic/constant-pointers.ll @@ -30,11 +30,10 @@ !llvm.module.flags = !{!15, !16} !llvm.ident = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "constant-pointers.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcILPv0ELPFvvE0ELi42EEvv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, templateParams: !8, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcILPv0ELPFvvE0ELi42EEvv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, templateParams: !8, variables: !2) !5 = !DIFile(filename: "constant-pointers.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll =================================================================== --- test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll +++ test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll @@ -13,11 +13,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang-llvm/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll =================================================================== --- test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll +++ test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll @@ -11,11 +11,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, subprograms: !3, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, emissionKind: FullDebug) !1 = !DIFile(filename: "test.c", directory: "/home/user/clang-llvm/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) Index: test/DebugInfo/Generic/cross-cu-inlining.ll =================================================================== --- test/DebugInfo/Generic/cross-cu-inlining.ll +++ test/DebugInfo/Generic/cross-cu-inlining.ll @@ -112,19 +112,17 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18, !18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !2, subprograms: !11, globals: !2, imports: !2) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !10 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") -!11 = !{!12} -!12 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !10, scope: !13, type: !14, variables: !2) +!12 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !9, scopeLine: 1, file: !10, scope: !13, type: !14, variables: !2) !13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") !14 = !DISubroutineType(types: !15) !15 = !{!8, !8} Index: test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll =================================================================== --- test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll +++ test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll @@ -60,11 +60,10 @@ !llvm.module.flags = !{!19, !20} !llvm.ident = !{!21, !21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} @@ -72,10 +71,9 @@ !9 = !{!10} !10 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !11, variable: i32 (i32)** @x) !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !6) -!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !2, retainedTypes: !2, subprograms: !14, globals: !17, imports: !2) +!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !2, retainedTypes: !2, globals: !17, imports: !2) !13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") -!14 = !{!15} -!15 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !13, scope: !16, type: !6, variables: !2) +!15 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !12, scopeLine: 1, file: !13, scope: !16, type: !6, variables: !2) !16 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") !17 = !{!18} !18 = !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !11, variable: i32 (i32)** @y) Index: test/DebugInfo/Generic/cross-cu-linkonce.ll =================================================================== --- test/DebugInfo/Generic/cross-cu-linkonce.ll +++ test/DebugInfo/Generic/cross-cu-linkonce.ll @@ -48,11 +48,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19, !19} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !10, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !10, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo") !6 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo") !7 = !DISubroutineType(types: !8) @@ -61,7 +60,7 @@ !10 = !{!11} !11 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12, variable: i32 (i32)** @x) !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7) -!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !2, retainedTypes: !2, subprograms: !23, globals: !15, imports: !2) +!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !2, retainedTypes: !2, globals: !15, imports: !2) !14 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") !15 = !{!16} !16 = !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12, variable: i32 (i32)** @y) @@ -71,5 +70,4 @@ !20 = !DILocalVariable(name: "i", line: 1, arg: 1, scope: !4, file: !6, type: !9) !21 = !DILocation(line: 1, scope: !4) !22 = !DILocation(line: 2, scope: !4) -!23 = !{!24} -!24 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) +!24 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !13, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) Index: test/DebugInfo/Generic/cu-range-hole.ll =================================================================== --- test/DebugInfo/Generic/cu-range-hole.ll +++ test/DebugInfo/Generic/cu-range-hole.ll @@ -56,16 +56,15 @@ !llvm.module.flags = !{!11, !12} !0 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, subprograms: !4, globals: !3, imports: !3) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, globals: !3, imports: !3) !2 = !DIFile(filename: "b.c", directory: "/usr/local/google/home/echristo") !3 = !{} -!4 = !{!5, !10} -!5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !2, scope: !6, type: !7, variables: !3) +!5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !1, scopeLine: 1, file: !2, scope: !6, type: !7, variables: !3) !6 = !DIFile(filename: "b.c", directory: "/usr/local/google/home/echristo") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "d", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !2, scope: !6, type: !7, variables: !3) +!10 = distinct !DISubprogram(name: "d", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !1, scopeLine: 3, file: !2, scope: !6, type: !7, variables: !3) !11 = !{i32 2, !"Dwarf Version", i32 4} !12 = !{i32 1, !"Debug Info Version", i32 3} !13 = !DILocalVariable(name: "c", line: 1, arg: 1, scope: !5, file: !6, type: !9) Index: test/DebugInfo/Generic/cu-ranges.ll =================================================================== --- test/DebugInfo/Generic/cu-ranges.ll +++ test/DebugInfo/Generic/cu-ranges.ll @@ -49,16 +49,15 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 1, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} Index: test/DebugInfo/Generic/dbg-at-specficiation.ll =================================================================== --- test/DebugInfo/Generic/dbg-at-specficiation.ll +++ test/DebugInfo/Generic/dbg-at-specficiation.ll @@ -8,7 +8,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 140253)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 140253)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, globals: !3) !2 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: [10 x i32]* @a) Index: test/DebugInfo/Generic/dead-argument-order.ll =================================================================== --- test/DebugInfo/Generic/dead-argument-order.ll +++ test/DebugInfo/Generic/dead-argument-order.ll @@ -57,7 +57,7 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !8, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "dead-argument-order.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -65,8 +65,7 @@ !5 = !{!6} !6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !"_ZTS1S", baseType: !7) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = !{!9} -!9 = distinct !DISubprogram(name: "function", linkageName: "_Z8function1Si", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !10, type: !11, variables: !13) +!9 = distinct !DISubprogram(name: "function", linkageName: "_Z8function1Si", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !10, type: !11, variables: !13) !10 = !DIFile(filename: "dead-argument-order.cpp", directory: "/tmp/dbginfo") !11 = !DISubroutineType(types: !12) !12 = !{!7, !4, !7} Index: test/DebugInfo/Generic/debug-info-qualifiers.ll =================================================================== --- test/DebugInfo/Generic/debug-info-qualifiers.ll +++ test/DebugInfo/Generic/debug-info-qualifiers.ll @@ -61,7 +61,7 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !16, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "debug-info-qualifiers.cpp", directory: "") !2 = !{} !3 = !{!4} @@ -75,8 +75,7 @@ !11 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS1A") !13 = !DISubprogram(name: "r", linkageName: "_ZNKO1A1rEv", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagObjectPointer | DIFlagRValueReference, isOptimized: false, scopeLine: 7, file: !5, scope: !"_ZTS1A", type: !14) !14 = !DISubroutineType(flags: DIFlagRValueReference, types: !9) -!16 = !{!17} -!17 = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !5, scope: !18, type: !19, variables: !2) +!17 = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !5, scope: !18, type: !19, variables: !2) !18 = !DIFile(filename: "debug-info-qualifiers.cpp", directory: "") !19 = !DISubroutineType(types: !20) !20 = !{null} Index: test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll =================================================================== --- test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll +++ test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll @@ -27,7 +27,7 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "minimal.c", directory: "/tmp") !2 = !{} !3 = !{!4} Index: test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll =================================================================== --- test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll +++ test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll @@ -22,18 +22,16 @@ !llvm.dbg.cu = !{!0, !8} !llvm.module.flags = !{!13, !16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test1.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test1.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !2, retainedTypes: !2, subprograms: !10, globals: !2, imports: !2) +!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !9 = !DIFile(filename: "test2.c", directory: "/tmp") -!10 = !{!11} -!11 = distinct !DISubprogram(name: "g", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !9, scope: !12, type: !6, variables: !2) +!11 = distinct !DISubprogram(name: "g", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !8, scopeLine: 1, file: !9, scope: !12, type: !6, variables: !2) !12 = !DIFile(filename: "test2.c", directory: "/tmp") !13 = !{i32 2, !"Dwarf Version", i32 4} !14 = !DILocation(line: 1, scope: !4) Index: test/DebugInfo/Generic/def-line.ll =================================================================== --- test/DebugInfo/Generic/def-line.ll +++ test/DebugInfo/Generic/def-line.ll @@ -68,7 +68,7 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 249440) (llvm/trunk 249465)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 249440) (llvm/trunk 249465)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "def-line.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -79,11 +79,10 @@ !8 = !{null} !9 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 4, type: !7, isLocal: false, isDefinition: false, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false) !10 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !1, line: 5, type: !7, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false) -!11 = !{!12, !13, !15} -!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, declaration: !9, variables: !2) -!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, declaration: !10, variables: !2) +!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !9, variables: !2) +!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !10, variables: !2) !14 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo") -!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, declaration: !6, variables: !2) +!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !6, variables: !2) !16 = !{i32 2, !"Dwarf Version", i32 4} !17 = !{i32 2, !"Debug Info Version", i32 3} !18 = !{!"clang version 3.8.0 (trunk 249440) (llvm/trunk 249465)"} Index: test/DebugInfo/Generic/discriminator.ll =================================================================== --- test/DebugInfo/Generic/discriminator.ll +++ test/DebugInfo/Generic/discriminator.ll @@ -33,14 +33,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 252497)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 252497)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "a.cc", directory: "/tmp") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!7 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", scope: !1, file: !1, line: 2, type: !5, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 2, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.8.0 (trunk 252497)"} Index: test/DebugInfo/Generic/dwarf-public-names.ll =================================================================== --- test/DebugInfo/Generic/dwarf-public-names.ll +++ test/DebugInfo/Generic/dwarf-public-names.ll @@ -90,10 +90,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!38} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, subprograms: !2, globals: !24, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !24, imports: !1) !1 = !{} -!2 = !{!3, !18, !19, !20} -!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1) +!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1) !4 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} @@ -108,9 +107,9 @@ !15 = !DISubroutineType(types: !16) !16 = !{!11} !17 = !{} ; previously: invalid DW_TAG_base_type -!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1) -!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1) -!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1) +!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1) +!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1) +!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1) !21 = !DINamespace(name: "ns", line: 23, file: !4, scope: null) !22 = !DISubroutineType(types: !23) !23 = !{null} Index: test/DebugInfo/Generic/empty.ll =================================================================== --- test/DebugInfo/Generic/empty.ll +++ test/DebugInfo/Generic/empty.ll @@ -24,7 +24,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} !3 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") !4 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") Index: test/DebugInfo/Generic/enum-types.ll =================================================================== --- test/DebugInfo/Generic/enum-types.ll +++ test/DebugInfo/Generic/enum-types.ll @@ -48,24 +48,22 @@ !llvm.module.flags = !{!19, !20} !llvm.ident = !{!21, !21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !6, globals: !11, imports: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !11, imports: !11) !1 = !DIFile(filename: "a.cpp", directory: "") !2 = !{!3} !3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "EA", line: 1, size: 32, align: 32, file: !1, elements: !4, identifier: "_ZTS2EA") !4 = !{!5} !5 = !DIEnumerator(name: "EA_0", value: 0) ; [ DW_TAG_enumerator ] [EA_0 :: 0] -!6 = !{!7} -!7 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topA2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !8, type: !9, variables: !11) +!7 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topA2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !8, type: !9, variables: !11) !8 = !DIFile(filename: "a.cpp", directory: "") !9 = !DISubroutineType(types: !10) !10 = !{null, !"_ZTS2EA"} !11 = !{} -!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !14, retainedTypes: !14, subprograms: !16, globals: !11, imports: !11) +!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214133) (llvm/trunk 214102:214132)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !14, retainedTypes: !14, globals: !11, imports: !11) !13 = !DIFile(filename: "b.cpp", directory: "") !14 = !{!15} !15 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "EA", line: 1, size: 32, align: 32, file: !13, elements: !4, identifier: "_ZTS2EA") -!16 = !{!17} -!17 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topB2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !13, scope: !18, type: !9, variables: !11) +!17 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topB2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !12, scopeLine: 5, file: !13, scope: !18, type: !9, variables: !11) !18 = !DIFile(filename: "b.cpp", directory: "") !19 = !{i32 2, !"Dwarf Version", i32 2} !20 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/Generic/enum.ll =================================================================== --- test/DebugInfo/Generic/enum.ll +++ test/DebugInfo/Generic/enum.ll @@ -53,7 +53,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!19, !24} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !11, subprograms: !12, globals: !17, imports: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !11, globals: !17, imports: !11) !1 = !DIFile(filename: "enum.cpp", directory: "/tmp") !2 = !{!3, !8} !3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e1", line: 1, size: 64, align: 64, file: !1, elements: !4) @@ -65,8 +65,7 @@ !9 = !{!10} !10 = !DIEnumerator(name: "X", value: 0) ; [ DW_TAG_enumerator ] [X :: 0] !11 = !{} -!12 = !{!13} -!13 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !14, type: !15, variables: !11) +!13 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !14, type: !15, variables: !11) !14 = !DIFile(filename: "enum.cpp", directory: "/tmp") !15 = !DISubroutineType(types: !16) !16 = !{null} Index: test/DebugInfo/Generic/global.ll =================================================================== --- test/DebugInfo/Generic/global.ll +++ test/DebugInfo/Generic/global.ll @@ -26,11 +26,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !1 = !DIFile(filename: "global.cpp", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "global.cpp", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Generic/gvn.ll =================================================================== --- test/DebugInfo/Generic/gvn.ll +++ test/DebugInfo/Generic/gvn.ll @@ -67,18 +67,17 @@ !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !15) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !15) !1 = !DIFile(filename: "test.c", directory: "/") !2 = !{} -!3 = !{!4, !12} -!4 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !10) +!4 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !10) !6 = !DISubroutineType(types: !7) !7 = !{null, !8} !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64) !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !{!11} !11 = !DILocalVariable(name: "p1", arg: 1, scope: !4, file: !1, line: 2, type: !8) -!12 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!12 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !13 = !DISubroutineType(types: !14) !14 = !{null} !15 = !{!16, !17} Index: test/DebugInfo/Generic/incorrect-variable-debugloc.ll =================================================================== --- test/DebugInfo/Generic/incorrect-variable-debugloc.ll +++ test/DebugInfo/Generic/incorrect-variable-debugloc.ll @@ -336,7 +336,7 @@ !llvm.module.flags = !{!36, !37} !llvm.ident = !{!38} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !21, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !14} @@ -357,18 +357,17 @@ !18 = !DISubroutineType(types: !19) !19 = !{null, !20} !20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B") -!21 = !{!22, !28, !32} -!22 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !5, scope: !23, type: !24, variables: !26) +!22 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 16, file: !5, scope: !23, type: !24, variables: !26) !23 = !DIFile(filename: "incorrect-variable-debug-loc.cpp", directory: "/tmp/dbginfo") !24 = !DISubroutineType(types: !25) !25 = !{!8} !26 = !{!27} !27 = !DILocalVariable(name: "A", line: 17, scope: !22, file: !23, type: !"_ZTS1C") -!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !"_ZTS1C", type: !11, declaration: !10, variables: !29) +!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !"_ZTS1C", type: !11, declaration: !10, variables: !29) !29 = !{!30} !30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31) !31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C") -!32 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !18, declaration: !17, variables: !33) +!32 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1B5m_fn2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !5, scope: !"_ZTS1B", type: !18, declaration: !17, variables: !33) !33 = !{!34} !34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !32, type: !35) !35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1B") Index: test/DebugInfo/Generic/incorrect-variable-debugloc1.ll =================================================================== --- test/DebugInfo/Generic/incorrect-variable-debugloc1.ll +++ test/DebugInfo/Generic/incorrect-variable-debugloc1.ll @@ -53,11 +53,10 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 223522)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 223522)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.cpp", directory: "/home/kromanova/ngh/ToT_latest/llvm/test/DebugInfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "test.cpp", directory: "/home/kromanova/ngh/ToT_latest/llvm/test/DebugInfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Generic/inheritance.ll =================================================================== --- test/DebugInfo/Generic/inheritance.ll +++ test/DebugInfo/Generic/inheritance.ll @@ -109,7 +109,7 @@ !0 = !DILocalVariable(name: "tst", line: 13, scope: !1, file: !4, type: !8) !1 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !2) !2 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !3) -!3 = distinct !DISubprogram(name: "main", linkageName: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !4, type: !5) +!3 = distinct !DISubprogram(name: "main", linkageName: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, scope: !4, type: !5) !4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !44, enums: !45, retainedTypes: !45) !5 = !DISubroutineType(types: !6) !6 = !{!7} @@ -131,7 +131,7 @@ !22 = !DILocation(line: 13, scope: !1) !23 = !DILocation(line: 14, scope: !1) !24 = !DILocalVariable(name: "this", line: 13, arg: 1, scope: !25, file: !4, type: !26) -!25 = distinct !DISubprogram(name: "test1", linkageName: "_ZN5test1C1Ev", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !4, type: !15) +!25 = distinct !DISubprogram(name: "test1", linkageName: "_ZN5test1C1Ev", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, scope: !4, type: !15) !26 = !DIDerivedType(tag: DW_TAG_const_type, size: 64, align: 64, flags: DIFlagArtificial, file: !4, baseType: !27) !27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !4, baseType: !8) !28 = !DILocation(line: 1, scope: !25) @@ -139,13 +139,13 @@ !30 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !31) !31 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !25) !32 = !DILocalVariable(name: "this", line: 4, arg: 1, scope: !33, file: !4, type: !26) -!33 = distinct !DISubprogram(name: "~test1", linkageName: "_ZN5test1D1Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, scope: !8, type: !15, containingType: !8) +!33 = distinct !DISubprogram(name: "~test1", linkageName: "_ZN5test1D1Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, unit: !4, scope: !8, type: !15, containingType: !8) !34 = !DILocation(line: 4, scope: !33) !35 = !DILocation(line: 5, scope: !36) !36 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !33) !37 = !DILocation(line: 6, scope: !36) !38 = !DILocalVariable(name: "this", line: 4, arg: 1, scope: !39, file: !4, type: !26) -!39 = distinct !DISubprogram(name: "~test1", linkageName: "_ZN5test1D0Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, scope: !8, type: !15, containingType: !8) +!39 = distinct !DISubprogram(name: "~test1", linkageName: "_ZN5test1D0Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, unit: !4, scope: !8, type: !15, containingType: !8) !40 = !DILocation(line: 4, scope: !39) !41 = !DILocation(line: 5, scope: !42) !42 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !39) Index: test/DebugInfo/Generic/inline-debug-info-multiret.ll =================================================================== --- test/DebugInfo/Generic/inline-debug-info-multiret.ll +++ test/DebugInfo/Generic/inline-debug-info-multiret.ll @@ -122,17 +122,16 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!31} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "test.cpp", directory: "") !6 = !DIFile(filename: "test.cpp", directory: "") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2) +!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!9} !13 = !DILocalVariable(name: "k", line: 4, arg: 1, scope: !4, file: !6, type: !9) Index: test/DebugInfo/Generic/inline-debug-info.ll =================================================================== --- test/DebugInfo/Generic/inline-debug-info.ll +++ test/DebugInfo/Generic/inline-debug-info.ll @@ -140,17 +140,16 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!31} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "test.cpp", directory: "") !6 = !DIFile(filename: "test.cpp", directory: "") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2) +!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!9} !13 = !DILocalVariable(name: "k", line: 4, arg: 1, scope: !4, file: !6, type: !9) Index: test/DebugInfo/Generic/inline-no-debug-info.ll =================================================================== --- test/DebugInfo/Generic/inline-no-debug-info.ll +++ test/DebugInfo/Generic/inline-no-debug-info.ll @@ -55,14 +55,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (210174)", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (210174)", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/code/llvm/build0") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "caller", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "caller", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/code/llvm/build0") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "callee2", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "callee2", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 2, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5.0 (210174)"} Index: test/DebugInfo/Generic/inline-scopes.ll =================================================================== --- test/DebugInfo/Generic/inline-scopes.ll +++ test/DebugInfo/Generic/inline-scopes.ll @@ -95,19 +95,18 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "inline-scopes.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !10, !12} -!4 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "y.cc", directory: "/tmp/dbginfo") !6 = !DIFile(filename: "y.cc", directory: "/tmp/dbginfo") !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !11, type: !7, variables: !2) +!10 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !11, type: !7, variables: !2) !11 = !DIFile(filename: "inline-scopes.cpp", directory: "/tmp/dbginfo") -!12 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !11, type: !7, variables: !2) +!12 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !11, type: !7, variables: !2) !13 = !{i32 2, !"Dwarf Version", i32 4} !14 = !{i32 1, !"Debug Info Version", i32 3} !15 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/Generic/inlined-arguments.ll =================================================================== --- test/DebugInfo/Generic/inlined-arguments.ll +++ test/DebugInfo/Generic/inlined-arguments.ll @@ -50,15 +50,14 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!26} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "exp.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "exp.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1ii", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !9, variables: !12) +!8 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1ii", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !9, variables: !12) !9 = !DISubroutineType(types: !10) !10 = !{null, !11, !11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/inlined-vars.ll =================================================================== --- test/DebugInfo/Generic/inlined-vars.ll +++ test/DebugInfo/Generic/inlined-vars.ll @@ -18,16 +18,15 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!27} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 159419)", isOptimized: true, emissionKind: FullDebug, file: !26, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 159419)", isOptimized: true, emissionKind: FullDebug, file: !26, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !{i32 0} !2 = !{} -!3 = !{!5, !10} -!5 = distinct !DISubprogram(name: "main", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !26, scope: !6, type: !7, variables: !2) +!5 = distinct !DISubprogram(name: "main", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 10, file: !26, scope: !6, type: !7, variables: !2) !6 = !DIFile(filename: "inline-bug.cc", directory: "/tmp/dbginfo/pr13202") !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "f", linkageName: "_ZL1fi", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !26, scope: !6, type: !11, variables: !13) +!10 = distinct !DISubprogram(name: "f", linkageName: "_ZL1fi", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !26, scope: !6, type: !11, variables: !13) !11 = !DISubroutineType(types: !12) !12 = !{!9, !9} !13 = !{!15, !16} Index: test/DebugInfo/Generic/location-verifier.ll =================================================================== --- test/DebugInfo/Generic/location-verifier.ll +++ test/DebugInfo/Generic/location-verifier.ll @@ -15,11 +15,10 @@ !llvm.module.flags = !{!9, !10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Generic/lto-comp-dir.ll =================================================================== --- test/DebugInfo/Generic/lto-comp-dir.ll +++ test/DebugInfo/Generic/lto-comp-dir.ll @@ -59,18 +59,16 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18, !18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo/a") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo/a") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !2, retainedTypes: !2, subprograms: !10, globals: !2, imports: !2) +!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !9, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !9 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo/b") -!10 = !{!11} -!11 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !9, scope: !12, type: !13, variables: !2) +!11 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !8, scopeLine: 2, file: !9, scope: !12, type: !13, variables: !2) !12 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo/b") !13 = !DISubroutineType(types: !14) !14 = !{!15} Index: test/DebugInfo/Generic/member-order.ll =================================================================== --- test/DebugInfo/Generic/member-order.ll +++ test/DebugInfo/Generic/member-order.ll @@ -43,7 +43,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!15, !20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "member-order.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -56,8 +56,7 @@ !10 = !{i32 786468} !11 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !7) !12 = !{i32 786468} -!13 = !{!14} -!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: null, type: !7, declaration: !6, variables: !2) +!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: null, type: !7, declaration: !6, variables: !2) !15 = !{i32 2, !"Dwarf Version", i32 4} !16 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !17) !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo") Index: test/DebugInfo/Generic/member-pointers.ll =================================================================== --- test/DebugInfo/Generic/member-pointers.ll +++ test/DebugInfo/Generic/member-pointers.ll @@ -23,7 +23,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !15, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !15, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5, !10} !5 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i64* @x) Index: test/DebugInfo/Generic/missing-abstract-variable.ll =================================================================== --- test/DebugInfo/Generic/missing-abstract-variable.ll +++ test/DebugInfo/Generic/missing-abstract-variable.ll @@ -135,21 +135,20 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "missing-abstract-variables.cc", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !8, !14} -!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "missing-abstract-variables.cc", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "a", linkageName: "_Z1ab", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 17, file: !1, scope: !5, type: !9, variables: !12) +!8 = distinct !DISubprogram(name: "a", linkageName: "_Z1ab", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 17, file: !1, scope: !5, type: !9, variables: !12) !9 = !DISubroutineType(types: !10) !10 = !{null, !11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) !12 = !{!13} !13 = !DILocalVariable(name: "u", line: 17, arg: 1, scope: !8, file: !5, type: !11) -!14 = distinct !DISubprogram(name: "x", linkageName: "_Z1xb", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !9, variables: !15) +!14 = distinct !DISubprogram(name: "x", linkageName: "_Z1xb", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !9, variables: !15) !15 = !{!16, !17} !16 = !DILocalVariable(name: "b", line: 5, arg: 1, scope: !14, file: !5, type: !11) !17 = !DILocalVariable(name: "s", line: 7, scope: !18, file: !5, type: !20) Index: test/DebugInfo/Generic/multiline.ll =================================================================== --- test/DebugInfo/Generic/multiline.ll +++ test/DebugInfo/Generic/multiline.ll @@ -61,11 +61,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 225000) (llvm/trunk 224999)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 225000) (llvm/trunk 224999)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Generic/namespace.ll =================================================================== --- test/DebugInfo/Generic/namespace.ll +++ test/DebugInfo/Generic/namespace.ll @@ -287,7 +287,7 @@ !llvm.module.flags = !{!57, !58} !llvm.ident = !{!59} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !30, imports: !33) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !30, imports: !33) !1 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp") !2 = !{} !3 = !{!4, !8} @@ -296,25 +296,24 @@ !6 = !DINamespace(name: "B", line: 1, file: !5, scope: !7) !7 = !DINamespace(name: "A", line: 5, file: !1, scope: null) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 6, size: 8, align: 8, file: !5, scope: !6, elements: !2, identifier: "_ZTSN1A1B3barE") -!9 = !{!10, !14, !17, !21, !25, !26, !27} -!10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !11, variables: !2) +!10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !11, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!13} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !15, variables: !2) +!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !5, scope: !6, type: !15, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{null, !13} -!17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !5, scope: !18, type: !19, variables: !2) +!17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 20, file: !5, scope: !18, type: !19, variables: !2) !18 = !DIFile(filename: "foo.cpp", directory: "/tmp") !19 = !DISubroutineType(types: !20) !20 = !{null} -!21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 21, file: !5, scope: !18, type: !22, variables: !2) +!21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 21, file: !5, scope: !18, type: !22, variables: !2) !22 = !DISubroutineType(types: !23) !23 = !{!13, !24} !24 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) -!25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 44, file: !5, scope: !18, type: !19, variables: !2) -!26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 47, file: !5, scope: !6, type: !19, variables: !2) -!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !28, type: !29, variables: !2) +!25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 44, file: !5, scope: !18, type: !19, variables: !2) +!26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 47, file: !5, scope: !6, type: !19, variables: !2) +!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !28, type: !29, variables: !2) !28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp") !29 = !DISubroutineType(types: !2) !30 = !{!31, !32} Index: test/DebugInfo/Generic/namespace_function_definition.ll =================================================================== --- test/DebugInfo/Generic/namespace_function_definition.ll +++ test/DebugInfo/Generic/namespace_function_definition.ll @@ -30,11 +30,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "namespace_function_definition.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DINamespace(name: "ns", line: 1, file: !1, scope: null) !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Generic/namespace_inline_function_definition.ll =================================================================== --- test/DebugInfo/Generic/namespace_inline_function_definition.ll +++ test/DebugInfo/Generic/namespace_inline_function_definition.ll @@ -70,16 +70,15 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "namespace_inline_function_definition.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "namespace_inline_function_definition.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEi", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !10, type: !11, variables: !2) +!9 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEi", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !10, type: !11, variables: !2) !10 = !DINamespace(name: "ns", line: 1, file: !1, scope: null) !11 = !DISubroutineType(types: !12) !12 = !{!8, !8} Index: test/DebugInfo/Generic/nodebug.ll =================================================================== --- test/DebugInfo/Generic/nodebug.ll +++ test/DebugInfo/Generic/nodebug.ll @@ -35,11 +35,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "nodebug.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "nodebug.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Generic/piece-verifier.ll =================================================================== --- test/DebugInfo/Generic/piece-verifier.ll +++ test/DebugInfo/Generic/piece-verifier.ll @@ -23,11 +23,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "pieces.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !15) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !15) !5 = !DIFile(filename: "pieces.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/Generic/ptrsize.ll =================================================================== --- test/DebugInfo/Generic/ptrsize.ll +++ test/DebugInfo/Generic/ptrsize.ll @@ -28,12 +28,11 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "dwarf-test.c", directory: "test") !2 = !{} -!3 = !{!4, !5} -!4 = distinct !DISubprogram(name: "foo", scope: !0, file: !1, line: 6, type: !6, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !2) -!5 = distinct !DISubprogram(name: "bar", scope: !0, file: !1, line: 6, type: !15, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !0, file: !1, line: 6, type: !6, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!5 = distinct !DISubprogram(name: "bar", scope: !0, file: !1, line: 6, type: !15, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !6 = !DISubroutineType(types: !7) !7 = !{!9} !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/recursive_inlining.ll =================================================================== --- test/DebugInfo/Generic/recursive_inlining.ll +++ test/DebugInfo/Generic/recursive_inlining.ll @@ -199,7 +199,7 @@ !llvm.module.flags = !{!28, !29} !llvm.ident = !{!30} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !26, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !26, imports: !2) !1 = !DIFile(filename: "", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") !2 = !{} !3 = !{!4} @@ -212,16 +212,15 @@ !10 = !DISubroutineType(types: !11) !11 = !{null, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C") -!13 = !{!14, !18, !19, !20, !21, !22} -!14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 15, file: !5, scope: !15, type: !16, variables: !2) +!14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 15, file: !5, scope: !15, type: !16, variables: !2) !15 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") !16 = !DISubroutineType(types: !17) !17 = !{null} -!18 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 20, file: !5, scope: !15, type: !16, variables: !2) -!19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !15, type: !16, variables: !2) -!20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 22, file: !5, scope: !15, type: !16, variables: !2) -!21 = distinct !DISubprogram(name: "fn7", linkageName: "_Z3fn7v", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 14, file: !5, scope: !15, type: !16, variables: !2) -!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10, declaration: !9, variables: !23) +!18 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 20, file: !5, scope: !15, type: !16, variables: !2) +!19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !15, type: !16, variables: !2) +!20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 22, file: !5, scope: !15, type: !16, variables: !2) +!21 = distinct !DISubprogram(name: "fn7", linkageName: "_Z3fn7v", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !5, scope: !15, type: !16, variables: !2) +!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10, declaration: !9, variables: !23) !23 = !{!24} !24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C") Index: test/DebugInfo/Generic/restrict.ll =================================================================== --- test/DebugInfo/Generic/restrict.ll +++ test/DebugInfo/Generic/restrict.ll @@ -35,11 +35,10 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "restrict.c", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "restrict.c", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/Generic/skeletoncu.ll =================================================================== --- test/DebugInfo/Generic/skeletoncu.ll +++ test/DebugInfo/Generic/skeletoncu.ll @@ -8,7 +8,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, dwoId: 43981) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 43981) !1 = !DIFile(filename: "", directory: "/") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/Generic/sugared-constants.ll =================================================================== --- test/DebugInfo/Generic/sugared-constants.ll +++ test/DebugInfo/Generic/sugared-constants.ll @@ -50,11 +50,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "main", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Generic/template-recursive-void.ll =================================================================== --- test/DebugInfo/Generic/template-recursive-void.ll +++ test/DebugInfo/Generic/template-recursive-void.ll @@ -25,7 +25,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!36, !37} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 187958) (llvm/trunk 187964)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 187958) (llvm/trunk 187964)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{!4} Index: test/DebugInfo/Generic/tu-composite.ll =================================================================== --- test/DebugInfo/Generic/tu-composite.ll +++ test/DebugInfo/Generic/tu-composite.ll @@ -123,7 +123,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!35, !59} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !30, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "tmp.cpp", directory: ".") !2 = !{} !3 = !{!4, !18, !19, !22, !23, !24} @@ -152,9 +152,8 @@ !27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3bar") !28 = !{!29} !29 = !DITemplateTypeParameter(name: "T", type: !"_ZTS3bar") -!30 = !{!31, !32} -!31 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: null, type: !14, declaration: !13, variables: !2) -!32 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !1, scope: !7, type: !33, variables: !2) +!31 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: null, type: !14, declaration: !13, variables: !2) +!32 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 20, file: !1, scope: !7, type: !33, variables: !2) !33 = !DISubroutineType(types: !34) !34 = !{null} !35 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/Generic/tu-member-pointer.ll =================================================================== --- test/DebugInfo/Generic/tu-member-pointer.ll +++ test/DebugInfo/Generic/tu-member-pointer.ll @@ -16,7 +16,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!10, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !5, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !5, imports: !2) !1 = !DIFile(filename: "foo.cpp", directory: ".") !2 = !{} !3 = !{!4} Index: test/DebugInfo/Generic/two-cus-from-same-file.ll =================================================================== --- test/DebugInfo/Generic/two-cus-from-same-file.ll +++ test/DebugInfo/Generic/two-cus-from-same-file.ll @@ -36,16 +36,14 @@ !llvm.dbg.cu = !{!0, !9} !llvm.module.flags = !{!33} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !32, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !32, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "foo.c", directory: "/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null} -!9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, subprograms: !10, globals: !1, imports: !1) -!10 = !{!12} -!12 = distinct !DISubprogram(name: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !32, scope: !6, type: !13, variables: !19) +!9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, globals: !1, imports: !1) +!12 = distinct !DISubprogram(name: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !9, scopeLine: 11, file: !32, scope: !6, type: !13, variables: !19) !13 = !DISubroutineType(types: !14) !14 = !{!15, !15, !18} !15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/typedef.ll =================================================================== --- test/DebugInfo/Generic/typedef.ll +++ test/DebugInfo/Generic/typedef.ll @@ -18,7 +18,7 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} Index: test/DebugInfo/Generic/unconditional-branch.ll =================================================================== --- test/DebugInfo/Generic/unconditional-branch.ll +++ test/DebugInfo/Generic/unconditional-branch.ll @@ -45,11 +45,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (204712)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (204712)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "D:\5Cwork\5CEPRs\5C396363") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "D:CworkCEPRsC396363") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/Generic/varargs.ll =================================================================== --- test/DebugInfo/Generic/varargs.ll +++ test/DebugInfo/Generic/varargs.ll @@ -72,7 +72,7 @@ !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847") !2 = !{} !3 = !{!4} @@ -83,8 +83,7 @@ !8 = !{null, !9, !10, null} !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!13 = !{!14} -!14 = distinct !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !15, type: !16, variables: !2) +!14 = distinct !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !1, scope: !15, type: !16, variables: !2) !15 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847") !16 = !DISubroutineType(types: !17) !17 = !{null, !10, null} Index: test/DebugInfo/Generic/version.ll =================================================================== --- test/DebugInfo/Generic/version.ll +++ test/DebugInfo/Generic/version.ll @@ -18,11 +18,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185475)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185475)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "CodeGen/dwarf-version.c", directory: "test") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "CodeGen/dwarf-version.c", directory: "test") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Generic/virtual-index.ll =================================================================== --- test/DebugInfo/Generic/virtual-index.ll +++ test/DebugInfo/Generic/virtual-index.ll @@ -38,7 +38,7 @@ !llvm.module.flags = !{!20, !21} !llvm.ident = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !17) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "x", directory: "x") !2 = !{} !3 = !{!4} @@ -55,9 +55,8 @@ !14 = !{null, !15} !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A", size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) !16 = !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !"_ZTS1A", file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, containingType: !"_ZTS1A", virtuality: DW_VIRTUALITY_virtual, virtualIndex: 4294967295, flags: DIFlagPrototyped, isOptimized: false) -!17 = !{!18, !19} -!18 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !"_ZTS1A", file: !1, line: 6, type: !13, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: false, declaration: !12, variables: !2) -!19 = distinct !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !"_ZTS1A", file: !1, line: 7, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, declaration: !16, variables: !2) +!18 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", scope: !"_ZTS1A", file: !1, line: 6, type: !13, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2) +!19 = distinct !DISubprogram(name: "g", linkageName: "_ZN1A1gEv", scope: !"_ZTS1A", file: !1, line: 7, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !16, variables: !2) !20 = !{i32 2, !"Dwarf Version", i32 4} !21 = !{i32 2, !"Debug Info Version", i32 3} !22 = !{!"clang version 3.9.0 (trunk 263469) (llvm/trunk 263156)"} Index: test/DebugInfo/Inputs/gmlt.ll =================================================================== --- test/DebugInfo/Inputs/gmlt.ll +++ test/DebugInfo/Inputs/gmlt.ll @@ -131,16 +131,15 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !7, !8, !9} -!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) -!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) -!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 2, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.6.0 "} Index: test/DebugInfo/Inputs/line.ll =================================================================== --- test/DebugInfo/Inputs/line.ll +++ test/DebugInfo/Inputs/line.ll @@ -39,11 +39,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227472) (llvm/trunk 227476)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227472) (llvm/trunk 227476)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "line.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "line.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/MIR/X86/live-debug-values-3preds.mir =================================================================== --- test/DebugInfo/MIR/X86/live-debug-values-3preds.mir +++ test/DebugInfo/MIR/X86/live-debug-values-3preds.mir @@ -27,9 +27,9 @@ # DBG_VALUE for variables "x", "y" and "z" are extended into BB#9 from its # predecessors BB#0, BB#2 and BB#8. # CHECK: bb.9.for.end: -# CHECK: DBG_VALUE debug-use %edx, debug-use _, !11, !17, debug-location !21 -# CHECK-NEXT: DBG_VALUE debug-use %esi, debug-use _, !10, !17, debug-location !19 -# CHECK-NEXT: DBG_VALUE debug-use %edi, debug-use _, !9, !17, debug-location !18 +# CHECK: DBG_VALUE debug-use %edx, debug-use _, !13, !16, debug-location !20 +# CHECK-NEXT: DBG_VALUE debug-use %esi, debug-use _, !12, !16, debug-location !18 +# CHECK-NEXT: DBG_VALUE debug-use %edi, debug-use _, !11, !16, debug-location !17 --- | @@ -101,11 +101,10 @@ !llvm.module.flags = !{!14, !15} !llvm.ident = !{!16} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "LiveDebugValues-3preds.c", directory: "/home/vt/julia/test/tvvikram") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "add", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !8) + !4 = distinct !DISubprogram(name: "add", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7, !7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/MIR/X86/live-debug-values.mir =================================================================== --- test/DebugInfo/MIR/X86/live-debug-values.mir +++ test/DebugInfo/MIR/X86/live-debug-values.mir @@ -33,7 +33,7 @@ # DBG_VALUE for variable "n" is extended into BB#5 from its predecessors BB#3 # and BB#4. # CHECK: bb.5.if.end.7: -# CHECK: DBG_VALUE debug-use %ebx, debug-use _, !14, !20, debug-location !33 +# CHECK: DBG_VALUE debug-use %ebx, debug-use _, !18, !19, debug-location !32 --- | @@ -106,11 +106,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} - !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !15) + !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !15) !1 = !DIFile(filename: "LiveDebugValues.c", directory: "/home/vt/julia/test/tvvikram") !2 = !{} - !3 = !{!4} - !4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !11) + !4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Mips/InlinedFnLocalVar.ll =================================================================== --- test/DebugInfo/Mips/InlinedFnLocalVar.ll +++ test/DebugInfo/Mips/InlinedFnLocalVar.ll @@ -25,13 +25,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!28} -!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) +!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) !1 = !DIFile(filename: "bar.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, subprograms: !25, globals: !26, imports: !20) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, globals: !26, imports: !20) !3 = !DISubroutineType(types: !4) !4 = !{!5, !5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !27, scope: !1, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{!5} !9 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) @@ -54,7 +54,6 @@ !22 = !DILocation(line: 11, scope: !11, inlinedAt: !17) !23 = !DILocation(line: 16, scope: !18) !24 = !{!9, !10} -!25 = !{!0, !6} !26 = !{!16} !27 = !DIFile(filename: "bar.c", directory: "/tmp/") !28 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/Mips/delay-slot.ll =================================================================== --- test/DebugInfo/Mips/delay-slot.ll +++ test/DebugInfo/Mips/delay-slot.ll @@ -56,11 +56,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/DebugInfo/Mips/dsr-fixed-objects.ll =================================================================== --- test/DebugInfo/Mips/dsr-fixed-objects.ll +++ test/DebugInfo/Mips/dsr-fixed-objects.ll @@ -98,11 +98,10 @@ !llvm.module.flags = !{!23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/home/vk/repos/tmp/dwarf") !2 = !{} -!3 = !{!4, !15} -!4 = distinct !DISubprogram(name: "f0", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "f0", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7, !7, !7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -113,7 +112,7 @@ !12 = !DILocalVariable(name: "d", arg: 4, scope: !4, file: !1, line: 4, type: !7) !13 = !DILocalVariable(name: "e", arg: 5, scope: !4, file: !1, line: 4, type: !7) !14 = !DILocalVariable(name: "x", scope: !4, file: !1, line: 5, type: !7) -!15 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, variables: !16) +!15 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !16) !16 = !{!17, !18, !19, !20, !21, !22} !17 = !DILocalVariable(name: "a", arg: 1, scope: !15, file: !1, line: 11, type: !7) !18 = !DILocalVariable(name: "b", arg: 2, scope: !15, file: !1, line: 11, type: !7) Index: test/DebugInfo/Mips/dsr-non-fixed-objects.ll =================================================================== --- test/DebugInfo/Mips/dsr-non-fixed-objects.ll +++ test/DebugInfo/Mips/dsr-non-fixed-objects.ll @@ -79,15 +79,14 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251783) (llvm/trunk 251781)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/home/vk/repos/tmp/dwarf") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 20, type: !5, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 20, type: !5, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 27, type: !9, isLocal: false, isDefinition: true, scopeLine: 27, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 27, type: !9, isLocal: false, isDefinition: true, scopeLine: 27, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{!11, !7, !7} !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32) Index: test/DebugInfo/Mips/fn-call-line.ll =================================================================== --- test/DebugInfo/Mips/fn-call-line.ll +++ test/DebugInfo/Mips/fn-call-line.ll @@ -68,11 +68,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226641)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226641)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "fn-call-line.c", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/Mips/prologue_end.ll =================================================================== --- test/DebugInfo/Mips/prologue_end.ll +++ test/DebugInfo/Mips/prologue_end.ll @@ -56,11 +56,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "hello_world", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "hello_world", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/PowerPC/tls-fission.ll =================================================================== --- test/DebugInfo/PowerPC/tls-fission.ll +++ test/DebugInfo/PowerPC/tls-fission.ll @@ -22,7 +22,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, splitDebugFilename: "tls.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, splitDebugFilename: "tls.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "tls.cpp", directory: "/tmp") !2 = !{} !3 = !{!4} Index: test/DebugInfo/PowerPC/tls.ll =================================================================== --- test/DebugInfo/PowerPC/tls.ll +++ test/DebugInfo/PowerPC/tls.ll @@ -17,7 +17,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "tls.cpp", directory: "/tmp") !2 = !{} !3 = !{!4} Index: test/DebugInfo/Sparc/gnu-window-save.ll =================================================================== --- test/DebugInfo/Sparc/gnu-window-save.ll +++ test/DebugInfo/Sparc/gnu-window-save.ll @@ -55,11 +55,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (http://llvm.org/git/clang.git 6a0714fee07fb7c4e32d3972b4fe2ce2f5678cf4) (llvm/ 672e88e934757f76d5c5e5258be41e7615094844)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (http://llvm.org/git/clang.git 6a0714fee07fb7c4e32d3972b4fe2ce2f5678cf4) (llvm/ 672e88e934757f76d5c5e5258be41e7615094844)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "hello.c", directory: "/home/venkatra/work/benchmarks/test/hello") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "hello.c", directory: "/home/venkatra/work/benchmarks/test/hello") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/Sparc/prologue_end.ll =================================================================== --- test/DebugInfo/Sparc/prologue_end.ll +++ test/DebugInfo/Sparc/prologue_end.ll @@ -25,11 +25,10 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/SystemZ/prologue_end.ll =================================================================== --- test/DebugInfo/SystemZ/prologue_end.ll +++ test/DebugInfo/SystemZ/prologue_end.ll @@ -26,11 +26,10 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 242129)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "foo.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "prologue_end_test", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/SystemZ/variable-loc.ll =================================================================== --- test/DebugInfo/SystemZ/variable-loc.ll +++ test/DebugInfo/SystemZ/variable-loc.ll @@ -52,19 +52,18 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!30} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 ", isOptimized: false, emissionKind: FullDebug, file: !29, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 ", isOptimized: false, emissionKind: FullDebug, file: !29, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5, !11, !14} -!5 = distinct !DISubprogram(name: "populate_array", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !29, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "populate_array", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !29, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "simple.c", directory: "/home/timnor01/a64-trunk/build") !7 = !DISubroutineType(types: !8) !8 = !{null, !9, !10} !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10) !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!11 = distinct !DISubprogram(name: "sum_array", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !29, scope: !6, type: !12, variables: !1) +!11 = distinct !DISubprogram(name: "sum_array", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !29, scope: !6, type: !12, variables: !1) !12 = !DISubroutineType(types: !13) !13 = !{!10, !9, !10} -!14 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 18, file: !29, scope: !6, type: !15, variables: !1) +!14 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !29, scope: !6, type: !15, variables: !1) !15 = !DISubroutineType(types: !16) !16 = !{!10} !17 = !DILocalVariable(name: "main_arr", line: 19, scope: !18, file: !6, type: !19) Index: test/DebugInfo/X86/2010-04-13-PubType.ll =================================================================== --- test/DebugInfo/X86/2010-04-13-PubType.ll +++ test/DebugInfo/X86/2010-04-13-PubType.ll @@ -32,9 +32,9 @@ !llvm.module.flags = !{!20} !0 = !DILocalVariable(name: "x", line: 7, arg: 1, scope: !1, file: !2, type: !7) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !18, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 7, file: !18, scope: !2, type: !4) !2 = !DIFile(filename: "a.c", directory: "/tmp/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !17, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6, !7, !9} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -48,7 +48,6 @@ !14 = !DILocalVariable(name: "y", line: 7, arg: 2, scope: !1, file: !2, type: !9) !15 = !DILocation(line: 7, scope: !16) !16 = distinct !DILexicalBlock(line: 7, column: 0, file: !18, scope: !1) -!17 = !{!1} !18 = !DIFile(filename: "a.c", directory: "/tmp/") !19 = !{} !20 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll =================================================================== --- test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll +++ test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll @@ -19,10 +19,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, subprograms: !3, globals: !12, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !12, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !6, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !6, scope: !6, type: !7) !6 = !DIFile(filename: "test.c", directory: "/work/llvm/vanilla/test/DebugInfo") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/2011-12-16-BadStructRef.ll =================================================================== --- test/DebugInfo/X86/2011-12-16-BadStructRef.ll +++ test/DebugInfo/X86/2011-12-16-BadStructRef.ll @@ -89,7 +89,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!83} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 146596)", isOptimized: false, emissionKind: FullDebug, file: !82, enums: !1, retainedTypes: !3, subprograms: !27, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 146596)", isOptimized: false, emissionKind: FullDebug, file: !82, enums: !1, retainedTypes: !3, globals: !1, imports: !1) !1 = !{} !3 = !{!5, !9} !5 = !DICompositeType(tag: DW_TAG_class_type, name: "bar", line: 9, size: 128, align: 64, file: !82, elements: !7) @@ -110,8 +110,7 @@ !22 = !DISubroutineType(types: !23) !23 = !{null, !24, !12} !24 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !5) -!27 = !{!29, !37, !40, !43, !46} -!29 = distinct !DISubprogram(name: "main", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: !6, type: !30) +!29 = distinct !DISubprogram(name: "main", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !82, scope: !6, type: !30) !30 = !DISubroutineType(types: !31) !31 = !{!12, !12, !32} !32 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !33) @@ -119,16 +118,16 @@ !34 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !35 = !{!36} !36 = !{} ; previously: invalid DW_TAG_base_type -!37 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC1Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, declaration: !21) +!37 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC1Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !82, scope: null, type: !22, declaration: !21) !38 = !{!39} !39 = !{} ; previously: invalid DW_TAG_base_type -!40 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC2Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, declaration: !21) +!40 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC2Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !82, scope: null, type: !22, declaration: !21) !41 = !{!42} !42 = !{} ; previously: invalid DW_TAG_base_type -!43 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC1Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, declaration: !13) +!43 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC1Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !82, scope: null, type: !14, declaration: !13) !44 = !{!45} !45 = !{} ; previously: invalid DW_TAG_base_type -!46 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC2Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, declaration: !13) +!46 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC2Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !82, scope: null, type: !14, declaration: !13) !49 = !DILocalVariable(name: "argc", line: 16, arg: 1, scope: !29, file: !6, type: !12) !50 = !DILocation(line: 16, column: 14, scope: !29) !51 = !DILocalVariable(name: "argv", line: 16, arg: 2, scope: !29, file: !6, type: !32) Index: test/DebugInfo/X86/DIModule.ll =================================================================== --- test/DebugInfo/X86/DIModule.ll +++ test/DebugInfo/X86/DIModule.ll @@ -14,7 +14,7 @@ !llvm.module.flags = !{!6, !7} !llvm.ident = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !1, producer: "LLVM version 3.7.0", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !1, producer: "LLVM version 3.7.0", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !3) !1 = !DIFile(filename: "/llvm/tools/clang/test/Modules/", directory: "/") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/DW_AT_byte_size.ll =================================================================== --- test/DebugInfo/X86/DW_AT_byte_size.ll +++ test/DebugInfo/X86/DW_AT_byte_size.ll @@ -26,10 +26,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 150996)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 150996)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooP1A", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !20, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooP1A", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !20, scope: !6, type: !7) !6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo") !7 = !DISubroutineType(types: !8) !8 = !{!9, !10} Index: test/DebugInfo/X86/DW_AT_linkage_name.ll =================================================================== --- test/DebugInfo/X86/DW_AT_linkage_name.ll +++ test/DebugInfo/X86/DW_AT_linkage_name.ll @@ -77,7 +77,7 @@ !llvm.module.flags = !{!23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !16, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "linkage-name.cpp", directory: "") !2 = !{} !3 = !{!4} @@ -91,10 +91,9 @@ !12 = !DISubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !13) !13 = !DISubroutineType(types: !14) !14 = !{null, !9} -!16 = !{!17, !18, !19} -!17 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2) -!18 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2) -!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !20, type: !21, variables: !2) +!17 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2) +!18 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, declaration: !12, variables: !2) +!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !20, type: !21, variables: !2) !20 = !DIFile(filename: "linkage-name.cpp", directory: "") !21 = !DISubroutineType(types: !22) !22 = !{null} Index: test/DebugInfo/X86/DW_AT_location-reference.ll =================================================================== --- test/DebugInfo/X86/DW_AT_location-reference.ll +++ test/DebugInfo/X86/DW_AT_location-reference.ll @@ -102,9 +102,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!24} -!0 = distinct !DISubprogram(name: "f", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !23, scope: !1, type: !3, variables: !22) +!0 = distinct !DISubprogram(name: "f", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 4, file: !23, scope: !1, type: !3, variables: !22) !1 = !DIFile(filename: "simple.c", directory: "/home/rengol01/temp/tests/dwarf/relocation") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: true, emissionKind: FullDebug, file: !23, enums: !{}, retainedTypes: !{}, subprograms: !21, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: true, emissionKind: FullDebug, file: !23, enums: !{}, retainedTypes: !{}, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocalVariable(name: "x", line: 5, scope: !6, file: !1, type: !7) @@ -120,7 +120,6 @@ !18 = !DILocation(line: 11, column: 3, scope: !6) !19 = !DILocation(line: 12, column: 3, scope: !6) !20 = !DILocation(line: 13, column: 1, scope: !6) -!21 = !{!0} !22 = !{!5} !23 = !DIFile(filename: "simple.c", directory: "/home/rengol01/temp/tests/dwarf/relocation") !24 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/DW_AT_object_pointer.ll =================================================================== --- test/DebugInfo/X86/DW_AT_object_pointer.ll +++ test/DebugInfo/X86/DW_AT_object_pointer.ll @@ -51,15 +51,14 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!38} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 163586) (llvm/trunk 163570)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 163586) (llvm/trunk 163570)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5, !10, !20} -!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !6, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !6, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "bar.cpp", directory: "/Users/echristo/debug-tests") !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, variables: !1) +!10 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, variables: !1) !11 = !DISubroutineType(types: !12) !12 = !{null, !13} !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !14) @@ -67,7 +66,7 @@ !15 = !{!16, !17} !16 = !DIDerivedType(tag: DW_TAG_member, name: "m_a", line: 4, size: 32, align: 32, file: !37, scope: !14, baseType: !9) !17 = !DISubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !14, type: !11) -!20 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, variables: !1) +!20 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !11, declaration: !17, variables: !1) !21 = !DILocalVariable(name: "a", line: 8, scope: !22, file: !6, type: !14) !22 = distinct !DILexicalBlock(line: 7, column: 11, file: !6, scope: !5) !23 = !DILocation(line: 8, column: 5, scope: !22) Index: test/DebugInfo/X86/DW_AT_specification.ll =================================================================== --- test/DebugInfo/X86/DW_AT_specification.ll +++ test/DebugInfo/X86/DW_AT_specification.ll @@ -20,10 +20,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!28} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !27, enums: !1, retainedTypes: !1, subprograms: !3, globals: !18, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !27, enums: !1, retainedTypes: !1, globals: !18, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !6, scope: null, type: !7, declaration: !11) +!5 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !6, scope: null, type: !7, declaration: !11) !6 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} Index: test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll =================================================================== --- test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll +++ test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll @@ -30,11 +30,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "C:\5CProjects") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "C:CProjects") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/DW_TAG_friend.ll =================================================================== --- test/DebugInfo/X86/DW_TAG_friend.ll +++ test/DebugInfo/X86/DW_TAG_friend.ll @@ -18,7 +18,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 153413) (llvm/trunk 153428)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 153413) (llvm/trunk 153428)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5, !17} !5 = !DIGlobalVariable(name: "a", line: 10, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %class.A* @a) Index: test/DebugInfo/X86/InlinedFnLocalVar.ll =================================================================== --- test/DebugInfo/X86/InlinedFnLocalVar.ll +++ test/DebugInfo/X86/InlinedFnLocalVar.ll @@ -25,13 +25,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!28} -!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) +!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) !1 = !DIFile(filename: "bar.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, subprograms: !25, globals: !26, imports: !20) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, globals: !26, imports: !20) !3 = !DISubroutineType(types: !4) !4 = !{!5, !5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !27, scope: !1, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{!5} !9 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) @@ -54,7 +54,6 @@ !22 = !DILocation(line: 11, scope: !11, inlinedAt: !17) !23 = !DILocation(line: 16, scope: !18) !24 = !{!9, !10} -!25 = !{!0, !6} !26 = !{!16} !27 = !DIFile(filename: "bar.c", directory: "/tmp/") !28 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/PR26148.ll =================================================================== --- test/DebugInfo/X86/PR26148.ll +++ test/DebugInfo/X86/PR26148.ll @@ -64,11 +64,10 @@ !llvm.module.flags = !{!22, !23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !20) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !20) !1 = !DIFile(filename: "small.c", directory: "/Users/kfischer/Projects/clangbug") !2 = !{} -!3 = !{!4, !17} -!4 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "short", size: 16, align: 16, encoding: DW_ATE_signed) @@ -81,7 +80,7 @@ !14 = !DIDerivedType(tag: DW_TAG_member, name: "f3", scope: !11, file: !1, line: 3, baseType: !15, size: 32, align: 32, offset: 32) !15 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !16 = !DILocalVariable(name: "c", scope: !4, file: !1, line: 6, type: !11) -!17 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 11, type: !18, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: true, variables: !2) +!17 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 11, type: !18, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: true, unit: !0, variables: !2) !18 = !DISubroutineType(types: !19) !19 = !{!15} !20 = !{!21} Index: test/DebugInfo/X86/aligned_stack_var.ll =================================================================== --- test/DebugInfo/X86/aligned_stack_var.ll +++ test/DebugInfo/X86/aligned_stack_var.ll @@ -27,10 +27,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 155696:155697) (llvm/trunk 155696)", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 155696:155697) (llvm/trunk 155696)", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "run", linkageName: "_Z3runv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !14, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "run", linkageName: "_Z3runv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !14, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "test.cc", directory: "/home/samsonov/debuginfo") !7 = !DISubroutineType(types: !8) !8 = !{null} Index: test/DebugInfo/X86/arange-and-stub.ll =================================================================== --- test/DebugInfo/X86/arange-and-stub.ll +++ test/DebugInfo/X86/arange-and-stub.ll @@ -32,16 +32,15 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17, !18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !10, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !10, imports: !2) !1 = !DIFile(filename: "/Users/espindola/llvm/", directory: "/Users/espindola/llvm/build") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DIFile(filename: "/Users/espindola/llvm/test.cpp", directory: "/Users/espindola/llvm/build") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "bar_d", linkageName: "bar", scope: !5, file: !5, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!9 = distinct !DISubprogram(name: "bar_d", linkageName: "bar", scope: !5, file: !5, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !10 = !{!11} !11 = !DIGlobalVariable(name: "zed", scope: !0, file: !5, line: 6, type: !12, isLocal: false, isDefinition: true, variable: [1 x void ()*]* @zed) !12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 64, align: 64, elements: !15) Index: test/DebugInfo/X86/arange.ll =================================================================== --- test/DebugInfo/X86/arange.ll +++ test/DebugInfo/X86/arange.ll @@ -29,7 +29,7 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !9, imports: !2) !1 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/arguments.ll =================================================================== --- test/DebugInfo/X86/arguments.ll +++ test/DebugInfo/X86/arguments.ll @@ -49,11 +49,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "scratch.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4func3fooS_", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4func3fooS_", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "scratch.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") !6 = !DISubroutineType(types: !7) !7 = !{null, !8, !8} Index: test/DebugInfo/X86/array.ll =================================================================== --- test/DebugInfo/X86/array.ll +++ test/DebugInfo/X86/array.ll @@ -62,11 +62,10 @@ !llvm.module.flags = !{!25, !26} !llvm.ident = !{!27} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "array.c", directory: "") !2 = !{} -!3 = !{!4, !12} -!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) +!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) !5 = !DIFile(filename: "array.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} @@ -74,7 +73,7 @@ !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !{!11} !11 = !DILocalVariable(name: "p", line: 1, arg: 1, scope: !4, file: !5, type: !8) -!12 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !13, variables: !18) +!12 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !13, variables: !18) !13 = !DISubroutineType(types: !14) !14 = !{!9, !9, !15} !15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !16) Index: test/DebugInfo/X86/array2.ll =================================================================== --- test/DebugInfo/X86/array2.ll +++ test/DebugInfo/X86/array2.ll @@ -72,17 +72,16 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "array.c", directory: "") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "array.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} !8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !11, variables: !2) +!10 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !11, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!9, !9, !13} !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !14) Index: test/DebugInfo/X86/bbjoin.ll =================================================================== --- test/DebugInfo/X86/bbjoin.ll +++ test/DebugInfo/X86/bbjoin.ll @@ -69,11 +69,10 @@ !llvm.module.flags = !{!10, !11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255890) (llvm/trunk 255919)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255890) (llvm/trunk 255919)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "constant.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/bitfields.ll =================================================================== --- test/DebugInfo/X86/bitfields.ll +++ test/DebugInfo/X86/bitfields.ll @@ -54,7 +54,7 @@ !llvm.module.flags = !{!13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "bitfields.c", directory: "/") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/block-capture.ll =================================================================== --- test/DebugInfo/X86/block-capture.ll +++ test/DebugInfo/X86/block-capture.ll @@ -62,14 +62,13 @@ !llvm.module.flags = !{!16, !17, !18, !19, !20, !21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.6.0 (trunk 223471)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.6.0 (trunk 223471)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.m", directory: "") !2 = !{} -!3 = !{!8} !5 = !DIFile(filename: "foo.m", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "__foo_block_invoke", line: 2, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !9, variables: !2) +!8 = distinct !DISubprogram(name: "__foo_block_invoke", line: 2, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !9, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{null, !11} !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: null) Index: test/DebugInfo/X86/byvalstruct.ll =================================================================== --- test/DebugInfo/X86/byvalstruct.ll +++ test/DebugInfo/X86/byvalstruct.ll @@ -87,14 +87,13 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!24, !25, !26, !27, !38} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC_plus_plus, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !6, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC_plus_plus, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "t.mm", directory: "") !2 = !{} !3 = !{!4} !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Bitmap", line: 8, size: 8, align: 8, flags: DIFlagObjcClassComplete, runtimeLang: DW_LANG_ObjC_plus_plus, file: !1, scope: !5, elements: !2) !5 = !DIFile(filename: "t.mm", directory: "") -!6 = !{!7} -!7 = distinct !DISubprogram(name: "-[Bitmap initWithCopy:andInfo:andLength:]", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !5, type: !8, variables: !2) +!7 = distinct !DISubprogram(name: "-[Bitmap initWithCopy:andInfo:andLength:]", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !1, scope: !5, type: !8, variables: !2) !8 = !DISubroutineType(types: !9) !9 = !{!4, !10, !11, !14, !15, !19} !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4) Index: test/DebugInfo/X86/c-type-units.ll =================================================================== --- test/DebugInfo/X86/c-type-units.ll +++ test/DebugInfo/X86/c-type-units.ll @@ -17,7 +17,7 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/coff_debug_info_type.ll =================================================================== --- test/DebugInfo/X86/coff_debug_info_type.ll +++ test/DebugInfo/X86/coff_debug_info_type.ll @@ -31,11 +31,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "C:\5CProjects") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "C:CProjects") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/coff_relative_names.ll =================================================================== --- test/DebugInfo/X86/coff_relative_names.ll +++ test/DebugInfo/X86/coff_relative_names.ll @@ -23,11 +23,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "C:\5CProjects") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "C:CProjects") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/concrete_out_of_line.ll =================================================================== --- test/DebugInfo/X86/concrete_out_of_line.ll +++ test/DebugInfo/X86/concrete_out_of_line.ll @@ -78,10 +78,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!60} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 ()", isOptimized: true, emissionKind: FullDebug, file: !59, enums: !1, retainedTypes: !1, subprograms: !3, globals: !47, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 ()", isOptimized: true, emissionKind: FullDebug, file: !59, enums: !1, retainedTypes: !1, globals: !47, imports: !1) !1 = !{} -!3 = !{!5, !23, !27, !31} -!5 = distinct !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 14, file: !6, scope: null, type: !7 , declaration: !12, variables: !20) +!5 = distinct !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !6, scope: null, type: !7 , declaration: !12, variables: !20) !6 = !DIFile(filename: "nsAutoRefCnt.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src") !7 = !DISubroutineType(types: !8) !8 = !{!9, !10} @@ -97,13 +96,13 @@ !18 = !{} !20 = !{!22} !22 = !DILocalVariable(name: "this", line: 14, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !10) -!23 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD1Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !24) +!23 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD1Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !24) !24 = !{!26} !26 = !DILocalVariable(name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !23, file: !6, type: !10) -!27 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !28) +!27 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !28) !28 = !{!30} !30 = !DILocalVariable(name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !27, file: !6, type: !10) -!31 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: null, type: !32, declaration: !36, variables: !43) +!31 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !6, scope: null, type: !32, declaration: !36, variables: !43) !32 = !DISubroutineType(types: !33) !33 = !{!9, !34, !9} !34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !35) Index: test/DebugInfo/X86/constant-aggregate.ll =================================================================== --- test/DebugInfo/X86/constant-aggregate.ll +++ test/DebugInfo/X86/constant-aggregate.ll @@ -72,7 +72,7 @@ !llvm.module.flags = !{!33, !34, !35} !llvm.ident = !{!36} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 225364) (llvm/trunk 225366)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !11, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 225364) (llvm/trunk 225366)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "sroasplit-4.cpp", directory: "") !2 = !{} !3 = !{!4, !8} @@ -83,20 +83,19 @@ !8 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 8, size: 32, align: 32, file: !1, elements: !9, identifier: "_ZTS1C") !9 = !{!10} !10 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 8, size: 32, align: 32, flags: DIFlagPublic, file: !1, scope: !"_ZTS1C", baseType: !7) -!11 = !{!12, !19, !24} -!12 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1S", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !17) +!12 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1S", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !17) !13 = !DIFile(filename: "sroasplit-4.cpp", directory: "") !14 = !DISubroutineType(types: !15) !15 = !{!7, !16} !16 = !DIDerivedType(tag: DW_TAG_typedef, name: "S", line: 1, file: !1, baseType: !"_ZTS1S") !17 = !{!18} !18 = !DILocalVariable(name: "s", line: 3, arg: 1, scope: !12, file: !13, type: !16) -!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1C", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !1, scope: !13, type: !20, variables: !22) +!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foo1C", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 10, file: !1, scope: !13, type: !20, variables: !22) !20 = !DISubroutineType(types: !21) !21 = !{!7, !"_ZTS1C"} !22 = !{!23} !23 = !DILocalVariable(name: "c", line: 10, arg: 1, scope: !19, file: !13, type: !"_ZTS1C") -!24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 15, file: !1, scope: !13, type: !25, variables: !27) +!24 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 15, file: !1, scope: !13, type: !25, variables: !27) !25 = !DISubroutineType(types: !26) !26 = !{!7} !27 = !{!28} Index: test/DebugInfo/X86/cu-ranges-odr.ll =================================================================== --- test/DebugInfo/X86/cu-ranges-odr.ll +++ test/DebugInfo/X86/cu-ranges-odr.ll @@ -61,7 +61,7 @@ !llvm.module.flags = !{!23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 (trunk 199923) (llvm/trunk 199940)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !21, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 (trunk 199923) (llvm/trunk 199940)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !21, imports: !2) !1 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{!4} @@ -73,13 +73,12 @@ !9 = !DISubroutineType(types: !10) !10 = !{null, !11, !7} !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") -!13 = !{!14, !18, !19} -!14 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !15, type: !16, variables: !2) +!14 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !15, type: !16, variables: !2) !15 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp") !16 = !DISubroutineType(types: !17) !17 = !{null} -!18 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !2) -!19 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, scopeLine: 3, file: !1, scope: !15, type: !20, variables: !2) +!18 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !2) +!19 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !15, type: !20, variables: !2) !20 = !DISubroutineType(types: !2) !21 = !{!22} !22 = !DIGlobalVariable(name: "a", line: 8, isLocal: false, isDefinition: true, scope: null, file: !15, type: !4, variable: %class.A* @a) Index: test/DebugInfo/X86/cu-ranges.ll =================================================================== --- test/DebugInfo/X86/cu-ranges.ll +++ test/DebugInfo/X86/cu-ranges.ll @@ -56,16 +56,15 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "z.c", directory: "/usr/local/google/home/echristo") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "z.c", directory: "/usr/local/google/home/echristo") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 1, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} Index: test/DebugInfo/X86/data_member_location.ll =================================================================== --- test/DebugInfo/X86/data_member_location.ll +++ test/DebugInfo/X86/data_member_location.ll @@ -34,7 +34,7 @@ !llvm.module.flags = !{!13, !15} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !10, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !10, imports: !2) !1 = !DIFile(filename: "data_member_location.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/dbg-byval-parameter.ll =================================================================== --- test/DebugInfo/X86/dbg-byval-parameter.ll +++ test/DebugInfo/X86/dbg-byval-parameter.ll @@ -29,9 +29,9 @@ !llvm.module.flags = !{!21} !0 = !DILocalVariable(name: "my_r0", line: 11, arg: 1, scope: !1, file: !2, type: !7) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !19, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !19, scope: !2, type: !4) !2 = !DIFile(filename: "b2.c", directory: "/tmp/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20, subprograms: !18, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6, !7} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float) @@ -46,7 +46,6 @@ !15 = !DILocation(line: 11, scope: !1) !16 = !DILocation(line: 12, scope: !17) !17 = distinct !DILexicalBlock(line: 11, column: 0, file: !19, scope: !1) -!18 = !{!1} !19 = !DIFile(filename: "b2.c", directory: "/tmp/") !20 = !{} !21 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-const-int.ll =================================================================== --- test/DebugInfo/X86/dbg-const-int.ll +++ test/DebugInfo/X86/dbg-const-int.ll @@ -21,8 +21,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 132191)", isOptimized: true, emissionKind: FullDebug, file: !13, enums: !14, retainedTypes: !14, subprograms: !11, imports: null) -!1 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !13, scope: !2, type: !3, variables: !12) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 132191)", isOptimized: true, emissionKind: FullDebug, file: !13, enums: !14, retainedTypes: !14, imports: null) +!1 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !13, scope: !2, type: !3, variables: !12) !2 = !DIFile(filename: "a.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -32,7 +32,6 @@ !8 = !{i32 42} !9 = !DILocation(line: 2, column: 12, scope: !7) !10 = !DILocation(line: 3, column: 2, scope: !7) -!11 = !{!1} !12 = !{!6} !13 = !DIFile(filename: "a.c", directory: "/private/tmp") !14 = !{} Index: test/DebugInfo/X86/dbg-const.ll =================================================================== --- test/DebugInfo/X86/dbg-const.ll +++ test/DebugInfo/X86/dbg-const.ll @@ -31,9 +31,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!17} -!0 = distinct !DISubprogram(name: "foobar", linkageName: "foobar", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !15, scope: !1, type: !3, variables: !14) +!0 = distinct !DISubprogram(name: "foobar", linkageName: "foobar", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !15, scope: !1, type: !3, variables: !14) !1 = !DIFile(filename: "mu.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 114183)", isOptimized: true, emissionKind: FullDebug, file: !15, enums: !16, retainedTypes: !16, subprograms: !13, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 114183)", isOptimized: true, emissionKind: FullDebug, file: !15, enums: !16, retainedTypes: !16, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -44,7 +44,6 @@ !10 = !DILocation(line: 23, column: 3, scope: !7) !11 = !DILocation(line: 17, column: 3, scope: !7) !12 = !DILocation(line: 18, column: 3, scope: !7) -!13 = !{!0} !14 = !{!6} !15 = !DIFile(filename: "mu.c", directory: "/private/tmp") !16 = !{} Index: test/DebugInfo/X86/dbg-declare-arg.ll =================================================================== --- test/DebugInfo/X86/dbg-declare-arg.ll +++ test/DebugInfo/X86/dbg-declare-arg.ll @@ -74,7 +74,7 @@ !0 = !DISubprogram(name: "~A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !1, type: !11) !1 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 128, align: 32, file: !51, scope: !2, elements: !4) -!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130127)", isOptimized: false, emissionKind: FullDebug, file: !51, enums: !{}, retainedTypes: !{}, subprograms: !50) +!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130127)", isOptimized: false, emissionKind: FullDebug, file: !51, enums: !{}, retainedTypes: !{}) !3 = !DIFile(filename: "a.cc", directory: "/private/tmp") !4 = !{!5, !7, !8, !9, !0, !10, !14} !5 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 2, size: 32, align: 32, file: !51, scope: !3, baseType: !6) @@ -91,13 +91,13 @@ !16 = !{null, !13, !17} !17 = !DIDerivedType(tag: DW_TAG_reference_type, scope: !2, baseType: !18) !18 = !DIDerivedType(tag: DW_TAG_const_type, file: !3, baseType: !1) -!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !3, type: !20) +!19 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !51, scope: !3, type: !20) !20 = !DISubroutineType(types: !21) !21 = !{!1} -!22 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !3, type: !23) +!22 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !51, scope: !3, type: !23) !23 = !DISubroutineType(types: !24) !24 = !{null} -!25 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !3, type: !23) +!25 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !51, scope: !3, type: !23) !26 = !DILocalVariable(name: "i", line: 4, arg: 1, scope: !19, file: !3, type: !6) !27 = !DILocation(line: 4, column: 11, scope: !19) !28 = !DILocalVariable(name: "j", line: 5, scope: !29, file: !3, type: !6) @@ -122,6 +122,5 @@ !47 = !DILocation(line: 2, column: 47, scope: !25) !48 = !DILocation(line: 2, column: 54, scope: !49) !49 = distinct !DILexicalBlock(line: 2, column: 52, file: !51, scope: !25) -!50 = !{!19, !22, !25} !51 = !DIFile(filename: "a.cc", directory: "/private/tmp") !52 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-declare.ll =================================================================== --- test/DebugInfo/X86/dbg-declare.ll +++ test/DebugInfo/X86/dbg-declare.ll @@ -30,10 +30,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!27} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 153698)", isOptimized: false, emissionKind: FullDebug, file: !26, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 153698)", isOptimized: false, emissionKind: FullDebug, file: !26, enums: !1, retainedTypes: !1, globals: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !26, scope: !0, type: !7) +!5 = distinct !DISubprogram(name: "foo", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !26, scope: !0, type: !7) !6 = !DIFile(filename: "20020104-2.c", directory: "/Volumes/Sandbox/llvm") !7 = !DISubroutineType(types: !8) !8 = !{!9, !10} Index: test/DebugInfo/X86/dbg-file-name.ll =================================================================== --- test/DebugInfo/X86/dbg-file-name.ll +++ test/DebugInfo/X86/dbg-file-name.ll @@ -14,12 +14,11 @@ !llvm.module.flags = !{!12} !1 = !DIFile(filename: "simple.c", directory: "/Users/manav/one/two") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "LLVM build 00", isOptimized: true, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, subprograms: !9) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "LLVM build 00", isOptimized: true, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11) !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "main", linkageName: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !10, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "main", linkageName: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !10, scope: !1, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{!5} -!9 = !{!6} !10 = !DIFile(filename: "simple.c", directory: "/Users/manav/one/two") !11 = !{} !12 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-i128-const.ll =================================================================== --- test/DebugInfo/X86/dbg-i128-const.ll +++ test/DebugInfo/X86/dbg-i128-const.ll @@ -19,16 +19,15 @@ !0 = !{i128 42 } !1 = !DILocalVariable(name: "MAX", line: 29, scope: !2, file: !4, type: !8) !2 = distinct !DILexicalBlock(line: 26, column: 0, file: !13, scope: !3) -!3 = distinct !DISubprogram(name: "__foo", linkageName: "__foo", line: 26, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 26, file: !13, scope: !4, type: !6) +!3 = distinct !DISubprogram(name: "__foo", linkageName: "__foo", line: 26, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !5, scopeLine: 26, file: !13, scope: !4, type: !6) !4 = !DIFile(filename: "foo.c", directory: "/tmp") -!5 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !13, enums: !15, retainedTypes: !15, subprograms: !12, imports: null) +!5 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !13, enums: !15, retainedTypes: !15, imports: null) !6 = !DISubroutineType(types: !7) !7 = !{!8, !8, !8} !8 = !DIDerivedType(tag: DW_TAG_typedef, name: "ti_int", line: 78, file: !14, scope: !4, baseType: !10) !9 = !DIFile(filename: "myint.h", directory: "/tmp") !10 = !DIBasicType(tag: DW_TAG_base_type, size: 128, align: 128, encoding: DW_ATE_signed) !11 = !DILocation(line: 29, scope: !2) -!12 = !{!3} !13 = !DIFile(filename: "foo.c", directory: "/tmp") !14 = !DIFile(filename: "myint.h", directory: "/tmp") !15 = !{} Index: test/DebugInfo/X86/dbg-merge-loc-entry.ll =================================================================== --- test/DebugInfo/X86/dbg-merge-loc-entry.ll +++ test/DebugInfo/X86/dbg-merge-loc-entry.ll @@ -40,16 +40,16 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!32} -!0 = distinct !DISubprogram(name: "__udivmodti4", line: 879, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 879, file: !29, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "__udivmodti4", line: 879, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 879, file: !29, scope: !1, type: !3) !1 = !DIFile(filename: "foobar.c", directory: "/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !29, enums: !31, retainedTypes: !31, subprograms: !28, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !29, enums: !31, retainedTypes: !31, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5, !5, !5, !8} !5 = !DIDerivedType(tag: DW_TAG_typedef, name: "UTItype", line: 166, file: !30, scope: !6, baseType: !7) !6 = !DIFile(filename: "foobar.h", directory: "/tmp") !7 = !DIBasicType(tag: DW_TAG_base_type, size: 128, align: 128, encoding: DW_ATE_unsigned) !8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !29, scope: !1, baseType: !5) -!9 = distinct !DISubprogram(name: "__divti3", linkageName: "__divti3", line: 1094, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1094, file: !29, scope: !1, type: !10) +!9 = distinct !DISubprogram(name: "__divti3", linkageName: "__divti3", line: 1094, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 1094, file: !29, scope: !1, type: !10) !10 = !DISubroutineType(types: !11) !11 = !{!12, !12, !12} !12 = !DIDerivedType(tag: DW_TAG_typedef, name: "TItype", line: 160, file: !30, scope: !6, baseType: !13) @@ -68,7 +68,6 @@ !25 = distinct !DILexicalBlock(line: 879, column: 0, file: !29, scope: !0) !26 = !DILocation(line: 1107, scope: !18) !27 = !DILocation(line: 1111, scope: !18) -!28 = !{!0, !9} !29 = !DIFile(filename: "foobar.c", directory: "/tmp") !30 = !DIFile(filename: "foobar.h", directory: "/tmp") !31 = !{} Index: test/DebugInfo/X86/dbg-prolog-end.ll =================================================================== --- test/DebugInfo/X86/dbg-prolog-end.ll +++ test/DebugInfo/X86/dbg-prolog-end.ll @@ -36,13 +36,13 @@ !llvm.module.flags = !{!21} !18 = !{!1, !6} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131100)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20, subprograms: !18, imports: null) -!1 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !19, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131100)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !20, retainedTypes: !20, imports: null) +!1 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !19, scope: !2, type: !3) !2 = !DIFile(filename: "/tmp/a.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !19, scope: !2, type: !3) +!6 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 7, file: !19, scope: !2, type: !3) !7 = !DILocalVariable(name: "i", line: 1, arg: 1, scope: !1, file: !2, type: !5) !8 = !DILocation(line: 1, column: 13, scope: !1) !9 = !DILocalVariable(name: "j", line: 2, scope: !10, file: !2, type: !5) Index: test/DebugInfo/X86/dbg-subrange.ll =================================================================== --- test/DebugInfo/X86/dbg-subrange.ll +++ test/DebugInfo/X86/dbg-subrange.ll @@ -15,10 +15,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 144833)", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !1, retainedTypes: !1, subprograms: !3, globals: !11, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 144833)", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !1, retainedTypes: !1, globals: !11, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !21, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !21, scope: !6, type: !7) !6 = !DIFile(filename: "small.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null} Index: test/DebugInfo/X86/dbg-value-const-byref.ll =================================================================== --- test/DebugInfo/X86/dbg-value-const-byref.ll +++ test/DebugInfo/X86/dbg-value-const-byref.ll @@ -78,11 +78,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "dbg-value-const-byref.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "dbg-value-const-byref.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/dbg-value-dag-combine.ll =================================================================== --- test/DebugInfo/X86/dbg-value-dag-combine.ll +++ test/DebugInfo/X86/dbg-value-dag-combine.ll @@ -24,9 +24,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!20} -!0 = distinct !DISubprogram(name: "__OpenCL_test_kernel", linkageName: "__OpenCL_test_kernel", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !19, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "__OpenCL_test_kernel", linkageName: "__OpenCL_test_kernel", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !19, scope: !1, type: !3) !1 = !DIFile(filename: "OCL6368.tmp.cl", directory: "E:CUsersCmvillmow.AMDCAppDataCLocalCTemp") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clc", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !12, retainedTypes: !12, subprograms: !18, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clc", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !12, retainedTypes: !12, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{null, !5} !5 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !6) @@ -42,6 +42,5 @@ !15 = !DILocation(line: 5, column: 15, scope: !10) !16 = !DILocation(line: 6, column: 18, scope: !10) !17 = !DILocation(line: 7, column: 1, scope: !0) -!18 = !{!0} !19 = !DIFile(filename: "OCL6368.tmp.cl", directory: "E:\5CUsers\5Cmvillmow.AMD\5CAppData\5CLocal\5CTemp") !20 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-value-inlined-parameter.ll =================================================================== --- test/DebugInfo/X86/dbg-value-inlined-parameter.ll +++ test/DebugInfo/X86/dbg-value-inlined-parameter.ll @@ -74,13 +74,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!43} -!0 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !1, scope: !1, type: !3, variables: !41) +!0 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 8, file: !1, scope: !1, type: !3, variables: !41) !1 = !DIFile(filename: "nm2.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, emissionKind: FullDebug, file: !42, enums: !{}, retainedTypes: !{}, subprograms: !39, globals: !40, imports: !44) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, emissionKind: FullDebug, file: !42, enums: !{}, retainedTypes: !{}, globals: !40, imports: !44) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "foobar", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "foobar", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !1, scope: !1, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{null} !9 = !DILocalVariable(name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10) @@ -109,7 +109,6 @@ !36 = !DILocation(line: 9, column: 3, scope: !23, inlinedAt: !32) !37 = !DILocation(line: 10, column: 3, scope: !23, inlinedAt: !32) !38 = !DILocation(line: 17, column: 1, scope: !33) -!39 = !{!0, !6} !40 = !{!19} !41 = !{!9, !18} !42 = !DIFile(filename: "nm2.c", directory: "/private/tmp") Index: test/DebugInfo/X86/dbg-value-isel.ll =================================================================== --- test/DebugInfo/X86/dbg-value-isel.ll +++ test/DebugInfo/X86/dbg-value-isel.ll @@ -81,9 +81,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!22} -!0 = distinct !DISubprogram(name: "__OpenCL_nbt02_kernel", linkageName: "__OpenCL_nbt02_kernel", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !20, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "__OpenCL_nbt02_kernel", linkageName: "__OpenCL_nbt02_kernel", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !20, scope: !1, type: !3) !1 = !DIFile(filename: "OCLlLwTXZ.cl", directory: "/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clc", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, subprograms: !19, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "clc", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{null, !5} !5 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align:64, scope: !2, baseType: !6) @@ -100,7 +100,6 @@ !16 = !DILocation(line: 7, column: 26, scope: !11) !17 = !DILocation(line: 9, column: 24, scope: !11) !18 = !DILocation(line: 10, column: 1, scope: !0) -!19 = !{!0} !20 = !DIFile(filename: "OCLlLwTXZ.cl", directory: "/tmp") !21 = !{} !22 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-value-location.ll =================================================================== --- test/DebugInfo/X86/dbg-value-location.ll +++ test/DebugInfo/X86/dbg-value-location.ll @@ -50,15 +50,15 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!29} -!0 = distinct !DISubprogram(name: "foo", line: 19510, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 19510, file: !26, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 19510, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 19510, file: !26, scope: !1, type: !3) !1 = !DIFile(filename: "/tmp/f.c", directory: "/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 124753)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !28, retainedTypes: !28, subprograms: !24, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 124753)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !28, retainedTypes: !28, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar3", line: 14827, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !26, scope: !1, type: !3) -!7 = distinct !DISubprogram(name: "bar2", line: 15397, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !26, scope: !1, type: !3) -!8 = distinct !DISubprogram(name: "bar", line: 12382, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !26, scope: !1, type: !9) +!6 = distinct !DISubprogram(name: "bar3", line: 14827, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !26, scope: !1, type: !3) +!7 = distinct !DISubprogram(name: "bar2", line: 15397, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !26, scope: !1, type: !3) +!8 = distinct !DISubprogram(name: "bar", line: 12382, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !26, scope: !1, type: !9) !9 = !DISubroutineType(types: !10) !10 = !{!11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) @@ -66,12 +66,11 @@ !13 = !DILocation(line: 19509, column: 20, scope: !0) !14 = !DILocation(line: 18091, column: 2, scope: !15, inlinedAt: !17) !15 = distinct !DILexicalBlock(line: 18086, column: 1, file: !26, scope: !16) -!16 = distinct !DISubprogram(name: "foo_bar", line: 18086, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !26, scope: !1, type: !3) +!16 = distinct !DISubprogram(name: "foo_bar", line: 18086, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !26, scope: !1, type: !3) !17 = !DILocation(line: 19514, column: 2, scope: !18) !18 = distinct !DILexicalBlock(line: 19510, column: 1, file: !26, scope: !0) !22 = !DILocation(line: 18094, column: 2, scope: !15, inlinedAt: !17) !23 = !DILocation(line: 19524, column: 1, scope: !18) -!24 = !{!0, !6, !7, !8, !16} !25 = !DIFile(filename: "f.i", directory: "/tmp") !26 = !DIFile(filename: "/tmp/f.c", directory: "/tmp") !27 = !DIFile(filename: "f.i", directory: "/tmp") Index: test/DebugInfo/X86/dbg-value-range.ll =================================================================== --- test/DebugInfo/X86/dbg-value-range.ll +++ test/DebugInfo/X86/dbg-value-range.ll @@ -20,9 +20,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!24} -!0 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !22, scope: !1, type: !3, variables: !21) +!0 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, file: !22, scope: !1, type: !3, variables: !21) !1 = !DIFile(filename: "bar.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 122997)", isOptimized: true, emissionKind: FullDebug, file: !22, enums: !23, retainedTypes: !23, subprograms: !20, imports: null) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 122997)", isOptimized: true, emissionKind: FullDebug, file: !22, enums: !23, retainedTypes: !23, imports: null) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -37,7 +37,6 @@ !14 = !DILocation(line: 6, column: 14, scope: !12) !18 = !DILocation(line: 7, column: 2, scope: !12) !19 = !DILocation(line: 8, column: 2, scope: !12) -!20 = !{!0} !21 = !{!6, !11} !22 = !DIFile(filename: "bar.c", directory: "/private/tmp") !23 = !{} Index: test/DebugInfo/X86/dbg-value-regmask-clobber.ll =================================================================== --- test/DebugInfo/X86/dbg-value-regmask-clobber.ll +++ test/DebugInfo/X86/dbg-value-regmask-clobber.ll @@ -75,11 +75,10 @@ !llvm.module.flags = !{!17, !18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !14) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !14) !1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/dbg-value-terminator.ll =================================================================== --- test/DebugInfo/X86/dbg-value-terminator.ll +++ test/DebugInfo/X86/dbg-value-terminator.ll @@ -114,8 +114,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, subprograms: !18, imports: null) -!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !20, scope: !2, type: !3, variables: !19) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, imports: null) +!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, file: !20, scope: !2, type: !3, variables: !19) !2 = !DIFile(filename: "a.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -127,7 +127,6 @@ !10 = !DILocalVariable(name: "a", line: 3, scope: !11, file: !2, type: !9) !11 = distinct !DILexicalBlock(line: 2, column: 25, file: !20, scope: !1) !12 = !DILocation(line: 2, column: 13, scope: !1) -!18 = !{!1} !19 = !{!6, !7, !10} !20 = !DIFile(filename: "a.c", directory: "/private/tmp") !21 = !{} Index: test/DebugInfo/X86/dbg_value_direct.ll =================================================================== --- test/DebugInfo/X86/dbg_value_direct.ll +++ test/DebugInfo/X86/dbg_value_direct.ll @@ -147,11 +147,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!22, !27} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "crash.cpp", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "crash.cpp", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8, !21} Index: test/DebugInfo/X86/debug-dead-local-var.ll =================================================================== --- test/DebugInfo/X86/debug-dead-local-var.ll +++ test/DebugInfo/X86/debug-dead-local-var.ll @@ -30,16 +30,15 @@ !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 209255) (llvm/trunk 209253)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 209255) (llvm/trunk 209253)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "debug-dead-local-var.c", directory: "/usr/local/google/home/echristo") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "bar", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 11, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 11, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "debug-dead-local-var.c", directory: "/usr/local/google/home/echristo") !6 = !DISubroutineType(types: !7) !7 = !{!8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "foo", line: 6, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !10, variables: !12) +!9 = distinct !DISubprogram(name: "foo", line: 6, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !10, variables: !12) !10 = !DISubroutineType(types: !11) !11 = !{null} !12 = !{!13} Index: test/DebugInfo/X86/debug-info-access.ll =================================================================== --- test/DebugInfo/X86/debug-info-access.ll +++ test/DebugInfo/X86/debug-info-access.ll @@ -106,7 +106,7 @@ !llvm.module.flags = !{!38, !39} !llvm.ident = !{!40} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !29, globals: !34, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !34, imports: !2) !1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "") !2 = !{} !3 = !{!4, !12, !22} @@ -135,8 +135,7 @@ !26 = !DISubroutineType(types: !27) !27 = !{null, !28} !28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1U") -!29 = !{!30} -!30 = distinct !DISubprogram(name: "free", linkageName: "_Z4freev", line: 35, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 35, file: !1, scope: !31, type: !32, variables: !2) +!30 = distinct !DISubprogram(name: "free", linkageName: "_Z4freev", line: 35, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 35, file: !1, scope: !31, type: !32, variables: !2) !31 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "") !32 = !DISubroutineType(types: !33) !33 = !{null} Index: test/DebugInfo/X86/debug-info-block-captured-self.ll =================================================================== --- test/DebugInfo/X86/debug-info-block-captured-self.ll +++ test/DebugInfo/X86/debug-info-block-captured-self.ll @@ -80,13 +80,12 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!108} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !107, enums: !2, retainedTypes: !4, subprograms: !23, globals: !15, imports: !15) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !107, enums: !2, retainedTypes: !4, globals: !15, imports: !15) !1 = !DIFile(filename: "llvm/tools/clang/test/CodeGenObjC/debug-info-block-captured-self.m", directory: "") !2 = !{!3} !3 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 20, size: 32, align: 32, file: !107, elements: !4) !4 = !{} !15 = !{} -!23 = !{!38, !42} !27 = !DIDerivedType(tag: DW_TAG_typedef, name: "id", line: 31, file: !107, baseType: !28) !28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !29) !29 = !DICompositeType(tag: DW_TAG_structure_type, name: "objc_object", file: !107, elements: !30) @@ -95,11 +94,11 @@ !32 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !33) !33 = !DICompositeType(tag: DW_TAG_structure_type, name: "objc_class", flags: DIFlagFwdDecl, file: !107) !34 = !DICompositeType(tag: DW_TAG_structure_type, name: "Main", line: 23, flags: DIFlagArtificial | DIFlagObjectPointer, runtimeLang: DW_LANG_ObjC, file: !107) -!38 = distinct !DISubprogram(name: "__24-[Main initWithContext:]_block_invoke", line: 33, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 33, file: !1, scope: !1, type: !39, variables: !15) +!38 = distinct !DISubprogram(name: "__24-[Main initWithContext:]_block_invoke", line: 33, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 33, file: !1, scope: !1, type: !39, variables: !15) !39 = !DISubroutineType(types: !40) !40 = !{null, !41, !27} !41 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: null) -!42 = distinct !DISubprogram(name: "__24-[Main initWithContext:]_block_invoke_2", line: 35, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 35, file: !1, scope: !1, type: !39, variables: !15) +!42 = distinct !DISubprogram(name: "__24-[Main initWithContext:]_block_invoke_2", line: 35, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 35, file: !1, scope: !1, type: !39, variables: !15) !84 = !DILocation(line: 33, scope: !38) !86 = !DILocalVariable(name: "self", line: 41, scope: !38, file: !1, type: !34) !87 = !DILocation(line: 41, scope: !38) Index: test/DebugInfo/X86/debug-info-blocks.ll =================================================================== --- test/DebugInfo/X86/debug-info-blocks.ll +++ test/DebugInfo/X86/debug-info-blocks.ll @@ -270,7 +270,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!56, !57, !58, !59, !110} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "llvm/tools/clang/test/CodeGenObjC/", directory: "llvm/_build.ninja.Debug") !2 = !{} !3 = !{!4} @@ -282,8 +282,7 @@ !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "NSObject", line: 21, align: 8, runtimeLang: DW_LANG_ObjC, file: !5, scope: !6, elements: !2) !10 = !DIDerivedType(tag: DW_TAG_member, name: "ivar", line: 35, size: 32, align: 32, file: !5, scope: !6, baseType: !11) !11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!12 = !{!13, !27, !31, !35, !36, !39} -!13 = distinct !DISubprogram(name: "-[A init]", line: 46, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 46, file: !5, scope: !6, type: !14, variables: !2) +!13 = distinct !DISubprogram(name: "-[A init]", line: 46, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 46, file: !5, scope: !6, type: !14, variables: !2) !14 = !DISubroutineType(types: !15) !15 = !{!16, !23, !24} !16 = !DIDerivedType(tag: DW_TAG_typedef, name: "id", line: 46, file: !5, baseType: !17) @@ -297,19 +296,19 @@ !24 = !DIDerivedType(tag: DW_TAG_typedef, name: "SEL", line: 46, flags: DIFlagArtificial, file: !5, baseType: !25) !25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !26) !26 = !DICompositeType(tag: DW_TAG_structure_type, name: "objc_selector", flags: DIFlagFwdDecl, file: !1) -!27 = distinct !DISubprogram(name: "__9-[A init]_block_invoke", line: 49, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 49, file: !5, scope: !6, type: !28, variables: !2) +!27 = distinct !DISubprogram(name: "__9-[A init]_block_invoke", line: 49, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 49, file: !5, scope: !6, type: !28, variables: !2) !28 = !DISubroutineType(types: !29) !29 = !{null, !30} !30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: null) -!31 = distinct !DISubprogram(name: "__copy_helper_block_", line: 52, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 52, file: !1, scope: !32, type: !33, variables: !2) +!31 = distinct !DISubprogram(name: "__copy_helper_block_", line: 52, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 52, file: !1, scope: !32, type: !33, variables: !2) !32 = !DIFile(filename: "llvm/tools/clang/test/CodeGenObjC/", directory: "llvm/_build.ninja.Debug") !33 = !DISubroutineType(types: !34) !34 = !{null, !30, !30} -!35 = distinct !DISubprogram(name: "__destroy_helper_block_", line: 52, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 52, file: !1, scope: !32, type: !28, variables: !2) -!36 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 60, file: !5, scope: !6, type: !37, variables: !2) +!35 = distinct !DISubprogram(name: "__destroy_helper_block_", line: 52, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 52, file: !1, scope: !32, type: !28, variables: !2) +!36 = distinct !DISubprogram(name: "main", line: 59, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 60, file: !5, scope: !6, type: !37, variables: !2) !37 = !DISubroutineType(types: !38) !38 = !{!11} -!39 = distinct !DISubprogram(name: "run", line: 39, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 40, file: !5, scope: !6, type: !40, variables: !2) +!39 = distinct !DISubprogram(name: "run", line: 39, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 40, file: !5, scope: !6, type: !40, variables: !2) !40 = !DISubroutineType(types: !41) !41 = !{null, !42} !42 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !43) Index: test/DebugInfo/X86/debug-info-packed-struct.ll =================================================================== --- test/DebugInfo/X86/debug-info-packed-struct.ll +++ test/DebugInfo/X86/debug-info-packed-struct.ll @@ -148,7 +148,7 @@ !llvm.module.flags = !{!45, !46} !llvm.ident = !{!47} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/", directory: "/llvm/_build.ninja.release") !2 = !{} !3 = !{!4, !18, !25, !35} Index: test/DebugInfo/X86/debug-info-static-member.ll =================================================================== --- test/DebugInfo/X86/debug-info-static-member.ll +++ test/DebugInfo/X86/debug-info-static-member.ll @@ -59,10 +59,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!34} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, emissionKind: FullDebug, file: !33, enums: !1, retainedTypes: !1, subprograms: !3, globals: !10, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, emissionKind: FullDebug, file: !33, enums: !1, retainedTypes: !1, globals: !10, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !33, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !33, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/debug-loc-asan.ll =================================================================== --- test/DebugInfo/X86/debug-loc-asan.ll +++ test/DebugInfo/X86/debug-loc-asan.ll @@ -168,11 +168,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (209308)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (209308)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.cc", directory: "/llvm_cmake_gcc") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3bari", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3bari", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.cc", directory: "/llvm_cmake_gcc") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/DebugInfo/X86/debug-loc-offset.ll =================================================================== --- test/DebugInfo/X86/debug-loc-offset.ll +++ test/DebugInfo/X86/debug-loc-offset.ll @@ -116,21 +116,19 @@ !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20, !20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "debug-loc-offset1.cc", directory: "/llvm_cmake_gcc") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3bari", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3bari", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "debug-loc-offset1.cc", directory: "/llvm_cmake_gcc") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !11, subprograms: !13, globals: !2, imports: !2) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !11, globals: !2, imports: !2) !10 = !DIFile(filename: "debug-loc-offset2.cc", directory: "/llvm_cmake_gcc") !11 = !{!12} !12 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, flags: DIFlagFwdDecl, file: !10, identifier: "_ZTS1A") -!13 = !{!14} -!14 = distinct !DISubprogram(name: "baz", linkageName: "_Z3baz1A", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !10, scope: !15, type: !16, variables: !2) +!14 = distinct !DISubprogram(name: "baz", linkageName: "_Z3baz1A", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !9, scopeLine: 6, file: !10, scope: !15, type: !16, variables: !2) !15 = !DIFile(filename: "debug-loc-offset2.cc", directory: "/llvm_cmake_gcc") !16 = !DISubroutineType(types: !17) !17 = !{null, !12} Index: test/DebugInfo/X86/debug-macro.ll =================================================================== --- test/DebugInfo/X86/debug-macro.ll +++ test/DebugInfo/X86/debug-macro.ll @@ -40,7 +40,7 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, macros: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, macros: !3) !1 = !DIFile(filename: "debug-macro.cpp", directory: "/") !2 = !{} !3 = !{!4, !5} @@ -58,10 +58,10 @@ !14 = !{i32 1, !"Debug Info Version", i32 3} !15 = !{!"clang version 3.5.0 "} -!16 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, macros: !18) +!16 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !2, retainedTypes: !2, globals: !2, imports: !2, macros: !18) !17 = !DIFile(filename: "debug-macro1.cpp", directory: "/") !18 = !{!19} !19 = !DIMacroFile(line: 0, file: !17, nodes: !2) -!20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !21 = !DIFile(filename: "debug-macro2.cpp", directory: "/") Index: test/DebugInfo/X86/debug-ranges-offset.ll =================================================================== --- test/DebugInfo/X86/debug-ranges-offset.ll +++ test/DebugInfo/X86/debug-ranges-offset.ll @@ -202,11 +202,10 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 207243) (llvm/trunk 207259)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 207243) (llvm/trunk 207259)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} -!3 = !{!4, !13} -!4 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !8) +!4 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !8) !5 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/echristo/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null} @@ -215,7 +214,7 @@ !10 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !11) !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !12) !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!13 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 9, file: !1, scope: !5, type: !14, variables: !2) +!13 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 9, file: !1, scope: !5, type: !14, variables: !2) !14 = !DISubroutineType(types: !15) !15 = !{!12} !16 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/debug_frame.ll =================================================================== --- test/DebugInfo/X86/debug_frame.ll +++ test/DebugInfo/X86/debug_frame.ll @@ -13,9 +13,9 @@ !llvm.module.flags = !{!7} !5 = !{!0} -!0 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !6, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 1, file: !6, scope: !1, type: !3) !1 = !DIFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/llvm/build") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !6, enums: !{}, retainedTypes: !{}, subprograms: !5) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !6, enums: !{}, retainedTypes: !{}) !3 = !DISubroutineType(types: !4) !4 = !{null} !6 = !DIFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/llvm/build") Index: test/DebugInfo/X86/debugger-tune.ll =================================================================== --- test/DebugInfo/X86/debugger-tune.ll +++ test/DebugInfo/X86/debugger-tune.ll @@ -33,7 +33,7 @@ !llvm.module.flags = !{!6, !7} !llvm.ident = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 238808)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 238808)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "debugger-tune.cpp", directory: "/home/probinson/projects/scratch") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/decl-derived-member.ll =================================================================== --- test/DebugInfo/X86/decl-derived-member.ll +++ test/DebugInfo/X86/decl-derived-member.ll @@ -100,7 +100,7 @@ !llvm.module.flags = !{!30, !31} !llvm.ident = !{!32} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !28, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !28, imports: !2) !1 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !8} @@ -109,24 +109,23 @@ !6 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 64, align: 64, file: !1, scope: !"_ZTS3foo", baseType: !7) !7 = !DIDerivedType(tag: DW_TAG_typedef, name: "base_type", line: 4, file: !1, baseType: !"_ZTS4base") !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "base", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS4base") -!9 = !{!10, !14, !19, !24, !26} -!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !11, type: !12, variables: !2) +!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !11, type: !12, variables: !2) !11 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo") !12 = !DISubroutineType(types: !13) !13 = !{null} -!14 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !18, variables: !2) +!14 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !18, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{null, !17} !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo") !18 = !DISubprogram(name: "foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS3foo", type: !15) -!19 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", line: 1, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !"_ZTS4base", type: !20, declaration: !23, variables: !2) +!19 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", line: 1, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !"_ZTS4base", type: !20, declaration: !23, variables: !2) !20 = !DISubroutineType(types: !21) !21 = !{null, !22} !22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS4base") !23 = !DISubprogram(name: "base", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS4base", type: !20) -!24 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !25, variables: !2) +!24 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !"_ZTS3foo", type: !15, declaration: !25, variables: !2) !25 = !DISubprogram(name: "~foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS3foo", type: !15) -!26 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_decl_derived_member.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !11, type: !27, variables: !2) +!26 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_decl_derived_member.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !11, type: !27, variables: !2) !27 = !DISubroutineType(types: !2) !28 = !{!29} !29 = !DIGlobalVariable(name: "f", line: 8, isLocal: false, isDefinition: true, scope: null, file: !11, type: !"_ZTS3foo", variable: %struct.foo* @f) Index: test/DebugInfo/X86/deleted-bit-piece.ll =================================================================== --- test/DebugInfo/X86/deleted-bit-piece.ll +++ test/DebugInfo/X86/deleted-bit-piece.ll @@ -28,7 +28,7 @@ !0 = !{i32 2, !"Dwarf Version", i32 2} !1 = !{i32 2, !"Debug Info Version", i32 3} -!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, subprograms: !11, globals: !4, imports: !4) +!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !4, imports: !4) !3 = !DIFile(filename: "foo.cpp", directory: "/path/to/dir") !4 = !{} !5 = !{!6} @@ -37,8 +37,7 @@ !8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32) !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32) -!11 = !{!12} -!12 = distinct !DISubprogram(name: "foo", scope: null, file: !3, type: !13, isLocal: false, isDefinition: true, isOptimized: false) +!12 = distinct !DISubprogram(name: "foo", scope: null, file: !3, type: !13, isLocal: false, isDefinition: true, isOptimized: false, unit: !2) !13 = !DISubroutineType(types: !14) !14 = !{null} !15 = !DILocalVariable(name: "v", scope: !12, type: !"_ZT5Class") Index: test/DebugInfo/X86/discriminator.ll =================================================================== --- test/DebugInfo/X86/discriminator.ll +++ test/DebugInfo/X86/discriminator.ll @@ -41,11 +41,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "discriminator.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "discriminator.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/dw_op_minus.ll =================================================================== --- test/DebugInfo/X86/dw_op_minus.ll +++ test/DebugInfo/X86/dw_op_minus.ll @@ -40,11 +40,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "1.cc", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !7) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8} Index: test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll =================================================================== --- test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll +++ test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll @@ -60,21 +60,20 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!19, !26} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (191881)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !17, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (191881)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !17, imports: !2) !1 = !DIFile(filename: "tmp/debug_ranges/a.cc", directory: "/") !2 = !{} -!3 = !{!4, !11, !14} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "tmp/debug_ranges/a.cc", directory: "/") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !{!10} !10 = !DILocalVariable(name: "bar", line: 2, arg: 1, scope: !4, file: !5, type: !8) -!11 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2i", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !12) +!11 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2i", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !12) !12 = !{!13} !13 = !DILocalVariable(name: "bar2", line: 3, arg: 1, scope: !11, file: !5, type: !8) -!14 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !15, variables: !2) +!14 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !15, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{!8} !17 = !{!18} Index: test/DebugInfo/X86/dwarf-aranges.ll =================================================================== --- test/DebugInfo/X86/dwarf-aranges.ll +++ test/DebugInfo/X86/dwarf-aranges.ll @@ -62,11 +62,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !8, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !8, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/home/kayamon") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "some_code", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "some_code", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/home/kayamon") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/X86/dwarf-linkage-names.ll =================================================================== --- test/DebugInfo/X86/dwarf-linkage-names.ll +++ test/DebugInfo/X86/dwarf-linkage-names.ll @@ -53,11 +53,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 244662)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !9) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 244662)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !9) !1 = !DIFile(filename: "dwarf-linkage-names.cpp", directory: "/home/probinson/projects/scratch") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", linkageName: "_ZN4test3barEv", scope: !5, file: !1, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "bar", linkageName: "_ZN4test3barEv", scope: !5, file: !1, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DINamespace(name: "test", scope: null, file: !1, line: 1) !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/dwarf-public-names.ll =================================================================== --- test/DebugInfo/X86/dwarf-public-names.ll +++ test/DebugInfo/X86/dwarf-public-names.ll @@ -96,10 +96,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!38} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, subprograms: !2, globals: !24, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !24, imports: !1) !1 = !{} -!2 = !{!3, !18, !19, !20} -!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1) +!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1) !4 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t") !5 = !DISubroutineType(types: !6) !6 = !{null, !7} @@ -114,9 +113,9 @@ !15 = !DISubroutineType(types: !16) !16 = !{!11} !17 = !{} ; previously: invalid DW_TAG_base_type -!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1) -!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1) -!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1) +!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1) +!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1) +!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1) !21 = !DINamespace(name: "ns", line: 23, file: !4, scope: null) !22 = !DISubroutineType(types: !23) !23 = !{null} Index: test/DebugInfo/X86/dwarf-pubnames-split.ll =================================================================== --- test/DebugInfo/X86/dwarf-pubnames-split.ll +++ test/DebugInfo/X86/dwarf-pubnames-split.ll @@ -24,11 +24,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 189287) (llvm/trunk 189296)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 189287) (llvm/trunk 189296)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/earlydup-crash.ll =================================================================== --- test/DebugInfo/X86/earlydup-crash.ll +++ test/DebugInfo/X86/earlydup-crash.ll @@ -46,9 +46,9 @@ !llvm.module.flags = !{!47} !0 = !DILocalVariable(name: "frname_len", line: 517, scope: !1, file: !3, type: !38) !1 = distinct !DILexicalBlock(line: 515, column: 0, file: !44, scope: !2) -!2 = distinct !DISubprogram(name: "framework_construct_pathname", line: 515, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !44, scope: null, type: !5) +!2 = distinct !DISubprogram(name: "framework_construct_pathname", line: 515, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !4, file: !44, scope: null, type: !5) !3 = !DIFile(filename: "darwin-c.c", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config") -!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !44, enums: !46, retainedTypes: !46, subprograms: !45) +!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !44, enums: !46, retainedTypes: !46) !5 = !DISubroutineType(types: !6) !6 = !{!7, !9, !11} !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !8) @@ -89,6 +89,5 @@ !42 = !DIFile(filename: "types.h", directory: "/usr/include/sys") !43 = !DIFile(filename: "stddef.h", directory: "/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include") !44 = !DIFile(filename: "darwin-c.c", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config") -!45 = !{!2} !46 = !{} !47 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/elf-names.ll =================================================================== --- test/DebugInfo/X86/elf-names.ll +++ test/DebugInfo/X86/elf-names.ll @@ -62,10 +62,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!54} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 167506) (llvm/trunk 167505)", isOptimized: true, emissionKind: FullDebug, file: !53, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 167506) (llvm/trunk 167505)", isOptimized: true, emissionKind: FullDebug, file: !53, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5, !31} -!5 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2Ev", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !6, scope: null, type: !7, declaration: !17, variables: !27) +!5 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2Ev", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !6, scope: null, type: !7, declaration: !17, variables: !27) !6 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/echristo") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} @@ -86,7 +85,7 @@ !27 = !{!29} !29 = !DILocalVariable(name: "this", line: 12, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !5, file: !6, type: !30) !30 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10) -!31 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2ERKS_", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 19, file: !6, scope: null, type: !21, declaration: !20, variables: !32) +!31 = distinct !DISubprogram(name: "D", linkageName: "_ZN1DC2ERKS_", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 19, file: !6, scope: null, type: !21, declaration: !20, variables: !32) !32 = !{!34, !35} !34 = !DILocalVariable(name: "this", line: 19, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !31, file: !6, type: !30) !35 = !DILocalVariable(name: "d", line: 19, arg: 2, scope: !31, file: !6, type: !23) Index: test/DebugInfo/X86/empty-and-one-elem-array.ll =================================================================== --- test/DebugInfo/X86/empty-and-one-elem-array.ll +++ test/DebugInfo/X86/empty-and-one-elem-array.ll @@ -63,10 +63,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!33} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "func", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 11, file: !6, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "func", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 11, file: !6, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "test.c", directory: "/Volumes/Sandbox/llvm") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/empty-array.ll =================================================================== --- test/DebugInfo/X86/empty-array.ll +++ test/DebugInfo/X86/empty-array.ll @@ -27,7 +27,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %class.A* @a) Index: test/DebugInfo/X86/empty.ll =================================================================== --- test/DebugInfo/X86/empty.ll +++ test/DebugInfo/X86/empty.ll @@ -19,7 +19,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} !3 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") !4 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") Index: test/DebugInfo/X86/ending-run.ll =================================================================== --- test/DebugInfo/X86/ending-run.ll +++ test/DebugInfo/X86/ending-run.ll @@ -29,10 +29,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 153921) (llvm/trunk 153916)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 153921) (llvm/trunk 153916)", isOptimized: false, emissionKind: FullDebug, file: !19, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "callee", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !19, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "callee", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 7, file: !19, scope: !6, type: !7) !6 = !DIFile(filename: "ending-run.c", directory: "/Users/echristo/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} Index: test/DebugInfo/X86/enum-class.ll =================================================================== --- test/DebugInfo/X86/enum-class.ll +++ test/DebugInfo/X86/enum-class.ll @@ -8,7 +8,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, emissionKind: FullDebug, file: !22, enums: !1, retainedTypes: !15, subprograms: !15, globals: !17, imports: !15) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, emissionKind: FullDebug, file: !22, enums: !1, retainedTypes: !15, globals: !17, imports: !15) !1 = !{!3, !8, !12} !3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", line: 1, size: 32, align: 32, file: !4, baseType: !5, elements: !6) !4 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp") Index: test/DebugInfo/X86/enum-fwd-decl.ll =================================================================== --- test/DebugInfo/X86/enum-fwd-decl.ll +++ test/DebugInfo/X86/enum-fwd-decl.ll @@ -6,7 +6,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 165274) (llvm/trunk 165272)", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 165274) (llvm/trunk 165272)", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "e", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i16* @e) Index: test/DebugInfo/X86/fission-cu.ll =================================================================== --- test/DebugInfo/X86/fission-cu.ll +++ test/DebugInfo/X86/fission-cu.ll @@ -8,7 +8,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)", isOptimized: false, splitDebugFilename: "baz.dwo", emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)", isOptimized: false, splitDebugFilename: "baz.dwo", emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i32* @a) Index: test/DebugInfo/X86/fission-hash.ll =================================================================== --- test/DebugInfo/X86/fission-hash.ll +++ test/DebugInfo/X86/fission-hash.ll @@ -9,7 +9,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 188230) (llvm/trunk 188234)", isOptimized: false, splitDebugFilename: "foo.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 188230) (llvm/trunk 188234)", isOptimized: false, splitDebugFilename: "foo.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 3} Index: test/DebugInfo/X86/fission-inline.ll =================================================================== --- test/DebugInfo/X86/fission-inline.ll +++ test/DebugInfo/X86/fission-inline.ll @@ -92,7 +92,7 @@ !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, splitDebugFilename: "fission-inline.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !2, imports: !18) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, splitDebugFilename: "fission-inline.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !18) !1 = !DIFile(filename: "fission-inline.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -101,9 +101,8 @@ !6 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 4, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !"_ZTS3foo", type: !7) !7 = !DISubroutineType(types: !8) !8 = !{null, null} -!9 = !{!10, !11} -!10 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 15, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2) -!11 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !"_ZTS3foo", type: !12, templateParams: !14, declaration: !17, variables: !2) +!10 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ez", line: 15, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 15, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2) +!11 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2IiEEvv", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !"_ZTS3foo", type: !12, templateParams: !14, declaration: !17, variables: !2) !12 = !DISubroutineType(types: !13) !13 = !{null} !14 = !{!15} Index: test/DebugInfo/X86/fission-ranges.ll =================================================================== --- test/DebugInfo/X86/fission-ranges.ll +++ test/DebugInfo/X86/fission-ranges.ll @@ -153,15 +153,14 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!26, !43} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191700) (llvm/trunk 191710)", isOptimized: true, splitDebugFilename: "small.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191700) (llvm/trunk 191710)", isOptimized: true, splitDebugFilename: "small.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "small.c", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "bar", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 19, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 19, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "small.c", directory: "/usr/local/google/home/echristo/tmp") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "foo", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !9, variables: !12) +!8 = distinct !DISubprogram(name: "foo", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !9, variables: !12) !9 = !DISubroutineType(types: !10) !10 = !{null, !11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/float_const.ll =================================================================== --- test/DebugInfo/X86/float_const.ll +++ test/DebugInfo/X86/float_const.ll @@ -31,14 +31,13 @@ !llvm.module.flags = !{!15, !16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227686)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !6, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227686)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "") !2 = !{} !3 = !{!4} !4 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !5) !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !{!7} -!7 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: true, scopeLine: 1, file: !8, scope: !9, type: !10, variables: !12) +!7 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, scopeLine: 1, file: !8, scope: !9, type: !10, variables: !12) !8 = !DIFile(filename: "foo.c", directory: "") !9 = !DIFile(filename: "foo.c", directory: "") !10 = !DISubroutineType(types: !11) Index: test/DebugInfo/X86/float_const_loclist.ll =================================================================== --- test/DebugInfo/X86/float_const_loclist.ll +++ test/DebugInfo/X86/float_const_loclist.ll @@ -62,11 +62,10 @@ !llvm.module.flags = !{!12, !13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/25448338") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: true, unit: !0, variables: !7) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8, !10} Index: test/DebugInfo/X86/formal_parameter.ll =================================================================== --- test/DebugInfo/X86/formal_parameter.ll +++ test/DebugInfo/X86/formal_parameter.ll @@ -59,11 +59,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "formal_parameter.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !9) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !9) !5 = !DIFile(filename: "formal_parameter.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/X86/frame-register.ll =================================================================== --- test/DebugInfo/X86/frame-register.ll +++ test/DebugInfo/X86/frame-register.ll @@ -33,16 +33,15 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "x.c", directory: "") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "x.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", line: 8, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 9, file: !1, scope: !5, type: !10, variables: !2) +!9 = distinct !DISubprogram(name: "main", line: 8, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 9, file: !1, scope: !5, type: !10, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!8} !12 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/generate-odr-hash.ll =================================================================== --- test/DebugInfo/X86/generate-odr-hash.ll +++ test/DebugInfo/X86/generate-odr-hash.ll @@ -219,7 +219,7 @@ !llvm.module.flags = !{!43, !44} !llvm.ident = !{!45} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !21, globals: !38, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !38, imports: !2) !1 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !6, !14, !17} @@ -240,13 +240,12 @@ !18 = !{!19, !20} !19 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 33, size: 32, align: 32, file: !1, scope: !"_ZTSN6wombatUt_E", baseType: !12) !20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 34, size: 32, align: 32, offset: 32, file: !1, scope: !"_ZTSN6wombatUt_E", baseType: !12) -!21 = !{!22, !26, !27, !36} -!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !23, type: !24, variables: !2) +!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !23, type: !24, variables: !2) !23 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo") !24 = !DISubroutineType(types: !25) !25 = !{null} -!26 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 29, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 29, file: !1, scope: !23, type: !24, variables: !2) -!27 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !28, type: !32, declaration: !31, variables: !2) +!26 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 29, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 29, file: !1, scope: !23, type: !24, variables: !2) +!27 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !28, type: !32, declaration: !31, variables: !2) !28 = !DICompositeType(tag: DW_TAG_structure_type, name: "walrus", line: 24, size: 8, align: 8, file: !1, scope: !29, elements: !30) !29 = !DINamespace(line: 23, file: !1, scope: null) !30 = !{!31} @@ -254,7 +253,7 @@ !32 = !DISubroutineType(types: !33) !33 = !{null, !34} !34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !28) -!36 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, scopeLine: 25, file: !1, scope: !23, type: !37, variables: !2) +!36 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !23, type: !37, variables: !2) !37 = !DISubroutineType(types: !2) !38 = !{!39, !40, !41, !42} !39 = !DIGlobalVariable(name: "b", line: 3, isLocal: false, isDefinition: true, scope: null, file: !23, type: !4, variable: %struct.bar* @b) Index: test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll =================================================================== --- test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll +++ test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll @@ -68,15 +68,14 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !7, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "ghost-sdnode-dbgvalues.c", directory: "/tmp") !2 = !{} !3 = !{!4} !4 = !DIDerivedType(tag: DW_TAG_typedef, name: "int16_t", line: 30, file: !5, baseType: !6) !5 = !DIFile(filename: "/usr/include/sys/_types/_int16_t.h", directory: "/tmp") !6 = !DIBasicType(tag: DW_TAG_base_type, name: "short", size: 16, align: 16, encoding: DW_ATE_signed) -!7 = !{!8} -!8 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !9, type: !10, variables: !2) +!8 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !9, type: !10, variables: !2) !9 = !DIFile(filename: "ghost-sdnode-dbgvalues.c", directory: "/tmp") !10 = !DISubroutineType(types: !11) !11 = !{!12, !12} Index: test/DebugInfo/X86/gnu-public-names-empty.ll =================================================================== --- test/DebugInfo/X86/gnu-public-names-empty.ll +++ test/DebugInfo/X86/gnu-public-names-empty.ll @@ -12,7 +12,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191846) (llvm/trunk 191866)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191846) (llvm/trunk 191866)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/gnu-public-names.ll =================================================================== --- test/DebugInfo/X86/gnu-public-names.ll +++ test/DebugInfo/X86/gnu-public-names.ll @@ -300,7 +300,7 @@ !llvm.module.flags = !{!48, !49} !llvm.ident = !{!50} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !19, globals: !31, imports: !44) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !31, imports: !44) !1 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !15} @@ -319,18 +319,17 @@ !16 = !DINamespace(name: "ns", scope: null, file: !1, line: 23) !17 = !{!18} !18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !"_ZTSN2ns1DE", file: !1, line: 30, baseType: !7, size: 32, align: 32) -!19 = !{!20, !21, !22, !23, !26, !30} -!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, declaration: !8, variables: !2) -!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, declaration: !12, variables: !2) -!22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, variables: !2) -!23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2) +!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2) +!22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !24 = !DISubroutineType(types: !25) !25 = !{null} -!26 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!26 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !27 = !DISubroutineType(types: !28) !28 = !{!29} !29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64) -!30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !31 = !{!32, !33, !34, !35, !36, !37, !39, !41} !32 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN1C22static_member_variableE, declaration: !6) !33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !"_ZTS1C", isLocal: false, isDefinition: true, variable: %struct.C* @global_variable) Index: test/DebugInfo/X86/header.ll =================================================================== --- test/DebugInfo/X86/header.ll +++ test/DebugInfo/X86/header.ll @@ -17,11 +17,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "foo", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "/foo/test.c", directory: "/foo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/inline-asm-locs.ll =================================================================== --- test/DebugInfo/X86/inline-asm-locs.ll +++ test/DebugInfo/X86/inline-asm-locs.ll @@ -50,11 +50,10 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 256963)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 256963)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/22690666") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 14, type: !5, isLocal: false, isDefinition: true, scopeLine: 14, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 14, type: !5, isLocal: false, isDefinition: true, scopeLine: 14, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/X86/inline-member-function.ll =================================================================== --- test/DebugInfo/X86/inline-member-function.ll +++ test/DebugInfo/X86/inline-member-function.ll @@ -65,7 +65,7 @@ !llvm.module.flags = !{!20, !21} !llvm.ident = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !18, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !18, imports: !2) !1 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -76,12 +76,11 @@ !8 = !{!9, !10, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo") -!12 = !{!13, !17} -!13 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !14, type: !15, variables: !2) +!13 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !14, type: !15, variables: !2) !14 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo") !15 = !DISubroutineType(types: !16) !16 = !{!9} -!17 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2) +!17 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7, declaration: !6, variables: !2) !18 = !{!19} !19 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: null, file: !14, type: !9, variable: i32* @i) !20 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/inline-seldag-test.ll =================================================================== --- test/DebugInfo/X86/inline-seldag-test.ll +++ test/DebugInfo/X86/inline-seldag-test.ll @@ -48,15 +48,14 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "inline-seldag-test.c", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "func", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "inline-seldag-test.c", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !9, variables: !2) +!8 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !9, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{!11, !11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/inlined-formal-parameter.ll =================================================================== --- test/DebugInfo/X86/inlined-formal-parameter.ll +++ test/DebugInfo/X86/inlined-formal-parameter.ll @@ -48,14 +48,13 @@ !llvm.module.flags = !{!13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 235110) (llvm/trunk 235108)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 235110) (llvm/trunk 235108)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "t.c", directory: "/path/to/dir") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !8, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!7 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !8, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !8 = !DISubroutineType(types: !9) !9 = !{null, !10} !10 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/inlined-indirect-value.ll =================================================================== --- test/DebugInfo/X86/inlined-indirect-value.ll +++ test/DebugInfo/X86/inlined-indirect-value.ll @@ -49,15 +49,14 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !1 = !DIFile(filename: "inline-break.c", directory: "/build/dir") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 3, type: !5, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: true, variables: !2) +!8 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 3, type: !5, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2) !9 = !{!10, !12} !10 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !11, isLocal: false, isDefinition: true, variable: i32* @x) !11 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) Index: test/DebugInfo/X86/instcombine-instrinsics.ll =================================================================== --- test/DebugInfo/X86/instcombine-instrinsics.ll +++ test/DebugInfo/X86/instcombine-instrinsics.ll @@ -54,11 +54,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "instcombine_intrinsics.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "init", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "init", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "instcombine_intrinsics.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/X86/lexical_block.ll =================================================================== --- test/DebugInfo/X86/lexical_block.ll +++ test/DebugInfo/X86/lexical_block.ll @@ -48,11 +48,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "lexical_block.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "lexical_block.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/X86/line-info.ll =================================================================== --- test/DebugInfo/X86/line-info.ll +++ test/DebugInfo/X86/line-info.ll @@ -38,17 +38,16 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "list0.c", directory: "/usr/local/google/home/blaikie/dev/scratch") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "./list0.h", directory: "/usr/local/google/home/blaikie/dev/scratch") !6 = !DIFile(filename: "./list0.h", directory: "/usr/local/google/home/blaikie/dev/scratch") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !1, scope: !11, type: !12, variables: !2) +!10 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !11, type: !12, variables: !2) !11 = !DIFile(filename: "list0.c", directory: "/usr/local/google/home/blaikie/dev/scratch") !12 = !DISubroutineType(types: !13) !13 = !{!9} Index: test/DebugInfo/X86/linkage-name.ll =================================================================== --- test/DebugInfo/X86/linkage-name.ll +++ test/DebugInfo/X86/linkage-name.ll @@ -27,10 +27,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 152691) (llvm/trunk 152692)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, subprograms: !3, globals: !18, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 152691) (llvm/trunk 152692)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !18, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !6, scope: null, type: !7, declaration: !13) +!5 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !6, scope: null, type: !7, declaration: !13) !6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo") !7 = !DISubroutineType(types: !8) !8 = !{!9, !10, !9} Index: test/DebugInfo/X86/live-debug-values.ll =================================================================== --- test/DebugInfo/X86/live-debug-values.ll +++ test/DebugInfo/X86/live-debug-values.ll @@ -104,11 +104,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !15) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !15) !1 = !DIFile(filename: "LiveDebugValues.c", directory: "/home/vt/julia/test/tvvikram") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7, !8} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/low-pc-cu.ll =================================================================== --- test/DebugInfo/X86/low-pc-cu.ll +++ test/DebugInfo/X86/low-pc-cu.ll @@ -32,11 +32,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "z.c", directory: "/usr/local/google/home/echristo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "z", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "z", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "z.c", directory: "/usr/local/google/home/echristo") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/DebugInfo/X86/memberfnptr.ll =================================================================== --- test/DebugInfo/X86/memberfnptr.ll +++ test/DebugInfo/X86/memberfnptr.ll @@ -24,7 +24,7 @@ !llvm.module.flags = !{!14, !15, !16} !llvm.ident = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !10, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !10, imports: !2) !1 = !DIFile(filename: "memberfnptr.cpp", directory: "") !2 = !{} !3 = !{!4} Index: test/DebugInfo/X86/mi-print.ll =================================================================== --- test/DebugInfo/X86/mi-print.ll +++ test/DebugInfo/X86/mi-print.ll @@ -31,17 +31,16 @@ !llvm.module.flags = !{!13, !14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "t.c", directory: "/Users/dexonsmith/data/llvm/debug-info/test/DebugInfo/X86") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !{!9} !9 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1, line: 2, type: !7) -!10 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: true, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!10 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: true, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !11 = !{!12} !12 = !DILocalVariable(name: "x", arg: 1, scope: !10, file: !1, line: 1, type: !7) !13 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/X86/misched-dbg-value.ll =================================================================== --- test/DebugInfo/X86/misched-dbg-value.ll +++ test/DebugInfo/X86/misched-dbg-value.ll @@ -103,7 +103,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!83} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 175015)", isOptimized: true, emissionKind: FullDebug, file: !82, enums: !1, retainedTypes: !10, subprograms: !11, globals: !29, imports: !10) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 175015)", isOptimized: true, emissionKind: FullDebug, file: !82, enums: !1, retainedTypes: !10, globals: !29, imports: !10) !1 = !{!2} !2 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 128, size: 32, align: 32, file: !82, elements: !4) !3 = !DIFile(filename: "dry.c", directory: "/Users/manmanren/test-Nov/rdar_13183203/test2") @@ -114,8 +114,7 @@ !8 = !DIEnumerator(name: "Ident4", value: 10002) ; [ DW_TAG_enumerator ] [Ident4 :: 10002] !9 = !DIEnumerator(name: "Ident5", value: 10003) ; [ DW_TAG_enumerator ] [Ident5 :: 10003] !10 = !{} -!11 = !{!12} -!12 = distinct !DISubprogram(name: "Proc8", line: 180, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 185, file: !82, scope: !3, type: !13, variables: !22) +!12 = distinct !DISubprogram(name: "Proc8", line: 180, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 185, file: !82, scope: !3, type: !13, variables: !22) !13 = !DISubroutineType(types: !14) !14 = !{null, !15, !17, !21, !21} !15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !16) Index: test/DebugInfo/X86/missing-file-line.ll =================================================================== --- test/DebugInfo/X86/missing-file-line.ll +++ test/DebugInfo/X86/missing-file-line.ll @@ -36,11 +36,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "file.c", directory: "/dir") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/mixed-nodebug-cu.ll =================================================================== --- test/DebugInfo/X86/mixed-nodebug-cu.ll +++ test/DebugInfo/X86/mixed-nodebug-cu.ll @@ -31,16 +31,14 @@ !llvm.ident = !{!11, !11} !llvm.module.flags = !{!12, !13, !14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !8) -!8 = !{!9} -!9 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) +!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) +!9 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !7, variables: !2) !10 = !DISubroutineType(types: !2) !11 = !{!"clang version 3.9.0 (trunk 265328) (llvm/trunk 265330)"} !12 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/X86/multiple-aranges.ll =================================================================== --- test/DebugInfo/X86/multiple-aranges.ll +++ test/DebugInfo/X86/multiple-aranges.ll @@ -44,14 +44,14 @@ !llvm.dbg.cu = !{!0, !7} !llvm.module.flags = !{!12, !13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "test1.c", directory: "/home/kayamon") !2 = !{} !3 = !{!4} !4 = !DIGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @kittens) !5 = !DIFile(filename: "test1.c", directory: "/home/kayamon") !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, subprograms: !2, globals: !9, imports: !2) +!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !8 = !DIFile(filename: "test2.c", directory: "/home/kayamon") !9 = !{!10} !10 = !DIGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6, variable: i32* @rainbows) Index: test/DebugInfo/X86/multiple-at-const-val.ll =================================================================== --- test/DebugInfo/X86/multiple-at-const-val.ll +++ test/DebugInfo/X86/multiple-at-const-val.ll @@ -32,7 +32,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!1803} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 174207)", isOptimized: true, emissionKind: FullDebug, file: !1802, enums: !1, retainedTypes: !955, subprograms: !956, globals: !1786, imports: !955) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 174207)", isOptimized: true, emissionKind: FullDebug, file: !1802, enums: !1, retainedTypes: !955, globals: !1786, imports: !955) !1 = !{!26} !4 = !DINamespace(name: "std", line: 48, scope: !5) !5 = !DIFile(filename: "os_base.h", directory: "/privite/tmp") @@ -53,8 +53,7 @@ !78 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !79) !79 = !DIDerivedType(tag: DW_TAG_typedef, name: "ostate", line: 327, file: !1801, scope: !49, baseType: !26) !955 = !{} -!956 = !{!960} -!960 = distinct !DISubprogram(name: "main", line: 73, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 73, file: !1802, scope: null, type: !54, variables: !955) +!960 = distinct !DISubprogram(name: "main", line: 73, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 73, file: !1802, scope: null, type: !54, variables: !955) !961 = !DIFile(filename: "student2.cpp", directory: "/privite/tmp") !1786 = !{!1800} !1800 = !DIGlobalVariable(name: "badbit", linkageName: "badbit", line: 331, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !78, variable: i32 1, declaration: !77) Index: test/DebugInfo/X86/nodebug_with_debug_loc.ll =================================================================== --- test/DebugInfo/X86/nodebug_with_debug_loc.ll +++ test/DebugInfo/X86/nodebug_with_debug_loc.ll @@ -97,7 +97,7 @@ !llvm.module.flags = !{!23, !24} !llvm.ident = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !10, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} @@ -107,14 +107,13 @@ !7 = !DIDerivedType(tag: DW_TAG_member, name: "mem", line: 8, size: 32, align: 32, file: !5, scope: !"_ZTS6string", baseType: !8) !8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !9) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) -!10 = !{!11, !17} -!11 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 14, file: !5, scope: !12, type: !13, variables: !15) +!11 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !5, scope: !12, type: !13, variables: !15) !12 = !DIFile(filename: "repro.cpp", directory: "/tmp/dbginfo") !13 = !DISubroutineType(types: !14) !14 = !{null} !15 = !{!16} !16 = !DILocalVariable(name: "str2", line: 15, scope: !11, file: !12, type: !"_ZTS6string") -!17 = distinct !DISubprogram(name: "s2", linkageName: "_Z2s2P6string", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !5, scope: !12, type: !18, variables: !21) +!17 = distinct !DISubprogram(name: "s2", linkageName: "_Z2s2P6string", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !12, type: !18, variables: !21) !18 = !DISubroutineType(types: !19) !19 = !{null, !20} !20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !"_ZTS6string") Index: test/DebugInfo/X86/nondefault-subrange-array.ll =================================================================== --- test/DebugInfo/X86/nondefault-subrange-array.ll +++ test/DebugInfo/X86/nondefault-subrange-array.ll @@ -30,7 +30,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %class.A* @a) Index: test/DebugInfo/X86/nophysreg.ll =================================================================== --- test/DebugInfo/X86/nophysreg.ll +++ test/DebugInfo/X86/nophysreg.ll @@ -136,7 +136,7 @@ !llvm.module.flags = !{!29, !30, !31} !llvm.ident = !{!32} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227088) (llvm/trunk 227091)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !10, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227088) (llvm/trunk 227091)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "test.cpp", directory: "") !2 = !{} !3 = !{!4} @@ -146,14 +146,13 @@ !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !DIDerivedType(tag: DW_TAG_member, name: "m2", line: 3, size: 32, align: 32, offset: 64, file: !1, scope: !"_ZTS1A", baseType: !8) -!10 = !{!11, !17} -!11 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f21A", line: 7, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !1, scope: !12, type: !13, variables: !15) +!11 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f21A", line: 7, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !1, scope: !12, type: !13, variables: !15) !12 = !DIFile(filename: "test.cpp", directory: "") !13 = !DISubroutineType(types: !14) !14 = !{null, !"_ZTS1A"} !15 = !{!16} !16 = !DILocalVariable(name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A") -!17 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !1, scope: !12, type: !18, variables: !20) +!17 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !1, scope: !12, type: !18, variables: !20) !18 = !DISubroutineType(types: !19) !19 = !{null} !20 = !{!21, !23, !26, !27, !28} Index: test/DebugInfo/X86/objc-fwd-decl.ll =================================================================== --- test/DebugInfo/X86/objc-fwd-decl.ll +++ test/DebugInfo/X86/objc-fwd-decl.ll @@ -12,7 +12,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !10, !11, !12, !14} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.1 (trunk 152054 trunk 152094)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.1 (trunk 152054 trunk 152094)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %0** @a) Index: test/DebugInfo/X86/objc-property-void.ll =================================================================== --- test/DebugInfo/X86/objc-property-void.ll +++ test/DebugInfo/X86/objc-property-void.ll @@ -72,7 +72,7 @@ !llvm.module.flags = !{!17, !18, !19, !20, !21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "-", directory: "") !2 = !{} !3 = !{!4} @@ -81,8 +81,7 @@ !6 = !DIFile(filename: "", directory: "") !7 = !{!8} !8 = !DIObjCProperty(name: "foo", line: 2, attributes: 2117, file: !6) -!9 = !{!10} -!10 = distinct !DISubprogram(name: "-[Foo foo]", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !6, type: !11, variables: !2) +!10 = distinct !DISubprogram(name: "-[Foo foo]", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !5, scope: !6, type: !11, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{null, !13, !14} !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4) Index: test/DebugInfo/X86/op_deref.ll =================================================================== --- test/DebugInfo/X86/op_deref.ll +++ test/DebugInfo/X86/op_deref.ll @@ -80,10 +80,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156005) (llvm/trunk 156000)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156005) (llvm/trunk 156000)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "testVLAwithSize", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !28, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "testVLAwithSize", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !28, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "bar.c", directory: "/Users/echristo/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} Index: test/DebugInfo/X86/parameters.ll =================================================================== --- test/DebugInfo/X86/parameters.ll +++ test/DebugInfo/X86/parameters.ll @@ -86,11 +86,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21, !33} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "pass.cpp", directory: "/tmp") !2 = !{} -!3 = !{!4, !17} -!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DINamespace(name: "pr14763", line: 1, file: !1, scope: null) !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} @@ -102,7 +101,7 @@ !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8) !14 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !15) !15 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8) -!17 = distinct !DISubprogram(name: "func2", linkageName: "_ZN7pr147635func2EbNS_3fooE", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !5, type: !18, variables: !2) +!17 = distinct !DISubprogram(name: "func2", linkageName: "_ZN7pr147635func2EbNS_3fooE", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 12, file: !1, scope: !5, type: !18, variables: !2) !18 = !DISubroutineType(types: !19) !19 = !{null, !20, !8} !20 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) Index: test/DebugInfo/X86/pieces-1.ll =================================================================== --- test/DebugInfo/X86/pieces-1.ll +++ test/DebugInfo/X86/pieces-1.ll @@ -50,11 +50,10 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "pieces.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !15) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !15) !5 = !DIFile(filename: "pieces.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/pieces-2.ll =================================================================== --- test/DebugInfo/X86/pieces-2.ll +++ test/DebugInfo/X86/pieces-2.ll @@ -62,11 +62,10 @@ !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "sroasplit-1.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "sroasplit-1.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/pieces-3.ll =================================================================== --- test/DebugInfo/X86/pieces-3.ll +++ test/DebugInfo/X86/pieces-3.ll @@ -75,11 +75,10 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "sroasplit-2.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "sroasplit-2.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/pointer-type-size.ll =================================================================== --- test/DebugInfo/X86/pointer-type-size.ll +++ test/DebugInfo/X86/pointer-type-size.ll @@ -11,7 +11,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 147882)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 147882)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "crass", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %struct.crass* @crass) Index: test/DebugInfo/X86/pr11300.ll =================================================================== --- test/DebugInfo/X86/pr11300.ll +++ test/DebugInfo/X86/pr11300.ll @@ -38,10 +38,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!33} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !32, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5, !20} -!5 = distinct !DISubprogram(name: "zed", linkageName: "_Z3zedP3foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !6, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "zed", linkageName: "_Z3zedP3foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !6, scope: !6, type: !7) !6 = !DIFile(filename: "/home/espindola/llvm/test.cc", directory: "/home/espindola/tmpfs/build") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} @@ -52,7 +51,7 @@ !13 = !DISubroutineType(types: !14) !14 = !{null, !15} !15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !10) -!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: null, type: !13, declaration: !12) +!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !6, scope: null, type: !13, declaration: !12) !23 = !DILocalVariable(name: "x", line: 4, arg: 1, scope: !5, file: !6, type: !9) !24 = !DILocation(line: 4, column: 15, scope: !5) !25 = !DILocation(line: 4, column: 20, scope: !26) Index: test/DebugInfo/X86/pr12831.ll =================================================================== --- test/DebugInfo/X86/pr12831.ll +++ test/DebugInfo/X86/pr12831.ll @@ -78,10 +78,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!162} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 ", isOptimized: false, emissionKind: FullDebug, file: !161, enums: !1, retainedTypes: !1, subprograms: !3, globals: !128) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 ", isOptimized: false, emissionKind: FullDebug, file: !161, enums: !1, retainedTypes: !1, globals: !128) !1 = !{} -!3 = !{!5, !106, !107, !126, !127} -!5 = distinct !DISubprogram(name: "writeExpr", linkageName: "_ZN17BPLFunctionWriter9writeExprEv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !6, scope: null, type: !7, declaration: !103, variables: !1) +!5 = distinct !DISubprogram(name: "writeExpr", linkageName: "_ZN17BPLFunctionWriter9writeExprEv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 19, file: !6, scope: null, type: !7, declaration: !103, variables: !1) !6 = !DIFile(filename: "BPLFunctionWriter2.ii", directory: "/home/peter/crashdelta") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} @@ -156,8 +155,8 @@ !99 = !DISubroutineType(types: !100) !100 = !{null} !103 = !DISubprogram(name: "writeExpr", linkageName: "_ZN17BPLFunctionWriter9writeExprEv", line: 17, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, scopeLine: 17, file: !6, scope: !10, type: !7) -!106 = distinct !DISubprogram(name: "function >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: null, type: !59, templateParams: !82, declaration: !58, variables: !1) -!107 = distinct !DISubprogram(name: "_M_not_empty_function >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !108, templateParams: !111, declaration: !113, variables: !1) +!106 = distinct !DISubprogram(name: "function >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !6, scope: null, type: !59, templateParams: !82, declaration: !58, variables: !1) +!107 = distinct !DISubprogram(name: "_M_not_empty_function >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !108, templateParams: !111, declaration: !113, variables: !1) !108 = !DISubroutineType(types: !109) !109 = !{null, !110} !110 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !61) @@ -172,8 +171,8 @@ !119 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !26) !120 = !{!121} !121 = !DITemplateTypeParameter(name: "_Tp", type: !26) -!126 = distinct !DISubprogram(name: "function >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: null, type: !23, templateParams: !47, declaration: !22, variables: !1) -!127 = distinct !DISubprogram(name: "_M_not_empty_function >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !117, templateParams: !120, declaration: !116, variables: !1) +!126 = distinct !DISubprogram(name: "function >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !6, scope: null, type: !23, templateParams: !47, declaration: !22, variables: !1) +!127 = distinct !DISubprogram(name: "_M_not_empty_function >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: null, type: !117, templateParams: !120, declaration: !116, variables: !1) !128 = !{!130} !130 = !DIGlobalVariable(name: "__stored_locally", linkageName: "__stored_locally", line: 2, isLocal: true, isDefinition: true, scope: !114, file: !6, type: !131, variable: i1 1) !131 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !132) Index: test/DebugInfo/X86/pr13303.ll =================================================================== --- test/DebugInfo/X86/pr13303.ll +++ test/DebugInfo/X86/pr13303.ll @@ -15,10 +15,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 160143)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 160143)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !12, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 1, file: !12, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "PR13303.c", directory: "/home/probinson") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/pr19307.ll =================================================================== --- test/DebugInfo/X86/pr19307.ll +++ test/DebugInfo/X86/pr19307.ll @@ -84,7 +84,7 @@ !llvm.module.flags = !{!42, !43} !llvm.ident = !{!44} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (209308)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !2, imports: !21) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (209308)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !21) !1 = !DIFile(filename: "pr19307.cc", directory: "/llvm_cmake_gcc") !2 = !{} !3 = !{!4, !6, !8} @@ -96,8 +96,7 @@ !9 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/basic_string.tcc", directory: "/llvm_cmake_gcc") !10 = !DINamespace(name: "std", line: 153, file: !11, scope: null) !11 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu/bits/c++config.h", directory: "/llvm_cmake_gcc") -!12 = !{!13} -!13 = distinct !DISubprogram(name: "parse_range", linkageName: "_Z11parse_rangeRyS_Ss", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !14, type: !15, variables: !2) +!13 = distinct !DISubprogram(name: "parse_range", linkageName: "_Z11parse_rangeRyS_Ss", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !14, type: !15, variables: !2) !14 = !DIFile(filename: "pr19307.cc", directory: "/llvm_cmake_gcc") !15 = !DISubroutineType(types: !16) !16 = !{null, !17, !17, !19} Index: test/DebugInfo/X86/processes-relocations.ll =================================================================== --- test/DebugInfo/X86/processes-relocations.ll +++ test/DebugInfo/X86/processes-relocations.ll @@ -13,7 +13,7 @@ !llvm.module.flags = !{!3, !4} !llvm.ident = !{!5} -!0 = distinct !DICompileUnit(file: !1, language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, emissionKind: FullDebug) +!0 = distinct !DICompileUnit(file: !1, language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, enums: !2, retainedTypes: !2, globals: !2, imports: !2, emissionKind: FullDebug) !1 = !DIFile(filename: "empty.c", directory: "/a") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/X86/prologue-stack.ll =================================================================== --- test/DebugInfo/X86/prologue-stack.ll +++ test/DebugInfo/X86/prologue-stack.ll @@ -21,10 +21,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 164980) (llvm/trunk 164979)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 164980) (llvm/trunk 164979)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "isel_line_test2", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !13, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "isel_line_test2", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 4, file: !13, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "bar.c", directory: "/usr/local/google/home/echristo/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/ref_addr_relocation.ll =================================================================== --- test/DebugInfo/X86/ref_addr_relocation.ll +++ test/DebugInfo/X86/ref_addr_relocation.ll @@ -58,7 +58,7 @@ !llvm.dbg.cu = !{!0, !9} !llvm.module.flags = !{!14, !15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !6, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !6, imports: !2) !1 = !DIFile(filename: "tu1.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr") !2 = !{} !3 = !{!4} @@ -67,7 +67,7 @@ !6 = !{!7} !7 = !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !8, type: !4, variable: %struct.foo* @f) !8 = !DIFile(filename: "tu1.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr") -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !3, subprograms: !2, globals: !11, imports: !2) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !3, globals: !11, imports: !2) !10 = !DIFile(filename: "tu2.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr") !11 = !{!12} !12 = !DIGlobalVariable(name: "g", line: 2, isLocal: false, isDefinition: true, scope: null, file: !13, type: !4, variable: %struct.foo* @g) Index: test/DebugInfo/X86/reference-argument.ll =================================================================== --- test/DebugInfo/X86/reference-argument.ll +++ test/DebugInfo/X86/reference-argument.ll @@ -44,11 +44,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!47, !68} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "aggregate-indirect-arg.cpp", directory: "") !2 = !{} -!3 = !{!4, !29, !33, !34, !35} -!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barR4SVal", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barR4SVal", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 19, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "aggregate-indirect-arg.cpp", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} @@ -70,13 +69,13 @@ !25 = !{null, !19, !26} !26 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !27) !27 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9) -!29 = distinct !DISubprogram(name: "main", line: 25, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !5, type: !30, variables: !2) +!29 = distinct !DISubprogram(name: "main", line: 25, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !5, type: !30, variables: !2) !30 = !DISubroutineType(types: !31) !31 = !{!32} !32 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!33 = distinct !DISubprogram(name: "~SVal", linkageName: "_ZN4SValD1Ev", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: null, type: !17, declaration: !16, variables: !2) -!34 = distinct !DISubprogram(name: "~SVal", linkageName: "_ZN4SValD2Ev", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: null, type: !17, declaration: !16, variables: !2) -!35 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1A3fooE4SVal", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: null, type: !36, declaration: !41, variables: !2) +!33 = distinct !DISubprogram(name: "~SVal", linkageName: "_ZN4SValD1Ev", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 14, file: !1, scope: null, type: !17, declaration: !16, variables: !2) +!34 = distinct !DISubprogram(name: "~SVal", linkageName: "_ZN4SValD2Ev", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 14, file: !1, scope: null, type: !17, declaration: !16, variables: !2) +!35 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1A3fooE4SVal", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 22, file: !1, scope: null, type: !36, declaration: !41, variables: !2) !36 = !DISubroutineType(types: !37) !37 = !{null, !38, !9} !38 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !39) Index: test/DebugInfo/X86/rvalue-ref.ll =================================================================== --- test/DebugInfo/X86/rvalue-ref.ll +++ test/DebugInfo/X86/rvalue-ref.ll @@ -23,10 +23,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157054) (llvm/trunk 157060)", isOptimized: false, emissionKind: FullDebug, file: !16, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157054) (llvm/trunk 157060)", isOptimized: false, emissionKind: FullDebug, file: !16, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooOi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !16, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooOi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !16, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null, !9} Index: test/DebugInfo/X86/safestack-byval.ll =================================================================== --- test/DebugInfo/X86/safestack-byval.ll +++ test/DebugInfo/X86/safestack-byval.ll @@ -57,7 +57,7 @@ !llvm.module.flags = !{!19, !20} !llvm.ident = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 254107) (llvm/trunk 254109)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 254107) (llvm/trunk 254109)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "../llvm/1.cc", directory: "/tmp/build") !2 = !{} !3 = !{!4} @@ -68,8 +68,7 @@ !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !{!10} !10 = !DISubrange(count: 100) -!11 = !{!12} -!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1Sm", scope: !1, file: !1, line: 8, type: !13, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !16) +!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1Sm", scope: !1, file: !1, line: 8, type: !13, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !16) !13 = !DISubroutineType(types: !14) !14 = !{!8, !"_ZTS1S", !15} !15 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) Index: test/DebugInfo/X86/single-dbg_value.ll =================================================================== --- test/DebugInfo/X86/single-dbg_value.ll +++ test/DebugInfo/X86/single-dbg_value.ll @@ -49,11 +49,10 @@ !llvm.module.flags = !{!10, !11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !7) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8} Index: test/DebugInfo/X86/sret.ll =================================================================== --- test/DebugInfo/X86/sret.ll +++ test/DebugInfo/X86/sret.ll @@ -263,7 +263,7 @@ !llvm.module.flags = !{!64, !65} !llvm.ident = !{!66} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 203283) (llvm/trunk 203307)", isOptimized: false, splitDebugFilename: "sret.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !48, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 203283) (llvm/trunk 203307)", isOptimized: false, splitDebugFilename: "sret.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "sret.cpp", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{!4, !37} @@ -304,22 +304,21 @@ !44 = !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 43, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 43, file: !1, scope: !"_ZTS1B", type: !45) !45 = !DISubroutineType(types: !46) !46 = !{!4, !42} -!48 = !{!49, !50, !51, !52, !53, !54, !61, !62, !63} -!49 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 18, file: !1, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2) -!50 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2ERKS_", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !1, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2) -!51 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 28, file: !1, scope: !"_ZTS1A", type: !26, declaration: !25, variables: !2) -!52 = distinct !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 33, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 34, file: !1, scope: !"_ZTS1A", type: !34, declaration: !33, variables: !2) -!53 = distinct !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 47, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 48, file: !1, scope: !"_ZTS1B", type: !45, declaration: !44, variables: !2) -!54 = distinct !DISubprogram(name: "main", line: 53, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 54, file: !1, scope: !7, type: !55, variables: !2) +!49 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !1, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2) +!50 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2ERKS_", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !1, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2) +!51 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN1AaSERKS_", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 28, file: !1, scope: !"_ZTS1A", type: !26, declaration: !25, variables: !2) +!52 = distinct !DISubprogram(name: "get_int", linkageName: "_ZN1A7get_intEv", line: 33, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 34, file: !1, scope: !"_ZTS1A", type: !34, declaration: !33, variables: !2) +!53 = distinct !DISubprogram(name: "AInstance", linkageName: "_ZN1B9AInstanceEv", line: 47, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 48, file: !1, scope: !"_ZTS1B", type: !45, declaration: !44, variables: !2) +!54 = distinct !DISubprogram(name: "main", line: 53, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 54, file: !1, scope: !7, type: !55, variables: !2) !55 = !DISubroutineType(types: !56) !56 = !{!12, !12, !57} !57 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !58) !58 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !59) !59 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !60) !60 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) -!61 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD0Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2) -!62 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 41, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 41, file: !1, scope: !"_ZTS1B", type: !40, declaration: !39, variables: !2) -!63 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2) +!61 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD0Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2) +!62 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", line: 41, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 41, file: !1, scope: !"_ZTS1B", type: !40, declaration: !39, variables: !2) +!63 = distinct !DISubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !"_ZTS1A", type: !30, declaration: !29, variables: !2) !64 = !{i32 2, !"Dwarf Version", i32 4} !65 = !{i32 1, !"Debug Info Version", i32 3} !66 = !{!"clang version 3.5.0 (trunk 203283) (llvm/trunk 203307)"} Index: test/DebugInfo/X86/sroasplit-1.ll =================================================================== --- test/DebugInfo/X86/sroasplit-1.ll +++ test/DebugInfo/X86/sroasplit-1.ll @@ -65,11 +65,10 @@ !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !3, globals: !{}, imports: !{}) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, globals: !{}, imports: !{}) !1 = !DIFile(filename: "sroasplit-1.c", directory: "") !2 = !DIExpression() -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !{}) +!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !{}) !5 = !DIFile(filename: "sroasplit-1.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/sroasplit-2.ll =================================================================== --- test/DebugInfo/X86/sroasplit-2.ll +++ test/DebugInfo/X86/sroasplit-2.ll @@ -71,11 +71,10 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !3, globals: !{}, imports: !{}) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, globals: !{}, imports: !{}) !1 = !DIFile(filename: "sroasplit-2.c", directory: "") !2 = !DIExpression() -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !{}) +!4 = distinct !DISubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !{}) !5 = !DIFile(filename: "sroasplit-2.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/sroasplit-3.ll =================================================================== --- test/DebugInfo/X86/sroasplit-3.ll +++ test/DebugInfo/X86/sroasplit-3.ll @@ -41,11 +41,10 @@ !llvm.module.flags = !{!12, !13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm/_build.ninja.debug") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm/_build.ninja.debug") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9} Index: test/DebugInfo/X86/sroasplit-4.ll =================================================================== --- test/DebugInfo/X86/sroasplit-4.ll +++ test/DebugInfo/X86/sroasplit-4.ll @@ -109,7 +109,7 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !16, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4, !10} @@ -125,8 +125,7 @@ !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !14 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 10, size: 128, align: 64, offset: 64, file: !5, scope: !"_ZTS1r", baseType: !"_ZTS1p") !15 = !DIDerivedType(tag: DW_TAG_member, name: "y", line: 11, size: 128, align: 64, offset: 192, file: !5, scope: !"_ZTS1r", baseType: !"_ZTS1p") -!16 = !{!17} -!17 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 18, file: !5, scope: !18, type: !19, variables: !2) +!17 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 18, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 18, file: !5, scope: !18, type: !19, variables: !2) !18 = !DIFile(filename: "pr22393.cc", directory: "") !19 = !DISubroutineType(types: !20) !20 = !{!13} Index: test/DebugInfo/X86/sroasplit-5.ll =================================================================== --- test/DebugInfo/X86/sroasplit-5.ll +++ test/DebugInfo/X86/sroasplit-5.ll @@ -66,11 +66,10 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "src_reg_for_float", line: 7, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "src_reg_for_float", line: 7, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "pr22495.c", directory: "") !6 = !DIFile(filename: "pr22495.c", directory: "") !7 = !DISubroutineType(types: !8) Index: test/DebugInfo/X86/stmt-list-multiple-compile-units.ll =================================================================== --- test/DebugInfo/X86/stmt-list-multiple-compile-units.ll +++ test/DebugInfo/X86/stmt-list-multiple-compile-units.ll @@ -81,17 +81,15 @@ !llvm.dbg.cu = !{!0, !10} !llvm.module.flags = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3", isOptimized: false, emissionKind: FullDebug, file: !23, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3", isOptimized: false, emissionKind: FullDebug, file: !23, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "test", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !23, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "test", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !23, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "simple.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 172862)", isOptimized: false, emissionKind: FullDebug, file: !24, enums: !1, retainedTypes: !1, subprograms: !11, globals: !1, imports: !1) -!11 = !{!13} -!13 = distinct !DISubprogram(name: "fn", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !24, scope: !14, type: !7, variables: !1) +!10 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 172862)", isOptimized: false, emissionKind: FullDebug, file: !24, enums: !1, retainedTypes: !1, globals: !1, imports: !1) +!13 = distinct !DISubprogram(name: "fn", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !10, scopeLine: 1, file: !24, scope: !14, type: !7, variables: !1) !14 = !DIFile(filename: "simple2.c", directory: "/private/tmp") !15 = !DILocalVariable(name: "a", line: 2, arg: 1, scope: !5, file: !6, type: !9) !16 = !DILocation(line: 2, scope: !5) Index: test/DebugInfo/X86/stmt-list.ll =================================================================== --- test/DebugInfo/X86/stmt-list.ll +++ test/DebugInfo/X86/stmt-list.ll @@ -14,9 +14,9 @@ !llvm.module.flags = !{!7} !5 = !{!0} -!0 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !6, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 1, file: !6, scope: !1, type: !3) !1 = !DIFile(filename: "test2.c", directory: "/home/espindola/llvm") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !6, enums: !{}, retainedTypes: !{}, subprograms: !5) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !6, enums: !{}, retainedTypes: !{}) !3 = !DISubroutineType(types: !4) !4 = !{null} !6 = !DIFile(filename: "test2.c", directory: "/home/espindola/llvm") Index: test/DebugInfo/X86/stringpool.ll =================================================================== --- test/DebugInfo/X86/stringpool.ll +++ test/DebugInfo/X86/stringpool.ll @@ -6,7 +6,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143009)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143009)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "yyyy", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: i32* @yyyy) Index: test/DebugInfo/X86/struct-loc.ll =================================================================== --- test/DebugInfo/X86/struct-loc.ll +++ test/DebugInfo/X86/struct-loc.ll @@ -14,7 +14,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 152837) (llvm/trunk 152845)", isOptimized: false, emissionKind: FullDebug, file: !11, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 152837) (llvm/trunk 152845)", isOptimized: false, emissionKind: FullDebug, file: !11, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "f", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: %struct.foo* @f) Index: test/DebugInfo/X86/subrange-type.ll =================================================================== --- test/DebugInfo/X86/subrange-type.ll +++ test/DebugInfo/X86/subrange-type.ll @@ -21,10 +21,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 171472) (llvm/trunk 171487)", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 171472) (llvm/trunk 171487)", isOptimized: false, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, globals: !1, imports: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !6, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/DebugInfo/X86/subreg.ll =================================================================== --- test/DebugInfo/X86/subreg.ll +++ test/DebugInfo/X86/subreg.ll @@ -22,9 +22,9 @@ !9 = !{!1} !0 = !DILocalVariable(name: "zzz", line: 3, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !10, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, file: !10, scope: !2, type: !4) !2 = !DIFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/tmpfs/build") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !{}, retainedTypes: !{}, subprograms: !9, imports: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !{}, retainedTypes: !{}, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{null} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "short", size: 16, align: 16, encoding: DW_ATE_signed) Index: test/DebugInfo/X86/subregisters.ll =================================================================== --- test/DebugInfo/X86/subregisters.ll +++ test/DebugInfo/X86/subregisters.ll @@ -83,11 +83,10 @@ !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "subregisters.c", directory: "") !2 = !{} -!3 = !{!4, !17} -!4 = distinct !DISubprogram(name: "doSomething", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !1, scope: !5, type: !6, variables: !14) +!4 = distinct !DISubprogram(name: "doSomething", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !1, scope: !5, type: !6, variables: !14) !5 = !DIFile(filename: "subregisters.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} @@ -100,7 +99,7 @@ !14 = !{!15, !16} !15 = !DILocalVariable(name: "b", line: 10, arg: 1, scope: !4, file: !5, type: !8) !16 = !DILocalVariable(name: "a", line: 12, scope: !4, file: !5, type: !12) -!17 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 17, file: !1, scope: !5, type: !18, variables: !20) +!17 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 17, file: !1, scope: !5, type: !18, variables: !20) !18 = !DISubroutineType(types: !19) !19 = !{!12} !20 = !{!21} Index: test/DebugInfo/X86/template.ll =================================================================== --- test/DebugInfo/X86/template.ll +++ test/DebugInfo/X86/template.ll @@ -89,7 +89,7 @@ !llvm.module.flags = !{!33, !34} !llvm.ident = !{!35} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !30, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !30, imports: !2) !1 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !8} @@ -98,12 +98,11 @@ !6 = !DITemplateTypeParameter(type: !7) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "nested", line: 2, size: 8, align: 8, file: !1, scope: !"_ZTS6y_implIiE", elements: !2, identifier: "_ZTSN6y_implIiE6nestedE") -!9 = !{!10, !14, !28} -!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 3, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2) +!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 3, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2) !11 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo") !12 = !DISubroutineType(types: !13) !13 = !{null} -!14 = distinct !DISubprogram(name: "func<3, &glbl, y_impl, nullptr, 1, 2>", linkageName: "_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !11, type: !15, templateParams: !17, variables: !2) +!14 = distinct !DISubprogram(name: "func<3, &glbl, y_impl, nullptr, 1, 2>", linkageName: "_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !11, type: !15, templateParams: !17, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{!7} !17 = !{!18, !19, !21, !22, !24} @@ -117,7 +116,7 @@ !25 = !{!26, !27} !26 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, type: !7, value: i32 1) !27 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, type: !7, value: i32 2) -!28 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_template.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !11, type: !29, variables: !2) +!28 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_template.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !11, type: !29, variables: !2) !29 = !DISubroutineType(types: !2) !30 = !{!31, !32} !31 = !DIGlobalVariable(name: "glbl", line: 3, isLocal: false, isDefinition: true, scope: null, file: !11, type: !7, variable: i32* @glbl) Index: test/DebugInfo/X86/tls.ll =================================================================== --- test/DebugInfo/X86/tls.ll +++ test/DebugInfo/X86/tls.ll @@ -111,11 +111,10 @@ !llvm.module.flags = !{!15, !16} !llvm.ident = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "-.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !12, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "-.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !12, imports: !2) !1 = !DIFile(filename: "tls.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func<&glbl>", linkageName: "_Z4funcIXadL_Z4glblEEEiv", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, templateParams: !9, variables: !2) +!4 = distinct !DISubprogram(name: "func<&glbl>", linkageName: "_Z4funcIXadL_Z4glblEEEiv", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, templateParams: !9, variables: !2) !5 = !DIFile(filename: "tls.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/type_units_with_addresses.ll =================================================================== --- test/DebugInfo/X86/type_units_with_addresses.ll +++ test/DebugInfo/X86/type_units_with_addresses.ll @@ -112,7 +112,7 @@ !llvm.module.flags = !{!34, !35} !llvm.ident = !{!36} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, splitDebugFilename: "tu.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !2, globals: !27, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, splitDebugFilename: "tu.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !27, imports: !2) !1 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !9, !12, !13, !17, !18, !19, !23, !24} Index: test/DebugInfo/X86/union-const.ll =================================================================== --- test/DebugInfo/X86/union-const.ll +++ test/DebugInfo/X86/union-const.ll @@ -40,11 +40,10 @@ !llvm.module.flags = !{!17, !18, !19} !llvm.ident = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226915) (llvm/trunk 226905)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 226915) (llvm/trunk 226905)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "union.c", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "mfi_aen_setup", line: 5, isLocal: false, isDefinition: true, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !15) +!4 = distinct !DISubprogram(name: "mfi_aen_setup", line: 5, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !15) !5 = !DIFile(filename: "union.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/DebugInfo/X86/union-template.ll =================================================================== --- test/DebugInfo/X86/union-template.ll +++ test/DebugInfo/X86/union-template.ll @@ -29,11 +29,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!28} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 178499) (llvm/trunk 178472)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 178499) (llvm/trunk 178472)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) !1 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "g", linkageName: "_ZN7PR156371gEf", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "g", linkageName: "_ZN7PR156371gEf", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DINamespace(name: "PR15637", line: 1, file: !1, scope: null) !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/DebugInfo/X86/vector.ll =================================================================== --- test/DebugInfo/X86/vector.ll +++ test/DebugInfo/X86/vector.ll @@ -12,7 +12,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 171825) (llvm/trunk 171822)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !1, retainedTypes: !1, subprograms: !1, globals: !3, imports: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 171825) (llvm/trunk 171822)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !1, retainedTypes: !1, globals: !3, imports: !1) !1 = !{} !3 = !{!5} !5 = !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7, variable: <4 x i32>* @a) Index: test/DebugInfo/X86/vla.ll =================================================================== --- test/DebugInfo/X86/vla.ll +++ test/DebugInfo/X86/vla.ll @@ -75,16 +75,15 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "vla.c", directory: "") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "vla", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "vla", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "vla.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !10, variables: !2) +!9 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !10, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!8, !8, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !13) Index: test/DebugInfo/dwo.ll =================================================================== --- test/DebugInfo/dwo.ll +++ test/DebugInfo/dwo.ll @@ -8,7 +8,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, dwoId: 43981) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 43981) !1 = !DIFile(filename: "", directory: "/") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/skeletoncu.ll =================================================================== --- test/DebugInfo/skeletoncu.ll +++ test/DebugInfo/skeletoncu.ll @@ -9,7 +9,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, dwoId: 43981) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 43981) !1 = !DIFile(filename: "", directory: "/") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Instrumentation/AddressSanitizer/debug_info.ll =================================================================== --- test/Instrumentation/AddressSanitizer/debug_info.ll +++ test/Instrumentation/AddressSanitizer/debug_info.ll @@ -33,10 +33,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169314)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169314)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !1, retainedTypes: !1, globals: !1) !1 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "zzz", linkageName: "_Z3zzzi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !16, scope: !6, type: !7, variables: !1) +!5 = distinct !DISubprogram(name: "zzz", linkageName: "_Z3zzzi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !16, scope: !6, type: !7, variables: !1) !6 = !DIFile(filename: "a.cc", directory: "/usr/local/google/llvm_cmake_clang/tmp/debuginfo") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9} Index: test/Instrumentation/DataFlowSanitizer/debug.ll =================================================================== --- test/Instrumentation/DataFlowSanitizer/debug.ll +++ test/Instrumentation/DataFlowSanitizer/debug.ll @@ -22,11 +22,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "debug.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "debug.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/Instrumentation/MemorySanitizer/store-origin.ll =================================================================== --- test/Instrumentation/MemorySanitizer/store-origin.ll +++ test/Instrumentation/MemorySanitizer/store-origin.ll @@ -27,11 +27,10 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (204220)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (204220)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "../2.cc", directory: "/tmp/build0") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "Store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) +!4 = distinct !DISubprogram(name: "Store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) !5 = !DIFile(filename: "../2.cc", directory: "/tmp/build0") !6 = !DISubroutineType(types: !7) !7 = !{null, !8, !9} Index: test/Instrumentation/SanitizerCoverage/coverage-dbg.ll =================================================================== --- test/Instrumentation/SanitizerCoverage/coverage-dbg.ll +++ test/Instrumentation/SanitizerCoverage/coverage-dbg.ll @@ -43,7 +43,7 @@ !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210251)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !12, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210251)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "../1.cc", directory: "/code/llvm/build0") !2 = !{} !3 = !{!4} @@ -55,8 +55,7 @@ !9 = !DISubroutineType(types: !10) !10 = !{!7, !11} !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") -!12 = !{!13} -!13 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !14) +!13 = distinct !DISubprogram(name: "f", linkageName: "_ZN1A1fEv", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !9, declaration: !8, variables: !14) !14 = !{!15} !15 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !13, type: !16) !16 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1A") Index: test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll =================================================================== --- test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll +++ test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll @@ -47,11 +47,10 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (217079)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (217079)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "if.cc", directory: "FOO") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPi", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !10) !5 = !DIFile(filename: "if.cc", directory: "FOO") !6 = !DISubroutineType(types: !7) !7 = !{null, !8} Index: test/Instrumentation/ThreadSanitizer/atomic.ll =================================================================== --- test/Instrumentation/ThreadSanitizer/atomic.ll +++ test/Instrumentation/ThreadSanitizer/atomic.ll @@ -2030,11 +2030,10 @@ !3 = !{} !4 = !DISubroutineType(types: !3) !5 = !DIFile(filename: "atomic.cpp", directory: "/tmp") -!6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !3) +!6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, unit: !8, variables: !3) !7 = !DILocation(line: 100, column: 1, scope: !6) !8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !5, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!6}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/JitListener/multiple.ll =================================================================== --- test/JitListener/multiple.ll +++ test/JitListener/multiple.ll @@ -125,17 +125,16 @@ !llvm.module.flags = !{!11, !12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "multiple.c", directory: "F:\5Cusers\5Cakaylor\5Cllvm-s\5Cllvm\5Ctest\5CJitListener") !2 = !{} -!3 = !{!4, !9, !10} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "multiple.c", directory: "F:CusersCakaylorCllvm-sCllvmCtestCJitListener") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) -!10 = distinct !DISubprogram(name: "fubar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!10 = distinct !DISubprogram(name: "fubar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 12, file: !1, scope: !5, type: !6, variables: !2) !11 = !{i32 2, !"Dwarf Version", i32 4} !12 = !{i32 2, !"Debug Info Version", i32 3} !13 = !{i32 1, !"PIC Level", i32 2} Index: test/JitListener/simple.ll =================================================================== --- test/JitListener/simple.ll +++ test/JitListener/simple.ll @@ -35,11 +35,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "simple.c", directory: "F:\5Cusers\5Cakaylor\5Cllvm-s\5Cllvm\5Ctest\5CJitListener") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "simple.c", directory: "F:CusersCakaylorCllvm-sCllvmCtestCJitListener") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} Index: test/Linker/2009-09-03-mdnode.ll =================================================================== --- test/Linker/2009-09-03-mdnode.ll +++ test/Linker/2009-09-03-mdnode.ll @@ -28,6 +28,6 @@ !llvm.dbg.cu = !{!1} -!0 = distinct !DISubprogram(name: "main", linkageName: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1) +!0 = distinct !DISubprogram(name: "main", linkageName: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1) !1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "ellcc 0.1.0", isOptimized: true, emissionKind: FullDebug, file: !2) !2 = !DIFile(filename: "a.c", directory: "/home/rich/ellcc/test/source") Index: test/Linker/2009-09-03-mdnode2.ll =================================================================== --- test/Linker/2009-09-03-mdnode2.ll +++ test/Linker/2009-09-03-mdnode2.ll @@ -23,6 +23,6 @@ !llvm.dbg.cu = !{!1} -!0 = distinct !DISubprogram(name: "f", linkageName: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1) +!0 = distinct !DISubprogram(name: "f", linkageName: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1) !1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "ellcc 0.1.0", isOptimized: true, emissionKind: FullDebug, file: !2) !2 = !DIFile(filename: "b.c", directory: "/home/rich/ellcc/test/source") Index: test/Linker/2011-08-04-DebugLoc.ll =================================================================== --- test/Linker/2011-08-04-DebugLoc.ll +++ test/Linker/2011-08-04-DebugLoc.ll @@ -16,8 +16,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-209.11) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9, subprograms: !10) -!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-209.11) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9) +!1 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !8, scope: !2, type: !3) !2 = !DIFile(filename: "a.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -26,5 +26,4 @@ !7 = distinct !DILexicalBlock(line: 2, column: 11, file: !8, scope: !1) !8 = !DIFile(filename: "a.c", directory: "/private/tmp") !9 = !{} -!10 = !{!1} !11 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Linker/2011-08-04-DebugLoc2.ll =================================================================== --- test/Linker/2011-08-04-DebugLoc2.ll +++ test/Linker/2011-08-04-DebugLoc2.ll @@ -13,8 +13,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-209.11) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9, subprograms: !10) -!1 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-209.11) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !9, retainedTypes: !9) +!1 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !8, scope: !2, type: !3) !2 = !DIFile(filename: "b.c", directory: "/private/tmp") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -23,5 +23,4 @@ !7 = distinct !DILexicalBlock(line: 1, column: 11, file: !8, scope: !1) !8 = !DIFile(filename: "b.c", directory: "/private/tmp") !9 = !{} -!10 = !{!1} !11 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Linker/2011-08-04-Metadata.ll =================================================================== --- test/Linker/2011-08-04-Metadata.ll +++ test/Linker/2011-08-04-Metadata.ll @@ -22,8 +22,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !{}, retainedTypes: !{}, subprograms: !10, globals: !{!5}) -!1 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !{}, retainedTypes: !{}, globals: !{!5}) +!1 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !9, scope: !2, type: !3) !2 = !DIFile(filename: "/tmp/one.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} @@ -32,5 +32,4 @@ !7 = !DILocation(line: 3, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 3, column: 12, file: !9, scope: !1) !9 = !DIFile(filename: "/tmp/one.c", directory: "/Volumes/Lalgate/Slate/D") -!10 = !{!1} !11 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Linker/2011-08-04-Metadata2.ll =================================================================== --- test/Linker/2011-08-04-Metadata2.ll +++ test/Linker/2011-08-04-Metadata2.ll @@ -17,8 +17,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !{}, retainedTypes: !{}, subprograms: !10, globals: !{!5}) -!1 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: FullDebug, file: !9, enums: !{}, retainedTypes: !{}, globals: !{!5}) +!1 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !9, scope: !2, type: !3) !2 = !DIFile(filename: "/tmp/two.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} @@ -27,5 +27,4 @@ !7 = !DILocation(line: 2, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 2, column: 12, file: !9, scope: !1) !9 = !DIFile(filename: "/tmp/two.c", directory: "/Volumes/Lalgate/Slate/D") -!10 = !{!1} !11 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Linker/2011-08-18-unique-class-type.ll =================================================================== --- test/Linker/2011-08-18-unique-class-type.ll +++ test/Linker/2011-08-18-unique-class-type.ll @@ -20,11 +20,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !2, retainedTypes: !2, globals: !2) !1 = !{!2} !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !16, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !16, scope: !6, type: !7) !6 = !DIFile(filename: "n1.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null} Index: test/Linker/2011-08-18-unique-class-type2.ll =================================================================== --- test/Linker/2011-08-18-unique-class-type2.ll +++ test/Linker/2011-08-18-unique-class-type2.ll @@ -18,11 +18,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !16, enums: !2, retainedTypes: !2, globals: !2) !1 = !{!2} !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scope: !6, type: !7) !6 = !DIFile(filename: "n2.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null} Index: test/Linker/2011-08-18-unique-debug-type.ll =================================================================== --- test/Linker/2011-08-18-unique-debug-type.ll +++ test/Linker/2011-08-18-unique-debug-type.ll @@ -12,11 +12,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !2, retainedTypes: !2, globals: !2) !1 = !{!2} !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !12, scope: !6, type: !7) !6 = !DIFile(filename: "one.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/Linker/2011-08-18-unique-debug-type2.ll =================================================================== --- test/Linker/2011-08-18-unique-debug-type2.ll +++ test/Linker/2011-08-18-unique-debug-type2.ll @@ -12,11 +12,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !2, retainedTypes: !2, globals: !2) !1 = !{!2} !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: !6, type: !7) +!5 = distinct !DISubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !12, scope: !6, type: !7) !6 = !DIFile(filename: "two.c", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9} Index: test/Linker/DbgDeclare.ll =================================================================== --- test/Linker/DbgDeclare.ll +++ test/Linker/DbgDeclare.ll @@ -37,10 +37,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !20, scope: null, type: !7, variables: !2) +!5 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !20, scope: null, type: !7, variables: !2) !6 = !DIFile(filename: "main.cpp", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{!9, !9, !10} Index: test/Linker/DbgDeclare2.ll =================================================================== --- test/Linker/DbgDeclare2.ll +++ test/Linker/DbgDeclare2.ll @@ -50,10 +50,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!27} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !2, retainedTypes: !2, globals: !2) !2 = !{} -!3 = !{!5} -!5 = distinct !DISubprogram(name: "print_args", linkageName: "test", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !26, scope: null, type: !7, variables: !2) +!5 = distinct !DISubprogram(name: "print_args", linkageName: "test", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !26, scope: null, type: !7, variables: !2) !6 = !DIFile(filename: "test.cpp", directory: "/private/tmp") !7 = !DISubroutineType(types: !8) !8 = !{null, !9, !10} Index: test/Linker/Inputs/mdlocation.ll =================================================================== --- test/Linker/Inputs/mdlocation.ll +++ test/Linker/Inputs/mdlocation.ll @@ -4,7 +4,7 @@ !named = !{!1, !2, !3, !4, !5} -!0 = distinct !DISubprogram(file: !7, scope: !7, line: 1, name: "foo", type: !9) +!0 = distinct !DISubprogram(file: !7, scope: !7, line: 1, name: "foo", type: !9, unit: !6) !1 = !DILocation(line: 3, column: 7, scope: !10) !2 = !DILocation(line: 3, column: 7, scope: !10, inlinedAt: !1) @@ -14,7 +14,7 @@ !5 = distinct !DILocation(line: 3, column: 7, scope: !10, inlinedAt: !4) !llvm.dbg.cu = !{!6} -!6 = distinct !DICompileUnit(language: DW_LANG_C89, file: !7, subprograms: !{!0}) +!6 = distinct !DICompileUnit(language: DW_LANG_C89, file: !7) !7 = !DIFile(filename: "source.c", directory: "/dir") !llvm.module.flags = !{!8} Index: test/Linker/Inputs/only-needed-debug-metadata.ll =================================================================== --- test/Linker/Inputs/only-needed-debug-metadata.ll +++ test/Linker/Inputs/only-needed-debug-metadata.ll @@ -12,11 +12,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "linkused.b.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Linker/Inputs/pr26037.ll =================================================================== --- test/Linker/Inputs/pr26037.ll +++ test/Linker/Inputs/pr26037.ll @@ -9,11 +9,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "main.cc", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Linker/Inputs/replaced-function-matches-first-subprogram.ll =================================================================== --- test/Linker/Inputs/replaced-function-matches-first-subprogram.ll +++ test/Linker/Inputs/replaced-function-matches-first-subprogram.ll @@ -12,11 +12,10 @@ !llvm.module.flags = !{!8, !9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "t2.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") !6 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") !7 = !DISubroutineType(types: !2) Index: test/Linker/Inputs/subprogram-linkonce-weak.ll =================================================================== --- test/Linker/Inputs/subprogram-linkonce-weak.ll +++ test/Linker/Inputs/subprogram-linkonce-weak.ll @@ -10,7 +10,7 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !llvm.dbg.cu = !{!1} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3}, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, emissionKind: FullDebug) !2 = !DIFile(filename: "foo.c", directory: "/path/to/dir") -!3 = distinct !DISubprogram(file: !2, scope: !2, line: 51, name: "foo", type: !4) +!3 = distinct !DISubprogram(file: !2, scope: !2, line: 51, name: "foo", type: !4, unit: !1) !4 = !DISubroutineType(types: !{}) Index: test/Linker/Inputs/thinlto_funcimport_debug.ll =================================================================== --- test/Linker/Inputs/thinlto_funcimport_debug.ll +++ test/Linker/Inputs/thinlto_funcimport_debug.ll @@ -22,11 +22,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "dbg_main.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Linker/Inputs/type-unique-inheritance-a.ll =================================================================== --- test/Linker/Inputs/type-unique-inheritance-a.ll +++ test/Linker/Inputs/type-unique-inheritance-a.ll @@ -66,7 +66,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!19, !25} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher") !2 = !{} !3 = !{!4, !8} @@ -80,8 +80,7 @@ !11 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !9, scope: !"_ZTS4Base", baseType: !12) !12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !13 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS1A", baseType: !12) -!14 = !{!15} -!15 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !16, type: !17, variables: !2) +!15 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !16, type: !17, variables: !2) !16 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher") !17 = !DISubroutineType(types: !18) !18 = !{null, !12} Index: test/Linker/Inputs/type-unique-inheritance-b.ll =================================================================== --- test/Linker/Inputs/type-unique-inheritance-b.ll +++ test/Linker/Inputs/type-unique-inheritance-b.ll @@ -40,7 +40,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!27, !38} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !19, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher") !2 = !{} !3 = !{!4, !11, !15} @@ -59,12 +59,11 @@ !16 = !{!17} !17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !"_ZTS4Base", baseType: !8) !18 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !12, scope: !"_ZTS1A", baseType: !8) -!19 = !{!20, !24} -!20 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !21, type: !22, variables: !2) +!20 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !21, type: !22, variables: !2) !21 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher") !22 = !DISubroutineType(types: !23) !23 = !{null, !8} -!24 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !21, type: !25, variables: !2) +!24 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !1, scope: !21, type: !25, variables: !2) !25 = !DISubroutineType(types: !26) !26 = !{!8} !27 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Linker/Inputs/type-unique-simple2-a.ll =================================================================== --- test/Linker/Inputs/type-unique-simple2-a.ll +++ test/Linker/Inputs/type-unique-simple2-a.ll @@ -63,7 +63,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!16, !22} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git 8a3f9e46cb988d2c664395b21910091e3730ae82) (http://llvm.org/git/llvm.git 4699e9549358bc77824a59114548eecc3f7c523c)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !11, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git 8a3f9e46cb988d2c664395b21910091e3730ae82) (http://llvm.org/git/llvm.git 4699e9549358bc77824a59114548eecc3f7c523c)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.cpp", directory: ".") !2 = !{} !3 = !{!4} @@ -74,8 +74,7 @@ !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS4Base", baseType: !10) !10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4Base") -!11 = !{!12} -!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !2) +!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !2) !13 = !DIFile(filename: "foo.cpp", directory: ".") !14 = !DISubroutineType(types: !15) !15 = !{null, !8} Index: test/Linker/Inputs/type-unique-simple2-b.ll =================================================================== --- test/Linker/Inputs/type-unique-simple2-b.ll +++ test/Linker/Inputs/type-unique-simple2-b.ll @@ -36,7 +36,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!19, !28} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git 8a3f9e46cb988d2c664395b21910091e3730ae82) (http://llvm.org/git/llvm.git 4699e9549358bc77824a59114548eecc3f7c523c)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !11, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git 8a3f9e46cb988d2c664395b21910091e3730ae82) (http://llvm.org/git/llvm.git 4699e9549358bc77824a59114548eecc3f7c523c)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "bar.cpp", directory: ".") !2 = !{} !3 = !{!4} @@ -47,12 +47,11 @@ !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !"_ZTS4Base", baseType: !10) !10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS4Base") -!11 = !{!12, !16} -!12 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !13, type: !14, variables: !2) +!12 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !13, type: !14, variables: !2) !13 = !DIFile(filename: "bar.cpp", directory: ".") !14 = !DISubroutineType(types: !15) !15 = !{null, !8} -!16 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !13, type: !17, variables: !2) +!16 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !13, type: !17, variables: !2) !17 = !DISubroutineType(types: !18) !18 = !{!8} !19 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Linker/debug-info-version-a.ll =================================================================== --- test/Linker/debug-info-version-a.ll +++ test/Linker/debug-info-version-a.ll @@ -11,6 +11,6 @@ !llvm.dbg.cu = !{!1} !0 = !{i32 2, !"Debug Info Version", i32 3} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, subprograms: !3) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3) !2 = !DIFile(filename: "a.c", directory: "") !3 = !{} Index: test/Linker/mdlocation.ll =================================================================== --- test/Linker/mdlocation.ll +++ test/Linker/mdlocation.ll @@ -6,22 +6,22 @@ ret void, !dbg !3 } -; CHECK: !named = !{!0, !6, !7, !8, !9, !10, !13, !14, !15, !16} +; CHECK: !named = !{!0, !7, !8, !9, !10, !11, !15, !16, !17, !18} !named = !{!1, !2, !3, !4, !5} ; CHECK: !0 = !DILocation(line: 3, column: 7, scope: !1) ; CHECK: !3 = distinct !DISubprogram( -; CHECK: !6 = !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !0) -; CHECK: !7 = !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !6) -; CHECK: !8 = distinct !DILocation(line: 3, column: 7, scope: !1) -; CHECK: !9 = distinct !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !8) -; CHECK: !10 = !DILocation(line: 3, column: 7, scope: !11) -; CHECK: !12 = distinct !DISubprogram( -; CHECK: !13 = !DILocation(line: 3, column: 7, scope: !11, inlinedAt: !10) -; CHECK: !14 = !DILocation(line: 3, column: 7, scope: !11, inlinedAt: !13) -; CHECK: !15 = distinct !DILocation(line: 3, column: 7, scope: !11) -; CHECK: !16 = distinct !DILocation(line: 3, column: 7, scope: !11, inlinedAt: !15) -!0 = distinct !DISubprogram(file: !7, scope: !7, line: 1, name: "foo", type: !9) +; CHECK: !7 = !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !0) +; CHECK: !8 = !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !7) +; CHECK: !9 = distinct !DILocation(line: 3, column: 7, scope: !1) +; CHECK: !10 = distinct !DILocation(line: 3, column: 7, scope: !1, inlinedAt: !9) +; CHECK: !11 = !DILocation(line: 3, column: 7, scope: !12) +; CHECK: !13 = distinct !DISubprogram( +; CHECK: !15 = !DILocation(line: 3, column: 7, scope: !12, inlinedAt: !11) +; CHECK: !16 = !DILocation(line: 3, column: 7, scope: !12, inlinedAt: !15) +; CHECK: !17 = distinct !DILocation(line: 3, column: 7, scope: !12) +; CHECK: !18 = distinct !DILocation(line: 3, column: 7, scope: !12, inlinedAt: !17) +!0 = distinct !DISubprogram(file: !7, scope: !7, line: 1, name: "foo", type: !9, unit: !6) !1 = !DILocation(line: 3, column: 7, scope: !10) !2 = !DILocation(line: 3, column: 7, scope: !10, inlinedAt: !1) !3 = !DILocation(line: 3, column: 7, scope: !10, inlinedAt: !2) @@ -30,7 +30,7 @@ !5 = distinct !DILocation(line: 3, column: 7, scope: !10, inlinedAt: !4) !llvm.dbg.cu = !{!6} -!6 = distinct !DICompileUnit(language: DW_LANG_C89, file: !7, subprograms: !{!0}) +!6 = distinct !DICompileUnit(language: DW_LANG_C89, file: !7) !7 = !DIFile(filename: "source.c", directory: "/dir") !llvm.module.flags = !{!8} Index: test/Linker/only-needed-debug-metadata.ll =================================================================== --- test/Linker/only-needed-debug-metadata.ll +++ test/Linker/only-needed-debug-metadata.ll @@ -25,17 +25,16 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, globals: !13) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !13) !1 = !DIFile(filename: "linkused2.c", directory: "/usr/local/google/home/tejohnson/llvm/tmp") !2 = !{} -!3 = !{!4, !10} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !{!9} !9 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1, line: 4, type: !7) -!10 = distinct !DISubprogram(name: "unused", scope: !1, file: !1, line: 8, type: !11, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, variables: !2) +!10 = distinct !DISubprogram(name: "unused", scope: !1, file: !1, line: 8, type: !11, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !0, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!7} !13 = !{!14, !15} Index: test/Linker/pr26037.ll =================================================================== --- test/Linker/pr26037.ll +++ test/Linker/pr26037.ll @@ -2,14 +2,14 @@ ; RUN: llvm-as %p/Inputs/pr26037.ll -o %t2.bc ; RUN: llvm-link -S -only-needed %t2.bc %t.bc | FileCheck %s -; CHECK: [[A:![0-9]+]] = distinct !DISubprogram(name: "a" -; CHECK: [[B:![0-9]+]] = distinct !DISubprogram(name: "b" -; CHECK: [[C:![0-9]+]] = distinct !DISubprogram(name: "c" -; CHECK: [[D:![0-9]+]] = distinct !DISubprogram(name: "d" -; CHECK: !DIImportedEntity({{.*}}, scope: [[B]], entity: [[A]] -; CHECK: !DIImportedEntity({{.*}}, scope: [[LBC:![0-9]+]], entity: [[LBD:![0-9]+]] -; CHECK: [[LBC]] = distinct !DILexicalBlock(scope: [[C]] -; CHECK: [[LBD]] = distinct !DILexicalBlock(scope: [[D]] +; CHECK: !DIImportedEntity({{.*}}, scope: ![[B:[0-9]+]], entity: ![[A:[0-9]+]] +; CHECK: ![[B]] = distinct !DISubprogram(name: "b" +; CHECK: ![[A]] = distinct !DISubprogram(name: "a" +; CHECK: !DIImportedEntity({{.*}}, scope: ![[LBC:[0-9]+]], entity: ![[LBD:[0-9]+]] +; CHECK: ![[LBC]] = distinct !DILexicalBlock(scope: ![[C:[0-9]+]] +; CHECK: ![[C]] = distinct !DISubprogram(name: "c" +; CHECK: ![[LBD]] = distinct !DILexicalBlock(scope: ![[D:[0-9]+]] +; CHECK: ![[D]] = distinct !DISubprogram(name: "d" define void @_ZN1A1aEv() #0 !dbg !4 { entry: @@ -35,15 +35,14 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3, imports: !9) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !9) !1 = !DIFile(filename: "a2.cc", directory: "") !2 = !{} -!3 = !{!4, !8, !18, !20} -!4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DINamespace(name: "A", scope: null, file: !1, line: 1) !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !{!10, !16} !10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !4, line: 8) !11 = !{i32 2, !"Dwarf Version", i32 4} @@ -53,8 +52,8 @@ !15 = !DILocation(line: 8, column: 24, scope: !8) !16 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !17, entity: !19, line: 8) !17 = distinct !DILexicalBlock(scope: !18, file: !1, line: 9, column: 8) -!18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !19 = distinct !DILexicalBlock(scope: !20, file: !1, line: 10, column: 8) -!20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !21 = !DILocation(line: 9, column: 8, scope: !18) !22 = !DILocation(line: 10, column: 8, scope: !20) Index: test/Linker/replaced-function-matches-first-subprogram.ll =================================================================== --- test/Linker/replaced-function-matches-first-subprogram.ll +++ test/Linker/replaced-function-matches-first-subprogram.ll @@ -40,28 +40,22 @@ !llvm.ident = !{!13} ; Extract out the list of subprograms from each compile unit. -; CHECK-DAG: ![[CU1]] = distinct !DICompileUnit({{.*}} subprograms: ![[SPs1:[0-9]+]] -; CHECK-DAG: ![[CU2]] = distinct !DICompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]] -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +; CHECK: ![[CU1:[0-9]+]] = distinct !DICompileUnit( +; CHECK: ![[CU2:[0-9]+]] = distinct !DICompileUnit( +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") !2 = !{} - -; Extract out each compile unit's single subprogram. The replaced subprogram's -; function should drop to null in the first compile unit. -; CHECK-DAG: ![[SPs1]] = !{![[SP1]], ![[SP2r:[0-9]+]]} -; CHECK-DAG: ![[SPs2]] = !{![[SP2]]} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") !6 = !DISubroutineType(types: !2) ; Extract out the file from the replaced subprogram. -; CHECK-DAG: ![[SP2]] = distinct !DISubprogram({{.*}} file: ![[FILE:[0-9]+]], +; CHECK-DAG: ![[SP2:.*]] = distinct !DISubprogram({{.*}} file: ![[FILE:[0-9]+]],{{.*}}, unit: ![[CU2]] ; We can't use CHECK-NOT/CHECK-SAME with a CHECK-DAG, so rely on field order to ; prove that there's no function: here. -; CHECK-DAG: ![[SP2r]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, variables: -!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !8, scope: !9, type: !6, variables: !2) +; CHECK-DAG: ![[SP2r:.*]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, unit: ![[CU1]], variables: +!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !8, scope: !9, type: !6, variables: !2) ; The new subprogram should be pointing at the new directory. ; CHECK-DAG: ![[FILE]] = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") Index: test/Linker/subprogram-linkonce-weak.ll =================================================================== --- test/Linker/subprogram-linkonce-weak.ll +++ test/Linker/subprogram-linkonce-weak.ll @@ -53,37 +53,33 @@ ; WL-SAME: !{![[WCU:[0-9]+]], ![[LCU:[0-9]+]]} !llvm.dbg.cu = !{!1} -; LW: ![[LCU]] = distinct !DICompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] -; LW: ![[LSPs]] = !{![[BARSP]], ![[FOOSP:[0-9]+]]} -; LW: ![[BARSP]] = distinct !DISubprogram(name: "bar", -; LW: ![[FOOSP]] = distinct !DISubprogram(name: "foo", -; LW: ![[WCU]] = distinct !DICompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] -; LW: ![[WSPs]] = !{![[WEAKFOOSP]]} -; LW: ![[WEAKFOOSP]] = distinct !DISubprogram(name: "foo", -; LW: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) +; LW: ![[LCU]] = distinct !DICompileUnit( +; LW: ![[WCU]] = distinct !DICompileUnit( +; LW: ![[BARSP]] = distinct !DISubprogram(name: "bar",{{.*}} unit: ![[LCU]] +; LW: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP:.*]], inlinedAt: ![[BARIA:[0-9]+]]) +; LW: ![[FOOSP]] = distinct !DISubprogram(name: "foo",{{.*}} unit: ![[LCU]] ; LW: ![[BARIA]] = !DILocation(line: 12, scope: ![[BARSP]]) ; LW: ![[BARRET]] = !DILocation(line: 13, scope: ![[BARSP]]) +; LW: ![[WEAKFOOSP]] = distinct !DISubprogram(name: "foo",{{.*}} unit: ![[WCU]] ; LW: ![[FOOCALL]] = !DILocation(line: 52, scope: ![[WEAKFOOSP]]) ; LW: ![[FOORET]] = !DILocation(line: 53, scope: ![[WEAKFOOSP]]) ; Same as above, but reordered. -; WL: ![[WCU]] = distinct !DICompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] -; WL: ![[WSPs]] = !{![[WEAKFOOSP]]} -; WL: ![[WEAKFOOSP]] = distinct !DISubprogram(name: "foo", -; WL: ![[LCU]] = distinct !DICompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] -; WL: ![[LSPs]] = !{![[BARSP:[0-9]+]], ![[FOOSP:[0-9]+]]} -; WL: ![[BARSP]] = distinct !DISubprogram(name: "bar", -; WL: ![[FOOSP]] = distinct !DISubprogram(name: "foo", +; WL: ![[WCU]] = distinct !DICompileUnit( +; WL: ![[LCU]] = distinct !DICompileUnit( +; WL: ![[WEAKFOOSP]] = distinct !DISubprogram(name: "foo",{{.*}} unit: ![[WCU]] ; WL: ![[FOOCALL]] = !DILocation(line: 52, scope: ![[WEAKFOOSP]]) ; WL: ![[FOORET]] = !DILocation(line: 53, scope: ![[WEAKFOOSP]]) -; WL: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) +; WL: ![[BARSP]] = distinct !DISubprogram(name: "bar",{{.*}} unit: ![[LCU]] +; WL: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP:.*]], inlinedAt: ![[BARIA:[0-9]+]]) +; WL: ![[FOOSP]] = distinct !DISubprogram(name: "foo",{{.*}} unit: ![[LCU]] ; WL: ![[BARIA]] = !DILocation(line: 12, scope: ![[BARSP]]) ; WL: ![[BARRET]] = !DILocation(line: 13, scope: ![[BARSP]]) -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3, !4}, emissionKind: FullDebug) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, emissionKind: FullDebug) !2 = !DIFile(filename: "bar.c", directory: "/path/to/dir") -!3 = distinct !DISubprogram(file: !2, scope: !2, line: 11, name: "bar", type: !5) -!4 = distinct !DISubprogram(file: !2, scope: !2, line: 1, name: "foo", type: !5) +!3 = distinct !DISubprogram(file: !2, scope: !2, line: 11, name: "bar", type: !5, unit: !1) +!4 = distinct !DISubprogram(file: !2, scope: !2, line: 1, name: "foo", type: !5, unit: !1) !5 = !DISubroutineType(types: !{}) ; Crasher for llc. Index: test/Linker/thinlto_funcimport_debug.ll =================================================================== --- test/Linker/thinlto_funcimport_debug.ll +++ test/Linker/thinlto_funcimport_debug.ll @@ -9,17 +9,15 @@ ; CHECK: declare i32 @func2 ; CHECK: define available_externally i32 @func1 -; Extract out the list of subprograms from each compile unit and ensure -; that neither contains null. -; CHECK: !{{[0-9]+}} = distinct !DICompileUnit({{.*}} subprograms: ![[SPs1:[0-9]+]] -; CHECK-NOT: ![[SPs1]] = !{{{.*}}null{{.*}}} -; CHECK: !{{[0-9]+}} = distinct !DICompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]] -; CHECK-NOT: ![[SPs2]] = !{{{.*}}null{{.*}}} +; Ensure that each subprogram points to the correct CU. +; CHECK: ![[CU1:[0-9]+]] = distinct !DICompileUnit( +; CHECK: ![[CU2:[0-9]+]] = distinct !DICompileUnit( -; CHECK: distinct !DISubprogram(name: "func1" +; CHECK: distinct !DISubprogram(name: "main", {{.*}}, unit: ![[CU1]] +; CHECK: distinct !DISubprogram(name: "func1", {{.*}}, unit: ![[CU2]] ; CHECK-NOT: distinct !DISubprogram(name: "func2" -; CHECK: distinct !DISubprogram(name: "func3" -; CHECK: distinct !DISubprogram(name: "func4" +; CHECK: distinct !DISubprogram(name: "func3", {{.*}}, unit: ![[CU2]] +; CHECK: distinct !DISubprogram(name: "func4", {{.*}}, unit: ![[CU2]] ; ModuleID = 'dbg.o' @@ -54,18 +52,17 @@ !llvm.module.flags = !{!14, !15} !llvm.ident = !{!16} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "dbg.c", directory: ".") !2 = !{} -!3 = !{!4, !11, !27, !30} -!4 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !{!9, !10} !9 = !DILocalVariable(name: "n", arg: 1, scope: !4, file: !1, line: 1, type: !7) !10 = !DILocalVariable(name: "x", scope: !4, file: !1, line: 2, type: !7) -!11 = distinct !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !12) +!11 = distinct !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !12) !12 = !{!13} !13 = !DILocalVariable(name: "n", arg: 1, scope: !11, file: !1, line: 8, type: !7) !14 = !{i32 2, !"Dwarf Version", i32 4} @@ -81,10 +78,10 @@ !24 = !DILocation(line: 8, column: 15, scope: !11) !25 = !DILocation(line: 9, column: 3, scope: !11) !26 = !DILocation(line: 9, column: 3, scope: !4) -!27 = distinct !DISubprogram(name: "func3", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !28) +!27 = distinct !DISubprogram(name: "func3", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !28) !28 = !{!29} !29 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7) -!30 = distinct !DISubprogram(name: "func4", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, variables: !31) +!30 = distinct !DISubprogram(name: "func4", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !31) !31 = !{!32} !32 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7) Index: test/Linker/type-unique-odr-a.ll =================================================================== --- test/Linker/type-unique-odr-a.ll +++ test/Linker/type-unique-odr-a.ll @@ -73,7 +73,7 @@ !llvm.module.flags = !{!20, !21} !llvm.ident = !{!22} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4} @@ -86,12 +86,11 @@ !10 = !DISubroutineType(types: !11) !11 = !{null, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") -!14 = !{!15, !19} -!15 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !16, type: !17, variables: !2) +!15 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !17, variables: !2) !16 = !DIFile(filename: "type-unique-odr-a.cpp", directory: "") !17 = !DISubroutineType(types: !18) !18 = !{null} -!19 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !5, scope: !16, type: !17, variables: !2) +!19 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !16, type: !17, variables: !2) !20 = !{i32 2, !"Dwarf Version", i32 4} !21 = !{i32 1, !"Debug Info Version", i32 3} !22 = !{!"clang version 3.5.0 "} Index: test/Linker/type-unique-odr-b.ll =================================================================== --- test/Linker/type-unique-odr-b.ll +++ test/Linker/type-unique-odr-b.ll @@ -54,7 +54,7 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4} @@ -67,13 +67,12 @@ !10 = !DISubroutineType(types: !11) !11 = !{null, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") -!14 = !{!15, !16, !20} -!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !5, scope: !"_ZTS1A", type: !10, declaration: !9, variables: !2) -!16 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !17, type: !18, variables: !2) +!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !5, scope: !"_ZTS1A", type: !10, declaration: !9, variables: !2) +!16 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !17, type: !18, variables: !2) !17 = !DIFile(filename: "type-unique-odr-b.cpp", directory: "") !18 = !DISubroutineType(types: !19) !19 = !{null} -!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 10, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !5, scope: !17, type: !18, variables: !2) +!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 10, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !5, scope: !17, type: !18, variables: !2) !21 = !{i32 2, !"Dwarf Version", i32 4} !22 = !{i32 1, !"Debug Info Version", i32 3} !23 = !{!"clang version 3.5.0 "} Index: test/Linker/type-unique-simple-a.ll =================================================================== --- test/Linker/type-unique-simple-a.ll +++ test/Linker/type-unique-simple-a.ll @@ -68,7 +68,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14, !20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git c23b1db6268c8e7ce64026d57d1510c1aac200a0) (http://llvm.org/git/llvm.git 09b98fe3978eddefc2145adc1056cf21580ce945)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git c23b1db6268c8e7ce64026d57d1510c1aac200a0) (http://llvm.org/git/llvm.git 09b98fe3978eddefc2145adc1056cf21580ce945)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple") !2 = !{} !3 = !{!4} @@ -77,8 +77,7 @@ !6 = !{!7} !7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10} -!10 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2) +!10 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2) !11 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple") !12 = !DISubroutineType(types: !13) !13 = !{null, !8} Index: test/Linker/type-unique-simple-b.ll =================================================================== --- test/Linker/type-unique-simple-b.ll +++ test/Linker/type-unique-simple-b.ll @@ -38,7 +38,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17, !26} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git c23b1db6268c8e7ce64026d57d1510c1aac200a0) (http://llvm.org/git/llvm.git 09b98fe3978eddefc2145adc1056cf21580ce945)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git c23b1db6268c8e7ce64026d57d1510c1aac200a0) (http://llvm.org/git/llvm.git 09b98fe3978eddefc2145adc1056cf21580ce945)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple") !2 = !{} !3 = !{!4} @@ -47,12 +47,11 @@ !6 = !{!7} !7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10, !14} -!10 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !11, type: !12, variables: !2) +!10 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !11, type: !12, variables: !2) !11 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple") !12 = !DISubroutineType(types: !13) !13 = !{null, !8} -!14 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !11, type: !15, variables: !2) +!14 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !11, type: !15, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{!8} !17 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Linker/type-unique-simple2-a.ll =================================================================== --- test/Linker/type-unique-simple2-a.ll +++ test/Linker/type-unique-simple2-a.ll @@ -81,7 +81,7 @@ !llvm.module.flags = !{!35, !36} !llvm.ident = !{!37} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !26, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4} @@ -105,14 +105,13 @@ !22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23) !23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !24, baseType: !13) !24 = !DIFile(filename: "a.cpp", directory: "") -!26 = !{!27, !31, !34} -!27 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !24, scope: !28, type: !29, variables: !2) +!27 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !24, scope: !28, type: !29, variables: !2) !28 = !DIFile(filename: "a.cpp", directory: "") !29 = !DISubroutineType(types: !30) !30 = !{!23} -!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2) +!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2) !32 = !DISubprogram(name: "A", isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !"_ZTS1A", type: !15) -!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2) +!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !"_ZTS1A", type: !15, declaration: !32, variables: !2) !35 = !{i32 2, !"Dwarf Version", i32 2} !36 = !{i32 1, !"Debug Info Version", i32 3} !37 = !{!"clang version 3.5 "} Index: test/Linker/type-unique-simple2-b.ll =================================================================== --- test/Linker/type-unique-simple2-b.ll +++ test/Linker/type-unique-simple2-b.ll @@ -47,7 +47,7 @@ !llvm.module.flags = !{!29, !30} !llvm.ident = !{!31} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !25, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4} @@ -70,10 +70,9 @@ !21 = !{!22, !17} !22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23) !23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !5, baseType: !13) -!25 = !{!26, !28} -!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !27, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2) +!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !"_ZTS1A", type: !15, declaration: !14, variables: !2) !27 = !DIFile(filename: "b.cpp", directory: "") -!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !27, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2) +!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !"_ZTS1A", type: !20, declaration: !19, variables: !2) !29 = !{i32 2, !"Dwarf Version", i32 2} !30 = !{i32 1, !"Debug Info Version", i32 3} !31 = !{!"clang version 3.5 "} Index: test/Linker/type-unique-type-array-a.ll =================================================================== --- test/Linker/type-unique-type-array-a.ll +++ test/Linker/type-unique-type-array-a.ll @@ -92,7 +92,7 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "a.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array") !2 = !{} !3 = !{!4, !10} @@ -106,13 +106,12 @@ !11 = !{!12} !12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !"_ZTS2SA", baseType: !13) !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = !{!15, !20} -!15 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topAP1A2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2) +!15 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topAP1A2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2) !16 = !DIFile(filename: "a.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array") !17 = !DISubroutineType(types: !18) !18 = !{null, !19, !"_ZTS2SA"} !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1A") -!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !"_ZTS1A", type: !7, declaration: !6, variables: !2) +!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !"_ZTS1A", type: !7, declaration: !6, variables: !2) !21 = !{i32 2, !"Dwarf Version", i32 2} !22 = !{i32 2, !"Debug Info Version", i32 3} !23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"} Index: test/Linker/type-unique-type-array-b.ll =================================================================== --- test/Linker/type-unique-type-array-b.ll +++ test/Linker/type-unique-type-array-b.ll @@ -71,7 +71,7 @@ !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "b.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array") !2 = !{} !3 = !{!4, !10} @@ -85,13 +85,12 @@ !11 = !{!12} !12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !"_ZTS2SA", baseType: !13) !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = !{!15, !20} -!15 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topBP1B2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2) +!15 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topBP1B2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2) !16 = !DIFile(filename: "b.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array") !17 = !DISubroutineType(types: !18) !18 = !{null, !19, !"_ZTS2SA"} !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1B") -!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !"_ZTS1B", type: !7, declaration: !6, variables: !2) +!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !"_ZTS1B", type: !7, declaration: !6, variables: !2) !21 = !{i32 2, !"Dwarf Version", i32 2} !22 = !{i32 2, !"Debug Info Version", i32 3} !23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"} Index: test/MC/ARM/coff-debugging-secrel.ll =================================================================== --- test/MC/ARM/coff-debugging-secrel.ll +++ test/MC/ARM/coff-debugging-secrel.ll @@ -18,14 +18,13 @@ !llvm.module.flags = !{!9, !10} !0 = !DILocation(line: 1, scope: !1) -!1 = distinct !DISubprogram(name: "function", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !2, scope: !3, type: !4, variables: !6) +!1 = distinct !DISubprogram(name: "function", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !7, scopeLine: 1, file: !2, scope: !3, type: !4, variables: !6) !2 = !DIFile(filename: "/Users/compnerd/work/llvm/test/MC/ARM/reduced.c", directory: "/Users/compnerd/work/llvm") !3 = !DIFile(filename: "/Users/compnerd/work/llvm/test/MC/ARM/reduced.c", directory: "/Users/compnerd/work/llvm") !4 = !DISubroutineType(types: !5) !5 = !{null} !6 = !{} -!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !6, retainedTypes: !6, subprograms: !8, globals: !6, imports: !6) -!8 = !{!1} +!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !6, retainedTypes: !6, globals: !6, imports: !6) !9 = !{i32 2, !"Dwarf Version", i32 4} !10 = !{i32 1, !"Debug Info Version", i32 3} Index: test/MC/ELF/cfi-version.ll =================================================================== --- test/MC/ELF/cfi-version.ll +++ test/MC/ELF/cfi-version.ll @@ -24,11 +24,10 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/MC/X86/i386-darwin-frame-register.ll =================================================================== --- test/MC/X86/i386-darwin-frame-register.ll +++ test/MC/X86/i386-darwin-frame-register.ll @@ -29,7 +29,7 @@ !llvm.module.flags = !{!3, !4, !5} !llvm.ident = !{!6} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 230514) (llvm/trunk 230518)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 230514) (llvm/trunk 230518)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "/tmp") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Transforms/ADCE/debug-info-intrinsic.ll =================================================================== --- test/Transforms/ADCE/debug-info-intrinsic.ll +++ test/Transforms/ADCE/debug-info-intrinsic.ll @@ -67,16 +67,15 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "t.c", directory: "/path/to/test/Transforms/ADCE") !2 = !{} -!3 = !{!4, !7, !8, !10} -!4 = distinct !DISubprogram(name: "variable_in_unused_subscope", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "variable_in_unused_subscope", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DISubprogram(name: "variable_in_parent_scope", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) -!8 = distinct !DISubprogram(name: "calls_empty_function_with_unused_variable_in_unused_subscope", scope: !1, file: !1, line: 18, type: !5, isLocal: false, isDefinition: true, scopeLine: 18, flags: DIFlagPrototyped, isOptimized: false, variables: !2) -!10 = distinct !DISubprogram(name: "empty_function_with_unused_variable", scope: !1, file: !1, line: 13, type: !11, isLocal: true, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!7 = distinct !DISubprogram(name: "variable_in_parent_scope", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!8 = distinct !DISubprogram(name: "calls_empty_function_with_unused_variable_in_unused_subscope", scope: !1, file: !1, line: 18, type: !5, isLocal: false, isDefinition: true, scopeLine: 18, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!10 = distinct !DISubprogram(name: "empty_function_with_unused_variable", scope: !1, file: !1, line: 13, type: !11, isLocal: true, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !11 = !DISubroutineType(types: !12) !12 = !{!13} !13 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/AddDiscriminators/basic.ll =================================================================== --- test/Transforms/AddDiscriminators/basic.ll +++ test/Transforms/AddDiscriminators/basic.ll @@ -41,11 +41,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "basic.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "basic.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/AddDiscriminators/call.ll =================================================================== --- test/Transforms/AddDiscriminators/call.ll +++ test/Transforms/AddDiscriminators/call.ll @@ -27,11 +27,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250915) (llvm/trunk 251830)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250915) (llvm/trunk 251830)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "c.cc", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/AddDiscriminators/dbg-declare-discriminator.ll =================================================================== --- test/Transforms/AddDiscriminators/dbg-declare-discriminator.ll +++ test/Transforms/AddDiscriminators/dbg-declare-discriminator.ll @@ -20,13 +20,13 @@ !0 = !{i32 2, !"Dwarf Version", i32 4} !1 = !{i32 2, !"Debug Info Version", i32 3} !2 = !DILocalVariable(scope: !3) -!3 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false) +!3 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !12) !4 = !DIFile(filename: "a.cpp", directory: "/tmp") !5 = !DIExpression() !6 = !DILocation(line: 0, scope: !3, inlinedAt: !7) !7 = distinct !DILocation(line: 0, scope: !8) -!8 = distinct !DISubprogram(linkageName: "test_valid_metadata", scope: null, isLocal: false, isDefinition: true, isOptimized: false) +!8 = distinct !DISubprogram(linkageName: "test_valid_metadata", scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !12) !9 = !DILocalVariable(scope: !10) -!10 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false) +!10 = distinct !DISubprogram(scope: null, file: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !12) !11 = !DILocation(line: 0, scope: !10) -!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4, subprograms: !{!3, !8, !10}) +!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4) Index: test/Transforms/AddDiscriminators/diamond.ll =================================================================== --- test/Transforms/AddDiscriminators/diamond.ll +++ test/Transforms/AddDiscriminators/diamond.ll @@ -46,11 +46,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 253273)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 253273)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "a.cc", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/AddDiscriminators/first-only.ll =================================================================== --- test/Transforms/AddDiscriminators/first-only.ll +++ test/Transforms/AddDiscriminators/first-only.ll @@ -50,11 +50,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 199750) (llvm/trunk 199751)", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 199750) (llvm/trunk 199751)", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "first-only.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "first-only.c", directory: ".") !6 = !DISubroutineType(types: !{null}) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/AddDiscriminators/multiple.ll =================================================================== --- test/Transforms/AddDiscriminators/multiple.ll +++ test/Transforms/AddDiscriminators/multiple.ll @@ -51,11 +51,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 199750) (llvm/trunk 199751)", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 (trunk 199750) (llvm/trunk 199751)", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "multiple.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "multiple.c", directory: ".") !6 = !DISubroutineType(types: !{null, !13}) !13 = !DIBasicType(encoding: DW_ATE_signed, name: "int", size: 32, align: 32) Index: test/Transforms/AddDiscriminators/no-discriminators.ll =================================================================== --- test/Transforms/AddDiscriminators/no-discriminators.ll +++ test/Transforms/AddDiscriminators/no-discriminators.ll @@ -52,11 +52,11 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +; CHECK: !{i32 2, !"Dwarf Version", i32 2} +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "no-discriminators", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) ; CHECK: ![[FOO:[0-9]+]] = distinct !DISubprogram(name: "foo" !5 = !DIFile(filename: "no-discriminators", directory: ".") !6 = !DISubroutineType(types: !7) @@ -64,7 +64,6 @@ !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) !10 = !{i32 2, !"Dwarf Version", i32 2} -; CHECK: !{i32 2, !"Dwarf Version", i32 2} !11 = !{i32 1, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.5.0 "} !13 = !DILocalVariable(name: "i", line: 1, arg: 1, scope: !4, file: !5, type: !9) Index: test/Transforms/AddDiscriminators/oneline.ll =================================================================== --- test/Transforms/AddDiscriminators/oneline.ll +++ test/Transforms/AddDiscriminators/oneline.ll @@ -58,11 +58,10 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250915)", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250915)", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "a.cc", directory: "/usr/local/google/home/dehao/discr") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/ArgumentPromotion/dbg.ll =================================================================== --- test/Transforms/ArgumentPromotion/dbg.ll +++ test/Transforms/ArgumentPromotion/dbg.ll @@ -23,7 +23,6 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !DILocation(line: 8, scope: !2) -!2 = distinct !DISubprogram(name: "test", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, scope: null) -!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5, subprograms: !4) -!4 = !{!2} +!2 = distinct !DISubprogram(name: "test", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) +!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5) !5 = !DIFile(filename: "test.c", directory: "") Index: test/Transforms/CodeGenPrepare/X86/catchpad-phi-cast.ll =================================================================== --- test/Transforms/CodeGenPrepare/X86/catchpad-phi-cast.ll +++ test/Transforms/CodeGenPrepare/X86/catchpad-phi-cast.ll @@ -101,10 +101,9 @@ !llvm.module.flags = !{!7, !8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 254906) (llvm/trunk 254917)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: null, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 254906) (llvm/trunk 254917)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: null) !1 = !DIFile(filename: "t.c", directory: "D:\5Csrc\5Cllvm\5Cbuild") -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test_dbg_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: null) +!4 = distinct !DISubprogram(name: "test_dbg_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: null) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll =================================================================== --- test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll +++ test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll @@ -46,9 +46,9 @@ !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!30} !0 = !DILocalVariable(name: "name", line: 8, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "vfs_addname", linkageName: "vfs_addname", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !28, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "vfs_addname", linkageName: "vfs_addname", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !28, scope: !2, type: !4) !2 = !DIFile(filename: "tail.c", directory: "/Users/echeng/LLVM/radars/r7927803/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !29, retainedTypes: !29, subprograms: !{!1, !16}) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !29, retainedTypes: !29) !4 = !DISubroutineType(types: !5) !5 = !{!6, !6, !9, !9, !9} !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !28, scope: !2, baseType: !7) @@ -61,7 +61,7 @@ !13 = !DILocation(line: 13, scope: !14) !14 = distinct !DILexicalBlock(line: 12, column: 0, file: !28, scope: !1) !15 = !DILocalVariable(name: "name", line: 17, arg: 1, scope: !16, file: !2, type: !6) -!16 = distinct !DISubprogram(name: "add_name_internal", linkageName: "add_name_internal", line: 22, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !28, scope: !2, type: !17) +!16 = distinct !DISubprogram(name: "add_name_internal", linkageName: "add_name_internal", line: 22, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, file: !28, scope: !2, type: !17) !17 = !DISubroutineType(types: !18) !18 = !{!6, !6, !9, !9, !19, !9} !19 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) Index: test/Transforms/DeadArgElim/dbginfo.ll =================================================================== --- test/Transforms/DeadArgElim/dbginfo.ll +++ test/Transforms/DeadArgElim/dbginfo.ll @@ -48,15 +48,14 @@ !llvm.module.flags = !{!12, !13} !llvm.ident = !{!14} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "dbg.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "dbg.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !7) !7 = !{null} -!8 = distinct !DISubprogram(name: "f1", linkageName: "_ZL2f1iz", line: 1, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !9, variables: !2) +!8 = distinct !DISubprogram(name: "f1", linkageName: "_ZL2f1iz", line: 1, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !9, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{null, !11, null} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/DeadStoreElimination/inst-limits.ll =================================================================== --- test/Transforms/DeadStoreElimination/inst-limits.ll +++ test/Transforms/DeadStoreElimination/inst-limits.ll @@ -245,11 +245,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !13} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "/home/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test_within_limit", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test_within_limit", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "test.c", directory: "/home/tmp") !6 = !DISubroutineType(types: !7) !7 = !{!8} Index: test/Transforms/FunctionImport/Inputs/funcimport_debug.ll =================================================================== --- test/Transforms/FunctionImport/Inputs/funcimport_debug.ll +++ test/Transforms/FunctionImport/Inputs/funcimport_debug.ll @@ -14,11 +14,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "funcimport_debug.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/FunctionImport/funcimport_debug.ll =================================================================== --- test/Transforms/FunctionImport/funcimport_debug.ll +++ test/Transforms/FunctionImport/funcimport_debug.ll @@ -10,14 +10,13 @@ ; Check that we have exactly two subprograms (that func's subprogram wasn't ; linked more than once for example), and that they are connected to -; the subprogram list on a compute unit. -; CHECK: !{{[0-9]+}} = distinct !DICompileUnit({{.*}} subprograms: ![[SPs1:[0-9]+]] -; CHECK: ![[SPs1]] = !{![[MAINSP:[0-9]+]]} -; CHECK: ![[MAINSP]] = distinct !DISubprogram(name: "main" -; CHECK: !{{[0-9]+}} = distinct !DICompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]] -; CHECK-NOT: ![[SPs2]] = !{{{.*}}null{{.*}}} -; CHECK: ![[SPs2]] = !{![[FUNCSP:[0-9]+]]} -; CHECK: ![[FUNCSP]] = distinct !DISubprogram(name: "func" +; the correct compile unit. +; CHECK: ![[CU1:[0-9]+]] = distinct !DICompileUnit( +; CHECK: ![[CU2:[0-9]+]] = distinct !DICompileUnit( +; CHECK: distinct !DISubprogram(name: "main" +; CHECK-SAME: unit: ![[CU1]] +; CHECK: distinct !DISubprogram(name: "func" +; CHECK-SAME: unit: ![[CU2]] ; CHECK-NOT: distinct !DISubprogram ; ModuleID = 'funcimport_debug.o' @@ -40,11 +39,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 255685) (llvm/trunk 255682)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "funcimport_debug.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/GCOVProfiling/function-numbering.ll =================================================================== --- test/Transforms/GCOVProfiling/function-numbering.ll +++ test/Transforms/GCOVProfiling/function-numbering.ll @@ -40,15 +40,14 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/function-numbering.ll", directory: "") !2 = !{} -!3 = !{!4, !7, !8} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/function-numbering.ll", directory: "") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) -!8 = distinct !DISubprogram(name: "baz", line: 3, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!8 = distinct !DISubprogram(name: "baz", line: 3, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 2} !10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{!"clang version 3.6.0 "} Index: test/Transforms/GCOVProfiling/global-ctor.ll =================================================================== --- test/Transforms/GCOVProfiling/global-ctor.ll +++ test/Transforms/GCOVProfiling/global-ctor.ll @@ -38,15 +38,14 @@ !llvm.gcov = !{!16} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 210217)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 210217)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "/home/nlewycky") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !2) +!4 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !2) !5 = !DIFile(filename: "global-ctor.ll", directory: "/home/nlewycky") !6 = !DIFile(filename: "global-ctor.ll", directory: "/home/nlewycky") !7 = !DISubroutineType(types: !2) -!8 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_global-ctor.ll", isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !9, type: !7, variables: !2) +!8 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_global-ctor.ll", isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !9, type: !7, variables: !2) !9 = !DIFile(filename: "", directory: "/home/nlewycky") !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/GCOVProfiling/linezero.ll =================================================================== --- test/Transforms/GCOVProfiling/linezero.ll +++ test/Transforms/GCOVProfiling/linezero.ll @@ -93,7 +93,7 @@ !llvm.gcov = !{!25} !llvm.ident = !{!26} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 209871)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (trunk 209871)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2) !1 = !DIFile(filename: "", directory: "PATTERN") !2 = !{} !3 = !{!4} @@ -107,13 +107,12 @@ !11 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS6vector") !13 = !DISubprogram(name: "end", linkageName: "_ZN6vector3endEv", line: 26, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 26, file: !5, scope: !"_ZTS6vector", type: !8) -!14 = !{!15, !20} -!15 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 50, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 50, file: !5, scope: !16, type: !17, variables: !2) +!15 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 50, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 50, file: !5, scope: !16, type: !17, variables: !2) !16 = !DIFile(filename: "linezero.cc", directory: "PATTERN") !17 = !DISubroutineType(types: !18) !18 = !{!19} !19 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!20 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 54, file: !5, scope: !16, type: !21, variables: !2) +!20 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 54, file: !5, scope: !16, type: !21, variables: !2) !21 = !DISubroutineType(types: !22) !22 = !{null} !23 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/GCOVProfiling/linkagename.ll =================================================================== --- test/Transforms/GCOVProfiling/linkagename.ll +++ test/Transforms/GCOVProfiling/linkagename.ll @@ -13,12 +13,11 @@ !llvm.module.flags = !{!10} !llvm.gcov = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 177323)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, subprograms: !4, globals: !3, imports: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 177323)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, globals: !3, imports: !3) !1 = !DIFile(filename: "hello.cc", directory: "/home/nlewycky") !2 = !DIFile(filename: "hello.cc", directory: "/home/nlewycky") !3 = !{} -!4 = !{!5} -!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !1, type: !6, variables: !3) +!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !1, type: !6, variables: !3) !6 = !DISubroutineType(types: !7) !7 = !{null} !8 = !DILocation(line: 1, scope: !5) Index: test/Transforms/GCOVProfiling/modules.ll =================================================================== --- test/Transforms/GCOVProfiling/modules.ll +++ test/Transforms/GCOVProfiling/modules.ll @@ -5,7 +5,7 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !2, globals: !2, imports: !2, dwoId: 43981) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 43981) !1 = !DIFile(filename: "", directory: "/") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/GCOVProfiling/return-block.ll =================================================================== --- test/Transforms/GCOVProfiling/return-block.ll +++ test/Transforms/GCOVProfiling/return-block.ll @@ -44,11 +44,10 @@ !llvm.module.flags = !{!11, !12} !llvm.ident = !{!13} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 223182)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !8, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk 223182)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !8, imports: !2) !1 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/return-block.ll", directory: "") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test", line: 5, isLocal: false, isDefinition: true, isOptimized: true, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test", line: 5, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: ".../llvm/test/Transforms/GCOVProfiling/return-block.ll", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{null} Index: test/Transforms/GCOVProfiling/version.ll =================================================================== --- test/Transforms/GCOVProfiling/version.ll +++ test/Transforms/GCOVProfiling/version.ll @@ -16,11 +16,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 176994)", isOptimized: false, emissionKind: FullDebug, file: !11, enums: !3, retainedTypes: !3, subprograms: !4, globals: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 176994)", isOptimized: false, emissionKind: FullDebug, file: !11, enums: !3, retainedTypes: !3, globals: !3) !2 = !DIFile(filename: "version", directory: "/usr/local/google/home/nlewycky") !3 = !{} -!4 = !{!5} -!5 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !10, scope: !6, type: !7, variables: !3) +!5 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !10, scope: !6, type: !7, variables: !3) !6 = !DIFile(filename: "", directory: ".") !7 = !DISubroutineType(types: !{null}) !8 = !DILocation(line: 1, scope: !5) Index: test/Transforms/GVN/load-pre-nonlocal.ll =================================================================== --- test/Transforms/GVN/load-pre-nonlocal.ll +++ test/Transforms/GVN/load-pre-nonlocal.ll @@ -100,7 +100,7 @@ !10 = !{} !11 = !DISubroutineType(types: !10) !12 = !DIFile(filename: "test.cpp", directory: "/tmp") -!13 = distinct !DISubprogram(name: "test", scope: !12, file: !12, line: 99, type: !11, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !10) +!13 = distinct !DISubprogram(name: "test", scope: !12, file: !12, line: 99, type: !11, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, unit: !18, variables: !10) !14 = !DILocation(line: 100, column: 1, scope: !13) !15 = !DILocation(line: 101, column: 1, scope: !13) !16 = !DILocation(line: 102, column: 1, scope: !13) @@ -108,5 +108,4 @@ !18 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !12, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!13}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/GVN/phi-translate.ll =================================================================== --- test/Transforms/GVN/phi-translate.ll +++ test/Transforms/GVN/phi-translate.ll @@ -45,7 +45,7 @@ !3 = !{} !4 = !DISubroutineType(types: !3) !5 = !DIFile(filename: "a.cc", directory: "/tmp") -!6 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 42, type: !4, isLocal: false, isDefinition: true, scopeLine: 43, flags: DIFlagPrototyped, isOptimized: false, variables: !3) +!6 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 42, type: !4, isLocal: false, isDefinition: true, scopeLine: 43, flags: DIFlagPrototyped, isOptimized: false, unit: !12, variables: !3) !7 = !DILocation(line: 43, column: 1, scope: !6) !8 = !DILocation(line: 44, column: 1, scope: !6) !9 = !DILocation(line: 45, column: 1, scope: !6) @@ -54,5 +54,4 @@ !12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !5, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!6}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/GlobalOpt/2009-03-05-dbg.ll =================================================================== --- test/Transforms/GlobalOpt/2009-03-05-dbg.ll +++ test/Transforms/GlobalOpt/2009-03-05-dbg.ll @@ -58,7 +58,7 @@ !1 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, globals: !{!0}) !2 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !3 = !DILocalVariable(name: "i", line: 4, arg: 1, scope: !4, file: !1, type: !2) -!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1, type: !5) +!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1, type: !5) !5 = !DISubroutineType(types: !6) !6 = !{!2, !2} !7 = !DILocation(line: 5, scope: !8) @@ -69,7 +69,7 @@ !12 = !DILocation(line: 11, scope: !8) !13 = !DILocation(line: 14, scope: !14) !14 = distinct !DILexicalBlock(line: 0, column: 0, file: !20, scope: !15) -!15 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1, type: !16) +!15 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1, type: !16) !16 = !DISubroutineType(types: !17) !17 = !{!2} !18 = !DILocation(line: 15, scope: !14) Index: test/Transforms/Inline/alloca-dbgdeclare-merge.ll =================================================================== --- test/Transforms/Inline/alloca-dbgdeclare-merge.ll +++ test/Transforms/Inline/alloca-dbgdeclare-merge.ll @@ -70,15 +70,14 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "../1.c", directory: "/code/llvm-git/build") !2 = !{} -!3 = !{!4, !7, !8} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} -!7 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: false, variables: !2) -!8 = distinct !DISubprogram(name: "h", scope: !1, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: false, variables: !2) +!7 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: false, unit: !0, variables: !2) +!8 = distinct !DISubprogram(name: "h", scope: !1, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: false, unit: !0, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 4} !10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{!"clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)"} Index: test/Transforms/Inline/alloca-dbgdeclare.ll =================================================================== --- test/Transforms/Inline/alloca-dbgdeclare.ll +++ test/Transforms/Inline/alloca-dbgdeclare.ll @@ -82,7 +82,7 @@ !llvm.module.flags = !{!28, !29} !llvm.ident = !{!30} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227480) (llvm/trunk 227517)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !25, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227480) (llvm/trunk 227517)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !25, imports: !2) !1 = !DIFile(filename: "", directory: "") !2 = !{} !3 = !{!4} @@ -96,17 +96,16 @@ !11 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float) !12 = !{!13} !13 = !DISubrange(count: 2) -!14 = !{!15, !21, !24} -!15 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn31A", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !5, scope: !16, type: !17, variables: !19) +!15 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn31A", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 6, file: !5, scope: !16, type: !17, variables: !19) !16 = !DIFile(filename: "test.cpp", directory: "") !17 = !DISubroutineType(types: !18) !18 = !{null, !"_ZTS1A"} !19 = !{!20} !20 = !DILocalVariable(name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !"_ZTS1A") -!21 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 11, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !5, scope: !16, type: !22, variables: !2) +!21 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 11, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !22, variables: !2) !22 = !DISubroutineType(types: !23) !23 = !{null} -!24 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !5, scope: !16, type: !22, variables: !2) +!24 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 13, file: !5, scope: !16, type: !22, variables: !2) !25 = !{!26, !27} !26 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !"_ZTS1A", variable: %struct.A* @a) !27 = !DIGlobalVariable(name: "b", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !"_ZTS1A", variable: %struct.A* @b) Index: test/Transforms/Inline/debug-info-duplicate-calls.ll =================================================================== --- test/Transforms/Inline/debug-info-duplicate-calls.ll +++ test/Transforms/Inline/debug-info-duplicate-calls.ll @@ -38,19 +38,19 @@ ; CHECK-DAG: [[F3:![0-9]+]] = distinct !DISubprogram(name: "f3" ; CHECK-DAG: [[F4:![0-9]+]] = distinct !DISubprogram(name: "f4" -; CHECK: [[fcs1_f4_f3cs1_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs1_f4_f3cs1:![0-9]+]]) -; CHECK: [[fcs1_f4_f3cs1]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs1_f4:![0-9]+]]) -; CHECK: [[fcs1_f4]] = {{.*}}, scope: [[F4]], inlinedAt: [[fcs1:![0-9]+]]) -; CHECK: [[fcs1]] = {{.*}}, scope: [[F]]) -; CHECK: [[fcs1_f4_f3cs2_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs1_f4_f3cs2:![0-9]+]]) -; CHECK: [[fcs1_f4_f3cs2]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs1_f4]]) - -; CHECK: [[fcs2_f4_f3cs1_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs2_f4_f3cs1:![0-9]+]]) -; CHECK: [[fcs2_f4_f3cs1]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs2_f4:![0-9]+]]) -; CHECK: [[fcs2_f4]] = {{.*}}, scope: [[F4]], inlinedAt: [[fcs2:![0-9]+]]) -; CHECK: [[fcs2]] = {{.*}}, scope: [[F]]) -; CHECK: [[fcs2_f4_f3cs2_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs2_f4_f3cs2:![0-9]+]]) -; CHECK: [[fcs2_f4_f3cs2]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs2_f4]]) +; CHECK-DAG: [[fcs1_f4_f3cs1_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs1_f4_f3cs1:![0-9]+]]) +; CHECK-DAG: [[fcs1_f4_f3cs1]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs1_f4:![0-9]+]]) +; CHECK-DAG: [[fcs1_f4]] = {{.*}}, scope: [[F4]], inlinedAt: [[fcs1:![0-9]+]]) +; CHECK-DAG: [[fcs1]] = {{.*}}, scope: [[F]]) +; CHECK-DAG: [[fcs1_f4_f3cs2_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs1_f4_f3cs2:![0-9]+]]) +; CHECK-DAG: [[fcs1_f4_f3cs2]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs1_f4]]) + +; CHECK-DAG: [[fcs2_f4_f3cs1_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs2_f4_f3cs1:![0-9]+]]) +; CHECK-DAG: [[fcs2_f4_f3cs1]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs2_f4:![0-9]+]]) +; CHECK-DAG: [[fcs2_f4]] = {{.*}}, scope: [[F4]], inlinedAt: [[fcs2:![0-9]+]]) +; CHECK-DAG: [[fcs2]] = {{.*}}, scope: [[F]]) +; CHECK-DAG: [[fcs2_f4_f3cs2_f2]] = {{.*}}, scope: [[F2]], inlinedAt: [[fcs2_f4_f3cs2:![0-9]+]]) +; CHECK-DAG: [[fcs2_f4_f3cs2]] = {{.*}}, scope: [[F3]], inlinedAt: [[fcs2_f4]]) $_Z2f4v = comdat any @@ -98,16 +98,15 @@ !llvm.module.flags = !{!10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 226474) (llvm/trunk 226478)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 226474) (llvm/trunk 226478)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "debug-info-duplicate-calls.cpp", directory: "/tmp/dbginfo") !2 = !{} -!3 = !{!4, !7, !8, !9} -!4 = distinct !DISubprogram(name: "f", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "f", line: 13, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "debug-info-duplicate-calls.cpp", directory: "/tmp/dbginfo") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "f4", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) -!8 = distinct !DISubprogram(name: "f3", line: 7, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) -!9 = distinct !DISubprogram(name: "f2", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "f4", line: 10, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) +!8 = distinct !DISubprogram(name: "f3", line: 7, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) +!9 = distinct !DISubprogram(name: "f2", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2) !10 = !{i32 2, !"Dwarf Version", i32 4} !11 = !{i32 2, !"Debug Info Version", i32 3} !12 = !{!"clang version 3.7.0 (trunk 226474) (llvm/trunk 226478)"} Index: test/Transforms/Inline/debug-invoke.ll =================================================================== --- test/Transforms/Inline/debug-invoke.ll +++ test/Transforms/Inline/debug-invoke.ll @@ -34,12 +34,11 @@ !llvm.dbg.cu = !{!5} !1 = !{i32 2, !"Debug Info Version", i32 3} -!2 = distinct !DISubprogram() +!2 = distinct !DISubprogram(unit: !5) !3 = !DILocation(line: 1, scope: !2) !4 = !DILocation(line: 2, scope: !2) !5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !6, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!2}) + splitDebugFilename: "abc.debug", emissionKind: 2) !6 = !DIFile(filename: "path/davidino", directory: "/path/to/dir") Index: test/Transforms/Inline/ignore-debug-info.ll =================================================================== --- test/Transforms/Inline/ignore-debug-info.ll +++ test/Transforms/Inline/ignore-debug-info.ll @@ -47,10 +47,10 @@ !llvm.module.flags = !{!3, !4} !llvm.ident = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !{!6}, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "test.c", directory: "") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} !4 = !{i32 1, !"Debug Info Version", i32 3} !5 = !{!""} -!6 = distinct !DISubprogram() +!6 = distinct !DISubprogram(unit: !0) Index: test/Transforms/Inline/inline_dbg_declare.ll =================================================================== --- test/Transforms/Inline/inline_dbg_declare.ll +++ test/Transforms/Inline/inline_dbg_declare.ll @@ -67,16 +67,15 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "foo.c", directory: "") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "foo.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) -!9 = distinct !DISubprogram(name: "bar", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !10, variables: !2) +!9 = distinct !DISubprogram(name: "bar", line: 6, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !10, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{null, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !8) @@ -93,7 +92,7 @@ !23 = !DILocation(line: 9, column: 1, scope: !9) ; CHECK: [[FOO:![0-9]+]] = distinct !DISubprogram(name: "foo", -; CHECK: [[BAR:![0-9]+]] = distinct !DISubprogram(name: "bar", ; CHECK: [[m23]] = !DILocalVariable(name: "x", arg: 1, scope: [[FOO]] +; CHECK: [[BAR:![0-9]+]] = distinct !DISubprogram(name: "bar", ; CHECK: [[m24]] = !DILocation(line: 1, column: 17, scope: [[FOO]], inlinedAt: [[CALL_SITE:![0-9]+]]) ; CHECK: [[CALL_SITE]] = distinct !DILocation(line: 8, column: 14, scope: [[BAR]]) Index: test/Transforms/Inline/local-as-metadata-undominated-use.ll =================================================================== --- test/Transforms/Inline/local-as-metadata-undominated-use.ll +++ test/Transforms/Inline/local-as-metadata-undominated-use.ll @@ -31,13 +31,12 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265634) (llvm/trunk 265637)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 265634) (llvm/trunk 265637)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "t.c", directory: "/path/to/tests") ; CHECK: ![[EMPTY]] = !{} !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/InstCombine/debug-line.ll =================================================================== --- test/Transforms/InstCombine/debug-line.ll +++ test/Transforms/InstCombine/debug-line.ll @@ -14,14 +14,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!10} -!0 = distinct !DISubprogram(name: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !8, scope: !1, type: !3) !1 = !DIFile(filename: "m.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !{}, retainedTypes: !{}, subprograms: !9) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !{}, retainedTypes: !{}) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocation(line: 5, column: 2, scope: !6) !6 = distinct !DILexicalBlock(line: 4, column: 12, file: !8, scope: !0) !7 = !DILocation(line: 6, column: 1, scope: !6) !8 = !DIFile(filename: "m.c", directory: "/private/tmp") -!9 = !{!0} !10 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Transforms/InstCombine/debuginfo.ll =================================================================== --- test/Transforms/InstCombine/debuginfo.ll +++ test/Transforms/InstCombine/debuginfo.ll @@ -32,9 +32,9 @@ !llvm.module.flags = !{!30} !0 = !DILocalVariable(name: "__dest", line: 78, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "foobar", line: 79, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 79, file: !27, scope: !2, type: !4, variables: !25) +!1 = distinct !DISubprogram(name: "foobar", line: 79, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !3, scopeLine: 79, file: !27, scope: !2, type: !4, variables: !25) !2 = !DIFile(filename: "string.h", directory: "Game") -!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 127710)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !29, retainedTypes: !29, subprograms: !24) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 127710)", isOptimized: true, emissionKind: FullDebug, file: !28, enums: !29, retainedTypes: !29) !4 = !DISubroutineType(types: !5) !5 = !{!6} !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !3, baseType: null) @@ -50,7 +50,6 @@ !21 = !DILocation(line: 80, column: 3, scope: !22) !22 = distinct !DILexicalBlock(line: 80, column: 3, file: !27, scope: !23) !23 = distinct !DILexicalBlock(line: 79, column: 1, file: !27, scope: !1) -!24 = !{!1} !25 = !{!0, !7, !9} !26 = !DIFile(filename: "bits.c", directory: "Game") !27 = !DIFile(filename: "string.h", directory: "Game") Index: test/Transforms/InstCombine/lifetime.ll =================================================================== --- test/Transforms/InstCombine/lifetime.ll +++ test/Transforms/InstCombine/lifetime.ll @@ -64,11 +64,10 @@ !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248826) (llvm/trunk 248827)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248826) (llvm/trunk 248827)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.cpp", directory: "/home/user") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{null, !7} !7 = !DIBasicType(name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) Index: test/Transforms/LICM/debug-value.ll =================================================================== --- test/Transforms/LICM/debug-value.ll +++ test/Transforms/LICM/debug-value.ll @@ -36,17 +36,16 @@ !llvm.module.flags = !{!26} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "idamax", line: 112, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !25, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "idamax", line: 112, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !25, scope: !1, type: !3) !1 = !DIFile(filename: "/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/Benchmarks/CoyoteBench/lpbench.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 127169)", isOptimized: true, emissionKind: FullDebug, file: !25, subprograms: !8) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 127169)", isOptimized: true, emissionKind: FullDebug, file: !25) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "dscal", line: 206, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !25, scope: !1, type: !7) +!6 = distinct !DISubprogram(name: "dscal", line: 206, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !25, scope: !1, type: !7) !7 = !DISubroutineType(types: !{null}) -!8 = !{!0, !6, !9, !10} -!9 = distinct !DISubprogram(name: "daxpy", line: 230, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !25, scope: !1, type: !7) -!10 = distinct !DISubprogram(name: "dgefa", line: 267, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !25, scope: !1, type: !7) +!9 = distinct !DISubprogram(name: "daxpy", line: 230, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !25, scope: !1, type: !7) +!10 = distinct !DISubprogram(name: "dgefa", line: 267, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !25, scope: !1, type: !7) !11 = !DILocation(line: 281, column: 9, scope: !12) !12 = distinct !DILexicalBlock(line: 272, column: 5, file: !25, scope: !13) !13 = distinct !DILexicalBlock(line: 271, column: 5, file: !25, scope: !14) Index: test/Transforms/LoopIdiom/debug-line.ll =================================================================== --- test/Transforms/LoopIdiom/debug-line.ll +++ test/Transforms/LoopIdiom/debug-line.ll @@ -30,9 +30,9 @@ !llvm.module.flags = !{!19} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !18, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !18, scope: !1, type: !3) !1 = !DIFile(filename: "li.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 127165:127174)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !9, subprograms: !{!0}, retainedTypes: !9) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 127165:127174)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !9, retainedTypes: !9) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocalVariable(name: "a", line: 2, arg: 1, scope: !0, file: !1, type: !6) Index: test/Transforms/LoopReroll/reroll_with_dbg.ll =================================================================== --- test/Transforms/LoopReroll/reroll_with_dbg.ll +++ test/Transforms/LoopReroll/reroll_with_dbg.ll @@ -85,11 +85,10 @@ !llvm.module.flags = !{!17, !18, !19, !20} !llvm.ident = !{!21} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git b1fbc23058e7fa1cdd954ab97ba84f1c549c9879) (http://llvm.org/git/llvm.git 054da58c5398a721d4dab7af63d7de8d7a1e1a1c)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git b1fbc23058e7fa1cdd954ab97ba84f1c549c9879) (http://llvm.org/git/llvm.git 054da58c5398a721d4dab7af63d7de8d7a1e1a1c)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "test.c", directory: "/home/weimingz/llvm-build/release/community-tip") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11) !5 = !DISubroutineType(types: !6) !6 = !{null, !7, !7, !10} !7 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !8) Index: test/Transforms/LoopRotate/dbgvalue.ll =================================================================== --- test/Transforms/LoopRotate/dbgvalue.ll +++ test/Transforms/LoopRotate/dbgvalue.ll @@ -84,9 +84,9 @@ !llvm.module.flags = !{!20} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "tak", line: 32, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !18, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "tak", line: 32, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !18, scope: !1, type: !3) !1 = !DIFile(filename: "/Volumes/Lalgate/cj/llvm/projects/llvm-test/SingleSource/Benchmarks/BenchmarkGame/recursive.c", directory: "/Volumes/Lalgate/cj/D/projects/llvm-test/SingleSource/Benchmarks/BenchmarkGame") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125492)", isOptimized: true, emissionKind: FullDebug, file: !18, subprograms: !{!0}) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125492)", isOptimized: true, emissionKind: FullDebug, file: !18) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/LoopSimplify/dbg-loc.ll =================================================================== --- test/Transforms/LoopSimplify/dbg-loc.ll +++ test/Transforms/LoopSimplify/dbg-loc.ll @@ -81,7 +81,7 @@ !3 = !{} !4 = !DISubroutineType(types: !3) !5 = !DIFile(filename: "Vector.h", directory: "/tmp") -!6 = distinct !DISubprogram(name: "destruct", scope: !5, file: !5, line: 71, type: !4, isLocal: false, isDefinition: true, scopeLine: 72, flags: DIFlagPrototyped, isOptimized: false, variables: !3) +!6 = distinct !DISubprogram(name: "destruct", scope: !5, file: !5, line: 71, type: !4, isLocal: false, isDefinition: true, scopeLine: 72, flags: DIFlagPrototyped, isOptimized: false, unit: !14, variables: !3) !7 = !DILocation(line: 73, column: 38, scope: !6) !8 = !DILocation(line: 73, column: 13, scope: !6) !9 = !DILocation(line: 73, column: 27, scope: !6) @@ -92,5 +92,4 @@ !14 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !5, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!6}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/LoopSimplify/single-backedge.ll =================================================================== --- test/Transforms/LoopSimplify/single-backedge.ll +++ test/Transforms/LoopSimplify/single-backedge.ll @@ -31,7 +31,7 @@ !2 = !{} !3 = !DISubroutineType(types: !2) !4 = !DIFile(filename: "atomic.cpp", directory: "/tmp") -!5 = distinct !DISubprogram(name: "test", scope: !4, file: !4, line: 99, type: !3, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!5 = distinct !DISubprogram(name: "test", scope: !4, file: !4, line: 99, type: !3, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, unit: !12, variables: !2) !6 = !DILocation(line: 100, column: 1, scope: !5) !7 = !DILocation(line: 101, column: 1, scope: !5) !8 = !DILocation(line: 102, column: 1, scope: !5) @@ -41,5 +41,4 @@ !12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !4, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!5}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/LoopUnroll/runtime-loop1.ll =================================================================== --- test/Transforms/LoopUnroll/runtime-loop1.ll +++ test/Transforms/LoopUnroll/runtime-loop1.ll @@ -61,13 +61,12 @@ !3 = !{} !4 = !DISubroutineType(types: !3) !5 = !DIFile(filename: "test.cpp", directory: "/tmp") -!6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !3) +!6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, unit: !11, variables: !3) !7 = !DILocation(line: 100, column: 1, scope: !6) !8 = !DILocation(line: 101, column: 1, scope: !6) !9 = !DILocation(line: 102, column: 1, scope: !6) !10 = !DILocation(line: 103, column: 1, scope: !6) -!11 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", +!11 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !5, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!6}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/LoopVectorize/X86/no_fpmath.ll =================================================================== --- test/Transforms/LoopVectorize/X86/no_fpmath.ll +++ test/Transforms/LoopVectorize/X86/no_fpmath.ll @@ -79,7 +79,7 @@ !1 = !{i32 1, !"PIC Level", i32 2} !2 = !{!"clang version 3.7.0"} !3 = !DILocation(line: 5, column: 20, scope: !4) -!4 = distinct !DISubprogram(name: "cond_sum", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !7) +!4 = distinct !DISubprogram(name: "cond_sum", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !28, variables: !7) !5 = !DIFile(filename: "no_fpmath.c", directory: "") !6 = !DISubroutineType(types: !7) !7 = !{} @@ -95,7 +95,7 @@ !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.unroll.disable"} !19 = !DILocation(line: 16, column: 20, scope: !20) -!20 = distinct !DISubprogram(name: "cond_sum_loop_hint", scope: !5, file: !5, line: 12, type: !6, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, variables: !7) +!20 = distinct !DISubprogram(name: "cond_sum_loop_hint", scope: !5, file: !5, line: 12, type: !6, isLocal: false, isDefinition: true, scopeLine: 12, flags: DIFlagPrototyped, isOptimized: true, unit: !28, variables: !7) !21 = !DILocation(line: 16, column: 3, scope: !20) !22 = !DILocation(line: 17, column: 14, scope: !20) !23 = !DILocation(line: 20, column: 3, scope: !20) @@ -106,5 +106,4 @@ !28 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !5, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!4, !20}) + splitDebugFilename: "abc.debug", emissionKind: 2) Index: test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll =================================================================== --- test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll +++ test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll @@ -123,15 +123,14 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "source.cpp", directory: ".") !2 = !{} -!3 = !{!4, !7, !8} -!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "source.cpp", directory: ".") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "test_disabled", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) -!8 = distinct !DISubprogram(name: "test_array_bounds", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "test_disabled", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 10, file: !1, scope: !5, type: !6, variables: !2) +!8 = distinct !DISubprogram(name: "test_array_bounds", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 16, file: !1, scope: !5, type: !6, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 2} !10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{!"clang version 3.5.0"} Index: test/Transforms/LoopVectorize/X86/vectorization-remarks-profitable.ll =================================================================== --- test/Transforms/LoopVectorize/X86/vectorization-remarks-profitable.ll +++ test/Transforms/LoopVectorize/X86/vectorization-remarks-profitable.ll @@ -82,13 +82,12 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 250016)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 250016)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) !1 = !DIFile(filename: "vectorization-remarks-profitable.c", directory: "") !2 = !{} -!3 = !{!4, !6} -!4 = distinct !DISubprogram(name: "do_not_interleave", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "do_not_interleave", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !2) -!6 = distinct !DISubprogram(name: "interleave_not_profitable", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!6 = distinct !DISubprogram(name: "interleave_not_profitable", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} !8 = !{i32 2, !"Debug Info Version", i32 3} !9 = !{!"clang version 3.8.0 (trunk 250016)"} Index: test/Transforms/LoopVectorize/X86/vectorization-remarks.ll =================================================================== --- test/Transforms/LoopVectorize/X86/vectorization-remarks.ll +++ test/Transforms/LoopVectorize/X86/vectorization-remarks.ll @@ -53,7 +53,7 @@ !1 = !DIFile(filename: "vectorization-remarks.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !24, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "vectorization-remarks.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} @@ -73,4 +73,4 @@ !21 = !{!13, !13, i64 0} !22 = !DILocation(line: 20, column: 3, scope: !4) !23 = !DILocation(line: 21, column: 3, scope: !4) -!24 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, subprograms: !{!4}) +!24 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1) Index: test/Transforms/LoopVectorize/conditional-assignment.ll =================================================================== --- test/Transforms/LoopVectorize/conditional-assignment.ll +++ test/Transforms/LoopVectorize/conditional-assignment.ll @@ -36,11 +36,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "source.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "conditional_store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "conditional_store", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "source.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Transforms/LoopVectorize/control-flow.ll =================================================================== --- test/Transforms/LoopVectorize/control-flow.ll +++ test/Transforms/LoopVectorize/control-flow.ll @@ -55,11 +55,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "source.cpp", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "source.cpp", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Transforms/LoopVectorize/dbg.value.ll =================================================================== --- test/Transforms/LoopVectorize/dbg.value.ll +++ test/Transforms/LoopVectorize/dbg.value.ll @@ -44,10 +44,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!26} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !1, retainedTypes: !1, subprograms: !2, globals: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !1, retainedTypes: !1, globals: !11) !1 = !{} -!2 = !{!3} -!3 = distinct !DISubprogram(name: "test", linkageName: "test", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !25, scope: !4, type: !5, variables: !8) +!3 = distinct !DISubprogram(name: "test", linkageName: "test", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !25, scope: !4, type: !5, variables: !8) !4 = !DIFile(filename: "test", directory: "/path/to/somewhere") !5 = !DISubroutineType(types: !6) !6 = !{!7} Index: test/Transforms/LoopVectorize/debugloc.ll =================================================================== --- test/Transforms/LoopVectorize/debugloc.ll +++ test/Transforms/LoopVectorize/debugloc.ll @@ -63,11 +63,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18, !27} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185038) (llvm/trunk 185097)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185038) (llvm/trunk 185097)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "-", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !12) +!4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, variables: !12) !5 = !DIFile(filename: "", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") !6 = !DIFile(filename: "", directory: "/Volumes/Data/backedup/dev/os/llvm/debug") !7 = !DISubroutineType(types: !8) Index: test/Transforms/LoopVectorize/no_array_bounds.ll =================================================================== --- test/Transforms/LoopVectorize/no_array_bounds.ll +++ test/Transforms/LoopVectorize/no_array_bounds.ll @@ -72,11 +72,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "no_array_bounds.cpp", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "no_array_bounds.cpp", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Transforms/LoopVectorize/no_switch.ll =================================================================== --- test/Transforms/LoopVectorize/no_switch.ll +++ test/Transforms/LoopVectorize/no_switch.ll @@ -67,11 +67,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "source.cpp", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "source.cpp", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 2} Index: test/Transforms/LoopVectorize/runtime-check.ll =================================================================== --- test/Transforms/LoopVectorize/runtime-check.ll +++ test/Transforms/LoopVectorize/runtime-check.ll @@ -74,14 +74,13 @@ !2 = !{} !3 = !DISubroutineType(types: !2) !4 = !DIFile(filename: "test.cpp", directory: "/tmp") -!5 = distinct !DISubprogram(name: "foo", scope: !4, file: !4, line: 99, type: !3, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!5 = distinct !DISubprogram(name: "foo", scope: !4, file: !4, line: 99, type: !3, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, unit: !9, variables: !2) !6 = !DILocation(line: 100, column: 1, scope: !5) !7 = !DILocation(line: 101, column: 1, scope: !5) !8 = !DILocation(line: 102, column: 1, scope: !5) !9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !10, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!5}) + splitDebugFilename: "abc.debug", emissionKind: 2) !10 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !11 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/Mem2Reg/ConvertDebugInfo.ll =================================================================== --- test/Transforms/Mem2Reg/ConvertDebugInfo.ll +++ test/Transforms/Mem2Reg/ConvertDebugInfo.ll @@ -36,9 +36,9 @@ !llvm.module.flags = !{!14} !0 = !DILocalVariable(name: "i", line: 2, arg: 1, scope: !1, file: !2, type: !7) -!1 = distinct !DISubprogram(name: "testfunc", linkageName: "testfunc", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !12, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "testfunc", linkageName: "testfunc", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 2, file: !12, scope: !2, type: !4) !2 = !DIFile(filename: "testfunc.c", directory: "/tmp") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !13, retainedTypes: !13, subprograms: !{!1}) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !12, enums: !13, retainedTypes: !13) !4 = !DISubroutineType(types: !5) !5 = !{!6, !7, !6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float) Index: test/Transforms/Mem2Reg/ConvertDebugInfo2.ll =================================================================== --- test/Transforms/Mem2Reg/ConvertDebugInfo2.ll +++ test/Transforms/Mem2Reg/ConvertDebugInfo2.ll @@ -43,16 +43,16 @@ !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!22} !0 = !DILocalVariable(name: "a", line: 8, arg: 1, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "baz", linkageName: "baz", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 8, file: !20, scope: !2, type: !4) +!1 = distinct !DISubprogram(name: "baz", linkageName: "baz", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 8, file: !20, scope: !2, type: !4) !2 = !DIFile(filename: "bar.c", directory: "/tmp/") -!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21, subprograms: !{!1, !10}) +!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !21, retainedTypes: !21) !4 = !DISubroutineType(types: !5) !5 = !{null, !6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 8, scope: !1) !8 = !DILocation(line: 9, scope: !1) !9 = !DILocalVariable(name: "x", line: 4, arg: 1, scope: !10, file: !2, type: !6) -!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !20, scope: !2, type: !11) +!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !3, scopeLine: 4, file: !20, scope: !2, type: !11) !11 = !DISubroutineType(types: !12) !12 = !{null, !6, !13, !14} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) Index: test/Transforms/ObjCARC/basic.ll =================================================================== --- test/Transforms/ObjCARC/basic.ll +++ test/Transforms/ObjCARC/basic.ll @@ -3041,12 +3041,11 @@ !0 = !{} !1 = !{i32 1, !"Debug Info Version", i32 3} -!2 = distinct !DISubprogram() +!2 = distinct !DISubprogram(unit: !3) !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", file: !4, isOptimized: true, flags: "-O2", - splitDebugFilename: "abc.debug", emissionKind: 2, - subprograms: !{!2}) + splitDebugFilename: "abc.debug", emissionKind: 2) !4 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") !5 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll =================================================================== --- test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll +++ test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll @@ -113,10 +113,9 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!33, !34, !35, !36, !61} -!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: true, runtimeVersion: 2, emissionKind: FullDebug, file: !60, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1) +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.3 ", isOptimized: true, runtimeVersion: 2, emissionKind: FullDebug, file: !60, enums: !1, retainedTypes: !1, globals: !1) !1 = !{} -!3 = !{!5, !27} -!5 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 10, file: !60, scope: !6, type: !7, variables: !11) +!5 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 10, file: !60, scope: !6, type: !7, variables: !11) !6 = !DIFile(filename: "test.m", directory: "/Volumes/Files/gottesmmcab/Radar/12906997") !7 = !DISubroutineType(types: !8) !8 = !{!9} @@ -137,7 +136,7 @@ !24 = !DIBasicType(tag: DW_TAG_base_type, name: "signed char", size: 8, align: 8, encoding: DW_ATE_signed_char) !25 = !DILocalVariable(name: "obj2", line: 15, scope: !26, file: !6, type: !14) !26 = distinct !DILexicalBlock(line: 14, column: 0, file: !60, scope: !22) -!27 = distinct !DISubprogram(name: "ThrowFunc", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !60, scope: !6, type: !28, variables: !31) +!27 = distinct !DISubprogram(name: "ThrowFunc", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !60, scope: !6, type: !28, variables: !31) !28 = !DISubroutineType(types: !29) !29 = !{null, !14} !31 = !{!32} Index: test/Transforms/SLPVectorizer/X86/debug_info.ll =================================================================== --- test/Transforms/SLPVectorizer/X86/debug_info.ll +++ test/Transforms/SLPVectorizer/X86/debug_info.ll @@ -57,11 +57,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!18, !32} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 187335) (llvm/trunk 187335:187340M)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 187335) (llvm/trunk 187335:187340M)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "file.c", directory: "/Users/nadav") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "depth", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !11) +!4 = distinct !DISubprogram(name: "depth", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !11) !5 = !DIFile(filename: "file.c", directory: "/Users/nadav") !6 = !DISubroutineType(types: !7) !7 = !{!8, !9, !8} Index: test/Transforms/SROA/dbg-single-piece.ll =================================================================== --- test/Transforms/SROA/dbg-single-piece.ll +++ test/Transforms/SROA/dbg-single-piece.ll @@ -28,11 +28,11 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !DILocalVariable(name: "I", scope: !2, file: !3, line: 947, type: !4) -!2 = distinct !DISubprogram(name: "findInsertLocation", linkageName: "_ZL18findInsertLocationPN4llvm17MachineBasicBlockENS_9SlotIndexERNS_13LiveIntervalsE", scope: !3, file: !3, line: 937, isLocal: true, isDefinition: true, scopeLine: 938, flags: DIFlagPrototyped, isOptimized: true) +!2 = distinct !DISubprogram(name: "findInsertLocation", linkageName: "_ZL18findInsertLocationPN4llvm17MachineBasicBlockENS_9SlotIndexERNS_13LiveIntervalsE", scope: !3, file: !3, line: 937, isLocal: true, isDefinition: true, scopeLine: 938, flags: DIFlagPrototyped, isOptimized: true, unit: !9) !3 = !DIFile(filename: "none", directory: ".") !4 = !DICompositeType(tag: DW_TAG_class_type, name: "bundle_iterator >", scope: !5, file: !3, line: 163, size: 128, align: 64, elements: !6, templateParams: !6, identifier: "_ZTSN4llvm17MachineBasicBlock15bundle_iteratorINS_12MachineInstrENS_14ilist_iteratorIS2_EEEE") !5 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "MachineBasicBlock", file: !3, line: 68, size: 1408, align: 64, identifier: "_ZTSN4llvm17MachineBasicBlockE") !6 = !{} !7 = !DIExpression() !8 = !DILocation(line: 947, column: 35, scope: !2) -!9 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !3, subprograms: !{!2}) +!9 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !3) Index: test/Transforms/SafeStack/debug-loc.ll =================================================================== --- test/Transforms/SafeStack/debug-loc.ll +++ test/Transforms/SafeStack/debug-loc.ll @@ -55,7 +55,7 @@ !llvm.module.flags = !{!15, !16} !llvm.ident = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 254019) (llvm/trunk 254036)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, subprograms: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 254019) (llvm/trunk 254036)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "../llvm/2.cc", directory: "/code/build-llvm") !2 = !{} !3 = !{!4} @@ -66,8 +66,7 @@ !8 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !9 = !{!10} !10 = !DISubrange(count: 100) -!11 = !{!12} -!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1S", scope: !1, file: !1, line: 10, type: !13, isLocal: false, isDefinition: true, scopeLine: 10, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1f1S", scope: !1, file: !1, line: 10, type: !13, isLocal: false, isDefinition: true, scopeLine: 10, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !13 = !DISubroutineType(types: !14) !14 = !{null, !"_ZTS1S"} !15 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/SampleProfile/branch.ll =================================================================== --- test/Transforms/SampleProfile/branch.ll +++ test/Transforms/SampleProfile/branch.ll @@ -157,13 +157,12 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248211) (llvm/trunk 248217)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, retainedTypes: !3, subprograms: !5) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 248211) (llvm/trunk 248217)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, retainedTypes: !3) !1 = !DIFile(filename: "test.cc", directory: "/ssd/llvm_commit") !2 = !{} !3 = !{!4} !4 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) -!5 = !{!6} -!6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !7, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !7, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !7 = !DISubroutineType(types: !8) !8 = !{!9, !9, !10} !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SampleProfile/calls.ll =================================================================== --- test/Transforms/SampleProfile/calls.ll +++ test/Transforms/SampleProfile/calls.ll @@ -88,14 +88,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "calls.cc", directory: ".") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "calls.cc", directory: ".") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} Index: test/Transforms/SampleProfile/cov-zero-samples.ll =================================================================== --- test/Transforms/SampleProfile/cov-zero-samples.ll +++ test/Transforms/SampleProfile/cov-zero-samples.ll @@ -86,15 +86,14 @@ !llvm.module.flags = !{!15, !16} !llvm.ident = !{!17} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 253667) (llvm/trunk 253670)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3, globals: !11) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 253667) (llvm/trunk 253670)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, globals: !11) !1 = !DIFile(filename: "cov-zero-samples.cc", directory: ".") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "never_called", linkageName: "_Z12never_calledi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "never_called", linkageName: "_Z12never_calledi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !DISubroutineType(types: !10) !10 = !{!7} !11 = !{!12} Index: test/Transforms/SampleProfile/coverage-warning.ll =================================================================== --- test/Transforms/SampleProfile/coverage-warning.ll +++ test/Transforms/SampleProfile/coverage-warning.ll @@ -30,11 +30,10 @@ !llvm.module.flags = !{!6, !7} !llvm.ident = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251524) (llvm/trunk 251531)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251524) (llvm/trunk 251531)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) !1 = !DIFile(filename: "coverage-warning.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !2) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/SampleProfile/discriminator.ll =================================================================== --- test/Transforms/SampleProfile/discriminator.ll +++ test/Transforms/SampleProfile/discriminator.ll @@ -66,11 +66,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "discriminator.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "discriminator.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/SampleProfile/entry_counts.ll =================================================================== --- test/Transforms/SampleProfile/entry_counts.ll +++ test/Transforms/SampleProfile/entry_counts.ll @@ -19,11 +19,10 @@ !llvm.module.flags = !{!6, !7} !llvm.ident = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 237249) (llvm/trunk 237261)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 237249) (llvm/trunk 237261)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "entry_counts.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !2) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/SampleProfile/fnptr.ll =================================================================== --- test/Transforms/SampleProfile/fnptr.ll +++ test/Transforms/SampleProfile/fnptr.ll @@ -131,17 +131,17 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !{!"clang version 3.6.0 "} !2 = !DILocation(line: 9, column: 3, scope: !3) -!3 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !4, scope: !5, type: !6, variables: !7) +!3 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !26, scopeLine: 8, file: !4, scope: !5, type: !6, variables: !7) !4 = !DIFile(filename: "fnptr.cc", directory: ".") !5 = !DIFile(filename: "fnptr.cc", directory: ".") !6 = !DISubroutineType(types: !7) !7 = !{} !8 = !DILocation(line: 9, column: 14, scope: !3) !9 = !DILocation(line: 13, column: 3, scope: !10) -!10 = distinct !DISubprogram(name: "bar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !4, scope: !5, type: !6, variables: !7) +!10 = distinct !DISubprogram(name: "bar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !26, scopeLine: 12, file: !4, scope: !5, type: !6, variables: !7) !11 = !DILocation(line: 13, column: 14, scope: !10) !12 = !DILocation(line: 19, column: 3, scope: !13) -!13 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !4, scope: !5, type: !6, variables: !7) +!13 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, unit: !26, scopeLine: 16, file: !4, scope: !5, type: !6, variables: !7) !14 = !DILocation(line: 20, column: 5, scope: !13) !15 = !DILocation(line: 21, column: 15, scope: !13) !16 = !DILocation(line: 22, column: 11, scope: !13) @@ -154,4 +154,4 @@ !23 = !{!"branch_weights", i32 0, i32 534} !24 = !DILocation(line: 27, column: 3, scope: !13) !25 = !DILocation(line: 28, column: 3, scope: !13) -!26 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4, subprograms: !{!3, !10, !13}) +!26 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4) Index: test/Transforms/SampleProfile/gcc-simple.ll =================================================================== --- test/Transforms/SampleProfile/gcc-simple.ll +++ test/Transforms/SampleProfile/gcc-simple.ll @@ -144,16 +144,15 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 247554) (llvm/trunk 247557)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 247554) (llvm/trunk 247557)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "discriminator.cc", directory: "/usr/local/google/home/dnovillo/llvm/test/autofdo") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !8 = !DIBasicType(name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!12} !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SampleProfile/inline-combine.ll =================================================================== --- test/Transforms/SampleProfile/inline-combine.ll +++ test/Transforms/SampleProfile/inline-combine.ll @@ -37,10 +37,10 @@ !0 = !{i32 2, !"Dwarf Version", i32 4} !1 = !{i32 1, !"Debug Info Version", i32 3} !2 = !{!"clang version 3.5 "} -!3 = distinct !DISubprogram(name: "foo", scope: !4, file: !4, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !6) +!3 = distinct !DISubprogram(name: "foo", scope: !4, file: !4, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !9, variables: !6) !4 = !DIFile(filename: "test.cc", directory: ".") !5 = !DISubroutineType(types: !6) !6 = !{} !7 = !DILocation(line: 4, scope: !3) -!8 = distinct !DISubprogram(name: "bar", scope: !4, file: !4, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !6) -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4, subprograms: !{!3, !8}) +!8 = distinct !DISubprogram(name: "bar", scope: !4, file: !4, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !9, variables: !6) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !4) Index: test/Transforms/SampleProfile/inline-coverage.ll =================================================================== --- test/Transforms/SampleProfile/inline-coverage.ll +++ test/Transforms/SampleProfile/inline-coverage.ll @@ -90,16 +90,15 @@ !llvm.module.flags = !{!13, !14} !llvm.ident = !{!15} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 251738) (llvm/trunk 251737)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 251738) (llvm/trunk 251737)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "coverage.cc", directory: ".") !2 = !{} -!3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !8 = !DIBasicType(name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!12} !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SampleProfile/inline-hint.ll =================================================================== --- test/Transforms/SampleProfile/inline-hint.ll +++ test/Transforms/SampleProfile/inline-hint.ll @@ -16,21 +16,21 @@ !llvm.ident = !{!19} !llvm.dbg.cu = !{!0} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, subprograms: !{!4, !10, !11, !14}) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1) !1 = !DIFile(filename: "inline-hint.cc", directory: ".") !2 = !{} !3 = !{!4, !10, !11, !14} -!4 = distinct !DISubprogram(name: "cold_fn", linkageName: "_Z7cold_fnRxi", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "cold_fn", linkageName: "_Z7cold_fnRxi", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null, !7, !9} !7 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !8, size: 64, align: 64) !8 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "hot_fn", linkageName: "_Z6hot_fnRxi", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) -!11 = distinct !DISubprogram(name: "compute", linkageName: "_Z7computex", scope: !1, file: !1, line: 11, type: !12, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!10 = distinct !DISubprogram(name: "hot_fn", linkageName: "_Z6hot_fnRxi", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!11 = distinct !DISubprogram(name: "compute", linkageName: "_Z7computex", scope: !1, file: !1, line: 11, type: !12, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !12 = !DISubroutineType(types: !13) !13 = !{!8, !8} -!14 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 21, type: !15, isLocal: false, isDefinition: true, scopeLine: 21, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!14 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 21, type: !15, isLocal: false, isDefinition: true, scopeLine: 21, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !15 = !DISubroutineType(types: !16) !16 = !{!9} !17 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/SampleProfile/inline.ll =================================================================== --- test/Transforms/SampleProfile/inline.ll +++ test/Transforms/SampleProfile/inline.ll @@ -81,14 +81,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "calls.cc", directory: ".") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "calls.cc", directory: ".") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} Index: test/Transforms/SampleProfile/nolocinfo.ll =================================================================== --- test/Transforms/SampleProfile/nolocinfo.ll +++ test/Transforms/SampleProfile/nolocinfo.ll @@ -23,11 +23,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251335) (llvm/trunk 251344)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251335) (llvm/trunk 251344)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "nolocinfo.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SampleProfile/offset.ll =================================================================== --- test/Transforms/SampleProfile/offset.ll +++ test/Transforms/SampleProfile/offset.ll @@ -54,11 +54,10 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250750)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 250750)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "a.cc", directory: "/tmp") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SampleProfile/propagate.ll =================================================================== --- test/Transforms/SampleProfile/propagate.ll +++ test/Transforms/SampleProfile/propagate.ll @@ -198,14 +198,13 @@ !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: NoDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "propagate.cc", directory: ".") !2 = !{} -!3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "propagate.cc", directory: ".") !6 = !DISubroutineType(types: !{null}) -!7 = distinct !DISubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !5, type: !6, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 24, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} Index: test/Transforms/SampleProfile/remarks.ll =================================================================== --- test/Transforms/SampleProfile/remarks.ll +++ test/Transforms/SampleProfile/remarks.ll @@ -124,11 +124,10 @@ !llvm.module.flags = !{!16, !17} !llvm.ident = !{!18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 251041) (llvm/trunk 251053)", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 251041) (llvm/trunk 251053)", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !2) !1 = !DIFile(filename: "remarks.cc", directory: ".") !2 = !{} -!3 = !{!4, !13} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !8) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) @@ -137,7 +136,7 @@ !10 = !DILocalVariable(name: "i", scope: !11, file: !1, line: 5, type: !12) !11 = distinct !DILexicalBlock(scope: !4, file: !1, line: 5, column: 3) !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 13, type: !14, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, variables: !2) +!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 13, type: !14, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) !14 = !DISubroutineType(types: !15) !15 = !{!12} !16 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/ScalarRepl/debuginfo-preserved.ll =================================================================== --- test/Transforms/ScalarRepl/debuginfo-preserved.ll +++ test/Transforms/ScalarRepl/debuginfo-preserved.ll @@ -42,8 +42,8 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!20} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, subprograms: !17) -!1 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !18, scope: !2, type: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19) +!1 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !18, scope: !2, type: !3) !2 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b") !3 = !DISubroutineType(types: !4) !4 = !{!5} @@ -59,7 +59,6 @@ !14 = !DILocation(line: 3, column: 5, scope: !11) !15 = !DILocation(line: 4, column: 5, scope: !11) !16 = !DILocation(line: 5, column: 5, scope: !11) -!17 = !{!1} !18 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b") !19 = !{} !20 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Transforms/Scalarizer/dbginfo.ll =================================================================== --- test/Transforms/Scalarizer/dbginfo.ll +++ test/Transforms/Scalarizer/dbginfo.ll @@ -57,11 +57,10 @@ !llvm.module.flags = !{!18, !26} !llvm.ident = !{!19} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 194134) (llvm/trunk 194126)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 194134) (llvm/trunk 194126)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "/tmp/add.c", directory: "/home/richards/llvm/build") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f1", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !14) +!4 = distinct !DISubprogram(name: "f1", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !14) !5 = !DIFile(filename: "/tmp/add.c", directory: "/home/richards/llvm/build") !6 = !DISubroutineType(types: !7) !7 = !{null, !8, !8, !8} Index: test/Transforms/SimplifyCFG/basictest.ll =================================================================== --- test/Transforms/SimplifyCFG/basictest.ll +++ test/Transforms/SimplifyCFG/basictest.ll @@ -75,10 +75,10 @@ !0 = !{!1, !1, i64 0} !1 = !{!"foo"} !2 = !{i8 0, i8 2} -!3 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, subprograms: !{!6}, globals: !4) +!3 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !4) !4 = !{} !5 = !DILocation(line: 23, scope: !6) -!6 = distinct !DISubprogram(name: "foo", scope: !3, file: !7, line: 1, type: !DISubroutineType(types: !4), isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !4) +!6 = distinct !DISubprogram(name: "foo", scope: !3, file: !7, line: 1, type: !DISubroutineType(types: !4), isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !3, variables: !4) !7 = !DIFile(filename: "foo.c", directory: "/") !8 = !{i32 2, !"Dwarf Version", i32 2} !9 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/SimplifyCFG/branch-fold-dbg.ll =================================================================== --- test/Transforms/SimplifyCFG/branch-fold-dbg.ll +++ test/Transforms/SimplifyCFG/branch-fold-dbg.ll @@ -41,9 +41,9 @@ !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "foo", line: 231, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !15, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 231, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !15, scope: !1, type: !3) !1 = !DIFile(filename: "a.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang (trunk 129006)", isOptimized: true, emissionKind: FullDebug, file: !15, subprograms: !{!0}, enums: !4, retainedTypes: !4) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang (trunk 129006)", isOptimized: true, emissionKind: FullDebug, file: !15, enums: !4, retainedTypes: !4) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocation(line: 131, column: 2, scope: !0) Index: test/Transforms/SimplifyCFG/hoist-dbgvalue.ll =================================================================== --- test/Transforms/SimplifyCFG/hoist-dbgvalue.ll +++ test/Transforms/SimplifyCFG/hoist-dbgvalue.ll @@ -32,9 +32,9 @@ !llvm.module.flags = !{!21} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !20, scope: !1, type: !3) !1 = !DIFile(filename: "b.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !20, subprograms: !{!0}) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !20) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/Transforms/SimplifyCFG/trap-debugloc.ll =================================================================== --- test/Transforms/SimplifyCFG/trap-debugloc.ll +++ test/Transforms/SimplifyCFG/trap-debugloc.ll @@ -10,14 +10,13 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!10} -!0 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !8, scope: !1, type: !3) !1 = !DIFile(filename: "foo.c", directory: "/private/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-206.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !{}, retainedTypes: !{}, subprograms: !9) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-206.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !{}, retainedTypes: !{}) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocation(line: 4, column: 2, scope: !6) !6 = distinct !DILexicalBlock(line: 3, column: 12, file: !8, scope: !0) !7 = !DILocation(line: 5, column: 1, scope: !6) !8 = !DIFile(filename: "foo.c", directory: "/private/tmp") -!9 = !{!0} !10 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Transforms/StripSymbols/2010-06-30-StripDebug.ll =================================================================== --- test/Transforms/StripSymbols/2010-06-30-StripDebug.ll +++ test/Transforms/StripSymbols/2010-06-30-StripDebug.ll @@ -15,9 +15,9 @@ !llvm.module.flags = !{!13} !llvm.dbg.cu = !{!2} -!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !12, scope: !1, type: !3) !1 = !DIFile(filename: "b.c", directory: "/tmp") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !12, subprograms: !{!0}, globals: !{!8}) +!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !12, globals: !{!8}) !3 = !DISubroutineType(types: !4) !4 = !{null} !5 = !DILocalVariable(name: "y", line: 3, scope: !6, file: !1, type: !7) Index: test/Transforms/StripSymbols/2010-08-25-crash.ll =================================================================== --- test/Transforms/StripSymbols/2010-08-25-crash.ll +++ test/Transforms/StripSymbols/2010-08-25-crash.ll @@ -7,9 +7,9 @@ !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!14} -!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: !1, type: !3) +!0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2, file: !10, scope: !1, type: !3) !1 = !DIFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW") -!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.8 (trunk 112062)", isOptimized: true, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, subprograms: !12, globals: !13) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.8 (trunk 112062)", isOptimized: true, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11, globals: !13) !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) @@ -19,6 +19,5 @@ !9 = distinct !DILexicalBlock(line: 3, column: 11, file: !10, scope: !0) !10 = !DIFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW") !11 = !{} -!12 = !{!0} !13 = !{!6} !14 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Transforms/StripSymbols/strip-dead-debug-info.ll =================================================================== --- test/Transforms/StripSymbols/strip-dead-debug-info.ll +++ test/Transforms/StripSymbols/strip-dead-debug-info.ll @@ -30,17 +30,17 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!25} -!0 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !23, globals: !24) +!0 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !{}, retainedTypes: !{}, globals: !24) !1 = !DIFile(filename: "g.c", directory: "/tmp/") !2 = !{null} -!3 = distinct !DISubprogram(name: "bar", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !4) +!3 = distinct !DISubprogram(name: "bar", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !1, scope: null, type: !4) !4 = !DISubroutineType(types: !2) !5 = !DIFile(filename: "g.c", directory: "/tmp/") -!6 = distinct !DISubprogram(name: "fn", linkageName: "fn", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !7) +!6 = distinct !DISubprogram(name: "fn", linkageName: "fn", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !1, scope: null, type: !7) !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !11) +!10 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !1, scope: null, type: !11) !11 = !DISubroutineType(types: !12) !12 = !{!9, !9} !13 = !DILocalVariable(name: "bb", line: 5, scope: !14, file: !5, type: !9) @@ -53,6 +53,5 @@ !20 = !DILocation(line: 7, scope: !10) !21 = !DILocation(line: 10, scope: !22) !22 = distinct !DILexicalBlock(line: 7, column: 0, file: !1, scope: !10) -!23 = !{!3, !6, !10} !24 = !{!16, !17} !25 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Transforms/Util/simplify-dbg-declare-load.ll =================================================================== --- test/Transforms/Util/simplify-dbg-declare-load.ll +++ test/Transforms/Util/simplify-dbg-declare-load.ll @@ -34,7 +34,7 @@ !0 = !{i32 1, !"Debug Info Version", i32 3} !1 = !DILocalVariable(name: "cp", scope: !2, file: !3, line: 106, type: !12) -!2 = distinct !DISubprogram(name: "fastshortest", linkageName: "julia_fastshortest_6256", scope: null, file: !3, type: !4, isLocal: false, isDefinition: true, isOptimized: true, variables: !11) +!2 = distinct !DISubprogram(name: "fastshortest", linkageName: "julia_fastshortest_6256", scope: null, file: !3, type: !4, isLocal: false, isDefinition: true, isOptimized: true, unit: !18, variables: !11) !3 = !DIFile(filename: "grisu/fastshortest.jl", directory: ".") !4 = !DISubroutineType(types: !5) !5 = !{!6, !7} @@ -50,4 +50,4 @@ !15 = !DIBasicType(name: "Int32", size: 32, align: 32, encoding: DW_ATE_unsigned) !16 = !DIExpression() !17 = !DILocation(line: 106, scope: !2) -!18 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !3, subprograms: !{!2}) +!18 = distinct !DICompileUnit(language: DW_LANG_Julia, file: !3) Index: test/Transforms/Util/split-bit-piece.ll =================================================================== --- test/Transforms/Util/split-bit-piece.ll +++ test/Transforms/Util/split-bit-piece.ll @@ -29,7 +29,7 @@ !llvm.module.flags = !{!7} !llvm.ident = !{!8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256979) (llvm/trunk 257107)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, subprograms: !{!11}) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256979) (llvm/trunk 257107)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2) !1 = !DIFile(filename: "tsan_shadow_test.cc", directory: "/tmp") !2 = !{!3, !5} !3 = !DICompositeType(tag: DW_TAG_class_type, name: "FastState", file: !4, line: 91, size: 64, align: 64, identifier: "_ZTSN6__tsan9FastStateE") @@ -40,6 +40,6 @@ !8 = !{!"clang version 3.8.0 (trunk 256979) (llvm/trunk 257107)"} !9 = !DILocalVariable(name: "v1", scope: !10, file: !4, line: 136, type: !5) !10 = distinct !DILexicalBlock(scope: !11, file: !4, line: 136, column: 5) -!11 = distinct !DISubprogram(name: "SetHistorySize", linkageName: "_ZN6__tsan9FastState14SetHistorySizeEi", scope: !"_ZTSN6__tsan9FastStateE", file: !4, line: 135, isLocal: false, isDefinition: true, scopeLine: 135, flags: DIFlagPrototyped, isOptimized: false) +!11 = distinct !DISubprogram(name: "SetHistorySize", linkageName: "_ZN6__tsan9FastState14SetHistorySizeEi", scope: !"_ZTSN6__tsan9FastStateE", file: !4, line: 135, isLocal: false, isDefinition: true, scopeLine: 135, flags: DIFlagPrototyped, isOptimized: false, unit: !0) !12 = !DIExpression() !13 = !DILocation(line: 136, column: 5, scope: !10) Index: test/Transforms/Util/store-first-op.ll =================================================================== --- test/Transforms/Util/store-first-op.ll +++ test/Transforms/Util/store-first-op.ll @@ -24,11 +24,11 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!2} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257597)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, subprograms: !{!4}) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (https://github.com/llvm-mirror/clang 89dda3855cda574f355e6defa1d77bdae5053994) (llvm/trunk 257597)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) !1 = !DIFile(filename: "none", directory: ".") !2 = !{i32 2, !"Debug Info Version", i32 3} !3 = !DILocalVariable(name: "getU", scope: !4, file: !1, line: 25, type: !5) -!4 = distinct !DISubprogram(name: "multiply64", linkageName: "_ZN4llvm13ScaledNumbers10multiply64Emm", scope: null, file: !1, line: 22, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true) +!4 = distinct !DISubprogram(name: "multiply64", linkageName: "_ZN4llvm13ScaledNumbers10multiply64Emm", scope: null, file: !1, line: 22, isLocal: false, isDefinition: true, scopeLine: 23, flags: DIFlagPrototyped, isOptimized: true, unit: !0) !5 = !DICompositeType(tag: DW_TAG_class_type, scope: !4, file: !1, line: 25, size: 8, align: 8) !6 = !DIExpression() !7 = !DILocation(line: 25, column: 8, scope: !4) Index: test/Verifier/dbg-difile-crash.ll =================================================================== --- test/Verifier/dbg-difile-crash.ll +++ test/Verifier/dbg-difile-crash.ll @@ -2,9 +2,13 @@ ; CHECK: assembly parsed, but does not verify ; CHECK-NEXT: invalid file +define void @blah() !dbg !3 { + ret void +} + !llvm.module.flags = !{!0} !0 = !{i32 2, !"Debug Info Version", i32 3} !llvm.dbg.cu = !{!1} -!1 = distinct !DICompileUnit(file: !2, language: DW_LANG_C99, subprograms: !{!3}) +!1 = distinct !DICompileUnit(file: !2, language: DW_LANG_C99) !2 = !DIFile(filename: "file.c", directory: "/path/to/dir") -!3 = distinct !DISubprogram(name: "blah", file: !1) +!3 = distinct !DISubprogram(name: "blah", file: !1, unit: !1) Index: test/Verifier/dbg-invalid-retaintypes.ll =================================================================== --- test/Verifier/dbg-invalid-retaintypes.ll +++ test/Verifier/dbg-invalid-retaintypes.ll @@ -5,6 +5,6 @@ !llvm.module.flags = !{!3} !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: true, emissionKind: FullDebug, file: !2, retainedTypes: !1) -!1 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, scope: !2) +!1 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, scope: !2) !2 = !DIFile(filename: "/davide/test", directory: "/") !3 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Verifier/func-dbg.ll =================================================================== --- test/Verifier/func-dbg.ll +++ test/Verifier/func-dbg.ll @@ -14,12 +14,11 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "dwarf-test.c", directory: "test") !2 = !{} -!3 = !{!4, !5} -!4 = distinct !DISubprogram(name: "foo", scope: !0, isDefinition: true) -!5 = distinct !DISubprogram(name: "bar", scope: !0, isDefinition: true) +!4 = distinct !DISubprogram(name: "foo", scope: !0, isDefinition: true, unit: !0) +!5 = distinct !DISubprogram(name: "bar", scope: !0, isDefinition: true, unit: !0) !6 = !DILocation(line: 7, scope: !4) !7 = !{i32 2, !"Dwarf Version", i32 3} !8 = !{i32 1, !"Debug Info Version", i32 3} Index: test/Verifier/metadata-function-dbg.ll =================================================================== --- test/Verifier/metadata-function-dbg.ll +++ test/Verifier/metadata-function-dbg.ll @@ -16,8 +16,7 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !llvm.dbg.cu = !{!1} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !3) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2) !2 = !DIFile(filename: "t.c", directory: "/path/to/dir") -!3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2, unit: !1) !6 = !{} Index: test/tools/dsymutil/Inputs/frame-dw2.ll =================================================================== --- test/tools/dsymutil/Inputs/frame-dw2.ll +++ test/tools/dsymutil/Inputs/frame-dw2.ll @@ -42,15 +42,14 @@ !llvm.module.flags = !{!9, !10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 239176) (llvm/trunk 239190)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 239176) (llvm/trunk 239190)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "frame.c", directory: "/tmp") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 2} !10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{i32 1, !"PIC Level", i32 2} Index: test/tools/dsymutil/Inputs/frame-dw4.ll =================================================================== --- test/tools/dsymutil/Inputs/frame-dw4.ll +++ test/tools/dsymutil/Inputs/frame-dw4.ll @@ -42,15 +42,14 @@ !llvm.module.flags = !{!9, !10, !11} !llvm.ident = !{!12} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 239176) (llvm/trunk 239190)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 239176) (llvm/trunk 239190)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) !1 = !DIFile(filename: "frame.c", directory: "/tmp") !2 = !{} -!3 = !{!4, !8} -!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, variables: !2) +!8 = distinct !DISubprogram(name: "baz", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) !9 = !{i32 2, !"Dwarf Version", i32 4} !10 = !{i32 2, !"Debug Info Version", i32 3} !11 = !{i32 1, !"PIC Level", i32 2} Index: test/tools/gold/X86/Inputs/linkonce-weak.ll =================================================================== --- test/tools/gold/X86/Inputs/linkonce-weak.ll +++ test/tools/gold/X86/Inputs/linkonce-weak.ll @@ -6,11 +6,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "linkonce-weak.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/tools/gold/X86/linkonce-weak.ll =================================================================== --- test/tools/gold/X86/linkonce-weak.ll +++ test/tools/gold/X86/linkonce-weak.ll @@ -26,11 +26,10 @@ !llvm.module.flags = !{!7, !8} !llvm.ident = !{!9} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, subprograms: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) !1 = !DIFile(filename: "linkonce-weak.c", directory: ".") !2 = !{} -!3 = !{!4} -!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, variables: !2) +!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{i32 2, !"Dwarf Version", i32 4} Index: unittests/IR/MetadataTest.cpp =================================================================== --- unittests/IR/MetadataTest.cpp +++ unittests/IR/MetadataTest.cpp @@ -84,13 +84,19 @@ } DISubprogram *getSubprogram() { return DISubprogram::getDistinct(Context, nullptr, "", "", nullptr, 0, - nullptr, false, false, 0, nullptr, 0, 0, 0, - 0); + nullptr, false, false, 0, nullptr, + 0, 0, 0, false, nullptr); } DIScopeRef getSubprogramRef() { return getSubprogram()->getRef(); } DIFile *getFile() { return DIFile::getDistinct(Context, "file.c", "/path/to/dir"); } + DICompileUnit *getUnit() { + return DICompileUnit::getDistinct(Context, 1, getFile(), "clang", false, + "-g", 2, "", DICompileUnit::FullDebug, + getTuple(), getTuple(), getTuple(), + getTuple(), getTuple(), 0); + } DITypeRef getBasicType(StringRef Name) { return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name) ->getRef(); @@ -1308,7 +1314,6 @@ auto EmissionKind = DICompileUnit::FullDebug; MDTuple *EnumTypes = getTuple(); MDTuple *RetainedTypes = getTuple(); - MDTuple *Subprograms = getTuple(); MDTuple *GlobalVariables = getTuple(); MDTuple *ImportedEntities = getTuple(); uint64_t DWOId = 0x10000000c0ffee; @@ -1316,7 +1321,7 @@ auto *N = DICompileUnit::getDistinct( Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, - RetainedTypes, Subprograms, GlobalVariables, ImportedEntities, Macros, + RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId); EXPECT_EQ(dwarf::DW_TAG_compile_unit, N->getTag()); @@ -1330,7 +1335,6 @@ EXPECT_EQ(EmissionKind, N->getEmissionKind()); EXPECT_EQ(EnumTypes, N->getEnumTypes().get()); EXPECT_EQ(RetainedTypes, N->getRetainedTypes().get()); - EXPECT_EQ(Subprograms, N->getSubprograms().get()); EXPECT_EQ(GlobalVariables, N->getGlobalVariables().get()); EXPECT_EQ(ImportedEntities, N->getImportedEntities().get()); EXPECT_EQ(Macros, N->getMacros().get()); @@ -1348,7 +1352,6 @@ EXPECT_EQ(EmissionKind, Temp->getEmissionKind()); EXPECT_EQ(EnumTypes, Temp->getEnumTypes().get()); EXPECT_EQ(RetainedTypes, Temp->getRetainedTypes().get()); - EXPECT_EQ(Subprograms, Temp->getSubprograms().get()); EXPECT_EQ(GlobalVariables, Temp->getGlobalVariables().get()); EXPECT_EQ(ImportedEntities, Temp->getImportedEntities().get()); EXPECT_EQ(Macros, Temp->getMacros().get()); @@ -1376,14 +1379,7 @@ auto *N = DICompileUnit::getDistinct( Context, SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, - RetainedTypes, nullptr, nullptr, ImportedEntities, nullptr, DWOId); - - auto *Subprograms = MDTuple::getDistinct(Context, None); - EXPECT_EQ(nullptr, N->getSubprograms().get()); - N->replaceSubprograms(Subprograms); - EXPECT_EQ(Subprograms, N->getSubprograms().get()); - N->replaceSubprograms(nullptr); - EXPECT_EQ(nullptr, N->getSubprograms().get()); + RetainedTypes, nullptr, ImportedEntities, nullptr, DWOId); auto *GlobalVariables = MDTuple::getDistinct(Context, None); EXPECT_EQ(nullptr, N->getGlobalVariables().get()); @@ -1420,11 +1416,12 @@ MDTuple *TemplateParams = getTuple(); DISubprogram *Declaration = getSubprogram(); MDTuple *Variables = getTuple(); + DICompileUnit *Unit = getUnit(); auto *N = DISubprogram::get( Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, Flags, - IsOptimized, TemplateParams, Declaration, Variables); + IsOptimized, Unit, TemplateParams, Declaration, Variables); EXPECT_EQ(dwarf::DW_TAG_subprogram, N->getTag()); EXPECT_EQ(Scope, N->getScope()); @@ -1447,93 +1444,98 @@ EXPECT_EQ(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, getCompositeType(), Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, "other", LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, "other", File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, getFile(), Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line + 1, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, getSubroutineType(), IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, Flags, IsOptimized, - TemplateParams, Declaration, Variables)); + Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, !IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, !IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine + 1, ContainingType, Virtuality, - VirtualIndex, Flags, IsOptimized, + VirtualIndex, Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, getCompositeType(), Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality + 1, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex + 1, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - ~Flags, IsOptimized, TemplateParams, + ~Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, !IsOptimized, TemplateParams, + Flags, !IsOptimized, Unit, TemplateParams, + Declaration, Variables)); + EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, + Type, IsLocalToUnit, IsDefinition, ScopeLine, + ContainingType, Virtuality, VirtualIndex, + Flags, IsOptimized, nullptr, TemplateParams, + Declaration, Variables)); + EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, + Type, IsLocalToUnit, IsDefinition, ScopeLine, + ContainingType, Virtuality, VirtualIndex, + Flags, IsOptimized, Unit, getTuple(), Declaration, Variables)); - EXPECT_NE(N, - DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, - Type, IsLocalToUnit, IsDefinition, ScopeLine, - ContainingType, Virtuality, VirtualIndex, Flags, - IsOptimized, getTuple(), Declaration, Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, getSubprogram(), Variables)); EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, - Flags, IsOptimized, TemplateParams, + Flags, IsOptimized, Unit, TemplateParams, Declaration, getTuple())); TempDISubprogram Temp = N->clone(); Index: unittests/Transforms/Utils/Cloning.cpp =================================================================== --- unittests/Transforms/Utils/Cloning.cpp +++ unittests/Transforms/Utils/Cloning.cpp @@ -314,21 +314,6 @@ (Sub1 == NewFunc->getSubprogram() && Sub2 == OldFunc->getSubprogram())); } -// Test that the new subprogram entry was not added to the CU which doesn't -// contain the old subprogram entry. -TEST_F(CloneFunc, SubprogramInRightCU) { - EXPECT_FALSE(verifyModule(*M)); - - EXPECT_EQ(2U, Finder->compile_unit_count()); - - auto Iter = Finder->compile_units().begin(); - auto *CU1 = cast(*Iter); - Iter++; - auto *CU2 = cast(*Iter); - EXPECT_TRUE(CU1->getSubprograms().size() == 0 || - CU2->getSubprograms().size() == 0); -} - // Test that instructions in the old function still belong to it in the // metadata, while instruction in the new function belong to the new one. TEST_F(CloneFunc, InstructionOwnership) { @@ -393,7 +378,10 @@ EXPECT_EQ(OldFunc->getSubprogram(), cast(OldIntrin->getVariable()->getScope())); // New variable must belong to the New function - EXPECT_EQ(NewFunc->getSubprogram(), + llvm::errs()<<"NewFunc"<getSubprogram()<<"\n"; + llvm::errs()<<"NewIntrin->getVariable()->getScope()"<getVariable()->getScope()<<"\n"; + EXPECT_EQ(NewFunc->getSubprogram(), cast(NewIntrin->getVariable()->getScope())); } else if (DbgValueInst* OldIntrin = dyn_cast(&OldI)) { DbgValueInst* NewIntrin = dyn_cast(&NewI);