Index: include/llvm/IR/DIBuilder.h =================================================================== --- include/llvm/IR/DIBuilder.h +++ include/llvm/IR/DIBuilder.h @@ -434,21 +434,21 @@ /// \param Ty Variable Type. /// \param isLocalToUnit Boolean flag indicate whether this variable is /// externally visible or not. - /// \param Val llvm::Value of the variable. + /// \param Val Value of the variable, if a constant. /// \param Decl Reference to the corresponding declaration. DIGlobalVariable *createGlobalVariable(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool isLocalToUnit, - llvm::Constant *Val, + llvm::ConstantData *Val, MDNode *Decl = nullptr); /// Identical to createGlobalVariable /// except that the resulting DbgNode is temporary and meant to be RAUWed. DIGlobalVariable *createTempGlobalVariableFwdDecl( DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, - unsigned LineNo, DIType *Ty, bool isLocalToUnit, llvm::Constant *Val, - MDNode *Decl = nullptr); + unsigned LineNo, DIType *Ty, bool isLocalToUnit, + llvm::ConstantData *Val, MDNode *Decl = nullptr); /// Create a new descriptor for an auto variable. This is a local variable /// that is not a subprogram parameter. Index: include/llvm/IR/DebugInfoMetadata.h =================================================================== --- include/llvm/IR/DebugInfoMetadata.h +++ include/llvm/IR/DebugInfoMetadata.h @@ -14,6 +14,7 @@ #ifndef LLVM_IR_DEBUGINFOMETADATA_H #define LLVM_IR_DEBUGINFOMETADATA_H +#include "llvm/IR/Constants.h" #include "llvm/IR/Metadata.h" #include "llvm/Support/Dwarf.h" @@ -1841,26 +1842,27 @@ static DIGlobalVariable * getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DITypeRef Type, - bool IsLocalToUnit, bool IsDefinition, Constant *Variable, - DIDerivedType *StaticDataMemberDeclaration, StorageType Storage, - bool ShouldCreate = true) { + bool IsLocalToUnit, bool IsDefinition, + ConstantData *ConstantValue, DIDerivedType *StaticDataMemberDeclaration, + StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, LinkageName), File, Line, Type, IsLocalToUnit, IsDefinition, - Variable ? ConstantAsMetadata::get(Variable) : nullptr, + ConstantValue ? ConstantAsMetadata::get(ConstantValue) + : nullptr, StaticDataMemberDeclaration, Storage, ShouldCreate); } static DIGlobalVariable * getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, Metadata *Variable, + bool IsLocalToUnit, bool IsDefinition, Metadata *ConstantValue, Metadata *StaticDataMemberDeclaration, StorageType Storage, bool ShouldCreate = true); TempDIGlobalVariable cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getLinkageName(), getFile(), getLine(), getType(), isLocalToUnit(), - isDefinition(), getVariable(), + isDefinition(), getConstantValue(), getStaticDataMemberDeclaration()); } @@ -1868,17 +1870,19 @@ DEFINE_MDNODE_GET(DIGlobalVariable, (DIScope * Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DITypeRef Type, - bool IsLocalToUnit, bool IsDefinition, Constant *Variable, + bool IsLocalToUnit, bool IsDefinition, + ConstantData *ConstantValue, DIDerivedType *StaticDataMemberDeclaration), (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, - IsDefinition, Variable, StaticDataMemberDeclaration)) + IsDefinition, ConstantValue, StaticDataMemberDeclaration)) DEFINE_MDNODE_GET(DIGlobalVariable, (Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, Metadata *Variable, + bool IsLocalToUnit, bool IsDefinition, + Metadata *ConstantValue, Metadata *StaticDataMemberDeclaration), (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, - IsDefinition, Variable, StaticDataMemberDeclaration)) + IsDefinition, ConstantValue, StaticDataMemberDeclaration)) TempDIGlobalVariable clone() const { return cloneImpl(); } @@ -1886,9 +1890,9 @@ bool isDefinition() const { return IsDefinition; } StringRef getDisplayName() const { return getStringOperand(4); } StringRef getLinkageName() const { return getStringOperand(5); } - Constant *getVariable() const { - if (auto *C = cast_or_null(getRawVariable())) - return dyn_cast(C->getValue()); + ConstantData *getConstantValue() const { + if (auto *C = cast_or_null(getRawConstantValue())) + return dyn_cast(C->getValue()); return nullptr; } DIDerivedType *getStaticDataMemberDeclaration() const { @@ -1896,7 +1900,7 @@ } MDString *getRawLinkageName() const { return getOperandAs(5); } - Metadata *getRawVariable() const { return getOperand(6); } + Metadata *getRawConstantValue() const { return getOperand(6); } Metadata *getRawStaticDataMemberDeclaration() const { return getOperand(7); } static bool classof(const Metadata *MD) { Index: include/llvm/IR/GlobalObject.h =================================================================== --- include/llvm/IR/GlobalObject.h +++ include/llvm/IR/GlobalObject.h @@ -74,12 +74,18 @@ /// Check if this has any metadata. bool hasMetadata() const { return hasMetadataHashEntry(); } - /// Get the current metadata attachment, if any. + /// Get the current metadata attachments for the given kind, if any. /// - /// Returns \c nullptr if such an attachment is missing. + /// The functions that return an MDNode require that the function have at most a + /// single attachment of the given kind, and return \c nullptr if such an + /// attachment is missing. /// @{ MDNode *getMetadata(unsigned KindID) const; MDNode *getMetadata(StringRef Kind) const; + void getMetadata(unsigned KindID, + SmallVectorImpl> &MDs) const; + void getMetadata(StringRef Kind, + SmallVectorImpl> &MDs) const; /// @} /// Set a particular kind of metadata attachment. @@ -87,18 +93,24 @@ /// Sets the given attachment to \c MD, erasing it if \c MD is \c nullptr or /// replacing it if it already exists. /// @{ - void setMetadata(unsigned KindID, MDNode *MD); - void setMetadata(StringRef Kind, MDNode *MD); + void setMetadata(unsigned KindID, MDNode *N); + void setMetadata(StringRef Kind, MDNode *N); + /// @} + + /// Add a metadata attachment with the given offset. + /// @{ + void addMetadata(unsigned KindID, unsigned Offset, MDNode *MD); + void addMetadata(StringRef Kind, unsigned Offset, MDNode *MD); /// @} /// Get all current metadata attachments. - void - getAllMetadata(SmallVectorImpl> &MDs) const; + void getAllMetadata( + SmallVectorImpl> &MDs) const; - /// Drop metadata not in the given list. - /// - /// Drop all metadata from \c this not included in \c KnownIDs. - void dropUnknownMetadata(ArrayRef KnownIDs); + void eraseMetadata(unsigned KindID); + + /// Copy metadata from Src, adjusting offsets by Offset. + void copyMetadata(const GlobalObject *Src, unsigned Offset); void copyAttributesFrom(const GlobalValue *Src) override; @@ -108,7 +120,6 @@ V->getValueID() == Value::GlobalVariableVal; } -protected: void clearMetadata(); private: Index: include/llvm/IR/GlobalVariable.h =================================================================== --- include/llvm/IR/GlobalVariable.h +++ include/llvm/IR/GlobalVariable.h @@ -27,8 +27,9 @@ namespace llvm { -class Module; class Constant; +class DIGlobalVariable; +class Module; template class SymbolTableListTraits; class GlobalVariable : public GlobalObject, public ilist_node { @@ -163,6 +164,10 @@ /// drops not only the reference to the initializer but also to any metadata. void dropAllReferences(); + void addDebugInfo(DIGlobalVariable *GV); + void getDebugInfo( + SmallVectorImpl> &GVs) const; + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *V) { return V->getValueID() == Value::GlobalVariableVal; Index: lib/AsmParser/LLParser.cpp =================================================================== --- lib/AsmParser/LLParser.cpp +++ lib/AsmParser/LLParser.cpp @@ -1701,12 +1701,19 @@ /// ParseGlobalObjectMetadataAttachment /// ::= !dbg !57 bool LLParser::ParseGlobalObjectMetadataAttachment(GlobalObject &GO) { - unsigned MDK; + assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata attachment"); + + std::string Name = Lex.getStrVal(); + unsigned Kind = M->getMDKindID(Name); + Lex.Lex(); + unsigned Offset; + if (ParseUInt32(Offset)) + return true; MDNode *N; - if (ParseMetadataAttachment(MDK, N)) + if (ParseMDNode(N)) return true; - GO.setMetadata(MDK, N); + GO.addMetadata(Kind, Offset, N); return false; } @@ -4096,15 +4103,15 @@ OPTIONAL(type, MDField, ); \ OPTIONAL(isLocal, MDBoolField, ); \ OPTIONAL(isDefinition, MDBoolField, (true)); \ - OPTIONAL(variable, MDConstant, ); \ + OPTIONAL(constantValue, MDConstant, ); \ OPTIONAL(declaration, MDField, ); PARSE_MD_FIELDS(); #undef VISIT_MD_FIELDS - Result = GET_OR_DISTINCT(DIGlobalVariable, - (Context, scope.Val, name.Val, linkageName.Val, - file.Val, line.Val, type.Val, isLocal.Val, - isDefinition.Val, variable.Val, declaration.Val)); + Result = GET_OR_DISTINCT( + DIGlobalVariable, (Context, scope.Val, name.Val, linkageName.Val, + file.Val, line.Val, type.Val, isLocal.Val, + isDefinition.Val, constantValue.Val, declaration.Val)); return false; } Index: lib/Bitcode/Reader/BitcodeReader.cpp =================================================================== --- lib/Bitcode/Reader/BitcodeReader.cpp +++ lib/Bitcode/Reader/BitcodeReader.cpp @@ -4165,7 +4165,7 @@ MDNode *MD = MetadataList.getMDNodeFwdRefOrNull(Record[I + 1]); if (!MD) return error("Invalid metadata attachment"); - GO.setMetadata(K->second, MD); + GO.addMetadata(K->second, 0, MD); } return std::error_code(); } Index: lib/Bitcode/Writer/BitcodeWriter.cpp =================================================================== --- lib/Bitcode/Writer/BitcodeWriter.cpp +++ lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1634,7 +1634,7 @@ Record.push_back(VE.getMetadataOrNullID(N->getType())); Record.push_back(N->isLocalToUnit()); Record.push_back(N->isDefinition()); - Record.push_back(VE.getMetadataOrNullID(N->getRawVariable())); + Record.push_back(VE.getMetadataOrNullID(N->getRawConstantValue())); Record.push_back(VE.getMetadataOrNullID(N->getStaticDataMemberDeclaration())); Stream.EmitRecord(bitc::METADATA_GLOBAL_VAR, Record, Abbrev); @@ -1824,11 +1824,11 @@ void ModuleBitcodeWriter::pushGlobalMetadataAttachment( SmallVectorImpl &Record, const GlobalObject &GO) { // [n x [id, mdnode]] - SmallVector, 4> MDs; + SmallVector, 4> MDs; GO.getAllMetadata(MDs); for (const auto &I : MDs) { - Record.push_back(I.first); - Record.push_back(VE.getMetadataID(I.second)); + Record.push_back(std::get<0>(I)); + Record.push_back(VE.getMetadataID(std::get<2>(I))); } } Index: lib/Bitcode/Writer/ValueEnumerator.cpp =================================================================== --- lib/Bitcode/Writer/ValueEnumerator.cpp +++ lib/Bitcode/Writer/ValueEnumerator.cpp @@ -343,22 +343,25 @@ EnumerateValueSymbolTable(M.getValueSymbolTable()); EnumerateNamedMetadata(M); - SmallVector, 8> MDs; + SmallVector, 8> GlobalMDs; for (const GlobalVariable &GV : M.globals()) { - GV.getAllMetadata(MDs); - for (const auto &I : MDs) - EnumerateMetadata(&GV, I.second); + GV.getAllMetadata(GlobalMDs); + for (const auto &I : GlobalMDs) + EnumerateMetadata(&GV, std::get<2>(I)); + GlobalMDs.clear(); } + SmallVector, 8> MDs; // Enumerate types used by function bodies and argument lists. for (const Function &F : M) { for (const Argument &A : F.args()) EnumerateType(A.getType()); // Enumerate metadata attached to this function. - F.getAllMetadata(MDs); - for (const auto &I : MDs) - EnumerateMetadata(&F, I.second); + F.getAllMetadata(GlobalMDs); + for (const auto &I : GlobalMDs) + EnumerateMetadata(&F, std::get<2>(I)); + GlobalMDs.clear(); for (const BasicBlock &BB : F) for (const Instruction &I : BB) { @@ -382,7 +385,6 @@ EnumerateAttributes(II->getAttributes()); // Enumerate metadata attached with this instruction. - MDs.clear(); I.getAllMetadataOtherThanDebugLoc(MDs); for (unsigned i = 0, e = MDs.size(); i != e; ++i) EnumerateMetadata(&F, MDs[i].second); Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.h =================================================================== --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -97,7 +97,9 @@ void applyStmtList(DIE &D); /// getOrCreateGlobalVariableDIE - get or create global variable DIE. - DIE *getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV); + DIE *getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV, + const GlobalVariable *Global, + unsigned Offset); /// addLabelAddress - Add a dwarf label attribute data and value using /// either DW_FORM_addr or DW_FORM_GNU_addr_index. Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -73,36 +73,9 @@ Asm->OutStreamer->hasRawTextSupport() ? 0 : getUniqueID()); } -// Return const expression if value is a GEP to access merged global -// constant. e.g. -// i8* getelementptr ({ i8, i8, i8, i8 }* @_MergedGlobals, i32 0, i32 0) -static const ConstantExpr *getMergedGlobalExpr(const Value *V) { - const ConstantExpr *CE = dyn_cast_or_null(V); - if (!CE || CE->getNumOperands() != 3 || - CE->getOpcode() != Instruction::GetElementPtr) - return nullptr; - - // First operand points to a global struct. - Value *Ptr = CE->getOperand(0); - GlobalValue *GV = dyn_cast(Ptr); - if (!GV || !isa(GV->getValueType())) - return nullptr; - - // Second operand is zero. - const ConstantInt *CI = dyn_cast_or_null(CE->getOperand(1)); - if (!CI || !CI->isZero()) - return nullptr; - - // Third operand is offset. - if (!isa(CE->getOperand(2))) - return nullptr; - - return CE; -} - /// getOrCreateGlobalVariableDIE - get or create global variable DIE. DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE( - const DIGlobalVariable *GV) { + const DIGlobalVariable *GV, const GlobalVariable *Global, unsigned Offset) { // Check for pre-existence. if (DIE *Die = getDIE(GV)) return Die; @@ -147,7 +120,7 @@ // Add location. bool addToAccelTable = false; - if (auto *Global = dyn_cast_or_null(GV->getVariable())) { + if (Global) { addToAccelTable = true; DIELoc *Loc = new (DIEValueAllocator) DIELoc; const MCSymbol *Sym = Asm->getSymbol(Global); @@ -182,28 +155,19 @@ } else { DD->addArangeLabel(SymbolCU(this, Sym)); addOpAddress(*Loc, Sym); + if (Offset != 0) { + addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_constu); + addUInt(*Loc, dwarf::DW_FORM_udata, Offset); + addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus); + } } addBlock(*VariableDIE, dwarf::DW_AT_location, Loc); if (DD->useAllLinkageNames()) addLinkageName(*VariableDIE, GV->getLinkageName()); } else if (const ConstantInt *CI = - dyn_cast_or_null(GV->getVariable())) { + dyn_cast_or_null(GV->getConstantValue())) { addConstantValue(*VariableDIE, CI, GTy); - } else if (const ConstantExpr *CE = getMergedGlobalExpr(GV->getVariable())) { - addToAccelTable = true; - // GV is a merged global. - DIELoc *Loc = new (DIEValueAllocator) DIELoc; - auto *Ptr = cast(CE->getOperand(0)); - MCSymbol *Sym = Asm->getSymbol(Ptr); - DD->addArangeLabel(SymbolCU(this, Sym)); - addOpAddress(*Loc, Sym); - addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_constu); - SmallVector Idx(CE->op_begin() + 1, CE->op_end()); - addUInt(*Loc, dwarf::DW_FORM_udata, - Asm->getDataLayout().getIndexedOffsetInType(Ptr->getValueType(), Idx)); - addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus); - addBlock(*VariableDIE, dwarf::DW_AT_location, Loc); } if (addToAccelTable) { @@ -665,7 +629,7 @@ else if (auto *T = dyn_cast(Entity)) EntityDie = getOrCreateTypeDIE(T); else if (auto *GV = dyn_cast(Entity)) - EntityDie = getOrCreateGlobalVariableDIE(GV); + EntityDie = getOrCreateGlobalVariableDIE(GV, nullptr, 0); else EntityDie = getDIE(Entity); assert(EntityDie); Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -466,22 +466,38 @@ const Module *M = MMI->getModule(); - unsigned NumDebugCUs = 0; - for (DICompileUnit *CUNode : M->debug_compile_units()) { - (void)CUNode; - ++NumDebugCUs; - } - + unsigned NumDebugCUs = std::distance(M->debug_compile_units_begin(), + M->debug_compile_units_end()); // Tell MMI whether we have debug info. MMI->setDebugInfoAvailability(NumDebugCUs > 0); SingleCU = NumDebugCUs == 1; + for (DICompileUnit *CUNode : M->debug_compile_units()) + constructDwarfCompileUnit(CUNode); + + std::map> + GVMap; + for (const GlobalVariable &Global : M->globals()) { + SmallVector, 1> GVs; + Global.getDebugInfo(GVs); + for (auto &GV : GVs) + GVMap[GV.second] = {&Global, GV.first}; + } + for (DICompileUnit *CUNode : M->debug_compile_units()) { - DwarfCompileUnit &CU = constructDwarfCompileUnit(CUNode); + DwarfCompileUnit &CU = *CUMap.lookup(CUNode); for (auto *IE : CUNode->getImportedEntities()) CU.addImportedEntity(IE); - for (auto *GV : CUNode->getGlobalVariables()) - CU.getOrCreateGlobalVariableDIE(GV); + for (auto *GV : CUNode->getGlobalVariables()) { + const GlobalVariable *Global = nullptr; + unsigned Offset = 0; + auto I = GVMap.find(GV); + if (I != GVMap.end()) { + Global = I->second.first; + Offset = I->second.second; + } + CU.getOrCreateGlobalVariableDIE(GV, Global, Offset); + } for (auto *Ty : CUNode->getEnumTypes()) { // The enum types array by design contains pointers to // MDNodes rather than DIRefs. Unique them here. Index: lib/CodeGen/GlobalMerge.cpp =================================================================== --- lib/CodeGen/GlobalMerge.cpp +++ lib/CodeGen/GlobalMerge.cpp @@ -440,10 +440,14 @@ M, MergedTy, isConst, GlobalValue::PrivateLinkage, MergedInit, "_MergedGlobals", nullptr, GlobalVariable::NotThreadLocal, AddrSpace); + const StructLayout *MergedLayout = DL.getStructLayout(MergedTy); + for (ssize_t k = i, idx = 0; k != j; k = GlobalSet.find_next(k), ++idx) { GlobalValue::LinkageTypes Linkage = Globals[k]->getLinkage(); std::string Name = Globals[k]->getName(); + MergedGV->copyMetadata(Globals[k], MergedLayout->getElementOffset(idx)); + Constant *Idx[2] = { ConstantInt::get(Int32Ty, 0), ConstantInt::get(Int32Ty, idx), Index: lib/IR/AsmWriter.cpp =================================================================== --- lib/IR/AsmWriter.cpp +++ lib/IR/AsmWriter.cpp @@ -887,10 +887,10 @@ } void SlotTracker::processGlobalObjectMetadata(const GlobalObject &GO) { - SmallVector, 4> MDs; + SmallVector, 4> MDs; GO.getAllMetadata(MDs); for (auto &MD : MDs) - CreateMetadataSlot(MD.second); + CreateMetadataSlot(std::get<2>(MD)); } void SlotTracker::processFunctionMetadata(const Function &F) { @@ -1843,7 +1843,7 @@ Printer.printMetadata("type", N->getRawType()); Printer.printBool("isLocal", N->isLocalToUnit()); Printer.printBool("isDefinition", N->isDefinition()); - Printer.printMetadata("variable", N->getRawVariable()); + Printer.printMetadata("constantValue", N->getRawConstantValue()); Printer.printMetadata("declaration", N->getRawStaticDataMemberDeclaration()); Out << ")"; } @@ -2105,6 +2105,9 @@ void printMetadataAttachments( const SmallVectorImpl> &MDs, StringRef Separator); + void printGlobalMetadataAttachments( + const SmallVectorImpl> &MDs, + StringRef Separator); // printInfoComment - Print a little comment after the instruction indicating // which slot it occupies. @@ -2471,9 +2474,9 @@ if (GV->getAlignment()) Out << ", align " << GV->getAlignment(); - SmallVector, 4> MDs; + SmallVector, 4> MDs; GV->getAllMetadata(MDs); - printMetadataAttachments(MDs, ", "); + printGlobalMetadataAttachments(MDs, ", "); printInfoComment(*GV); } @@ -2673,9 +2676,9 @@ writeOperand(F->getPersonalityFn(), /*PrintType=*/true); } - SmallVector, 4> MDs; + SmallVector, 4> MDs; F->getAllMetadata(MDs); - printMetadataAttachments(MDs, " "); + printGlobalMetadataAttachments(MDs, " "); if (F->isDeclaration()) { Out << '\n'; @@ -3186,6 +3189,29 @@ } } +void AssemblyWriter::printGlobalMetadataAttachments( + const SmallVectorImpl> &MDs, + StringRef Separator) { + if (MDs.empty()) + return; + + if (MDNames.empty()) + std::get<2>(MDs[0])->getContext().getMDKindNames(MDNames); + + for (const auto &I : MDs) { + unsigned Kind = std::get<0>(I); + Out << Separator; + if (Kind < MDNames.size()) { + Out << "!"; + printMetadataIdentifier(MDNames[Kind], Out); + } else + Out << "!"; + Out << ' ' << std::get<1>(I) << ' '; + WriteAsOperandInternal(Out, std::get<2>(I), &TypePrinter, &Machine, + TheModule); + } +} + void AssemblyWriter::writeMDNode(unsigned Slot, const MDNode *Node) { Out << '!' << Slot << " = "; printMDNodeBody(Node); Index: lib/IR/DIBuilder.cpp =================================================================== --- lib/IR/DIBuilder.cpp +++ lib/IR/DIBuilder.cpp @@ -556,7 +556,7 @@ DIGlobalVariable *DIBuilder::createGlobalVariable( DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F, - unsigned LineNumber, DIType *Ty, bool isLocalToUnit, Constant *Val, + unsigned LineNumber, DIType *Ty, bool isLocalToUnit, ConstantData *Val, MDNode *Decl) { checkGlobalVariableScope(Context); @@ -570,7 +570,7 @@ DIGlobalVariable *DIBuilder::createTempGlobalVariableFwdDecl( DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F, - unsigned LineNumber, DIType *Ty, bool isLocalToUnit, Constant *Val, + unsigned LineNumber, DIType *Ty, bool isLocalToUnit, ConstantData *Val, MDNode *Decl) { checkGlobalVariableScope(Context); Index: lib/IR/LLVMContextImpl.h =================================================================== --- lib/IR/LLVMContextImpl.h +++ lib/IR/LLVMContextImpl.h @@ -751,23 +751,23 @@ Metadata *Type; bool IsLocalToUnit; bool IsDefinition; - Metadata *Variable; + Metadata *ConstantValue; Metadata *StaticDataMemberDeclaration; MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, Metadata *Variable, + bool IsLocalToUnit, bool IsDefinition, Metadata *ConstantValue, Metadata *StaticDataMemberDeclaration) : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File), Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit), - IsDefinition(IsDefinition), Variable(Variable), + IsDefinition(IsDefinition), ConstantValue(ConstantValue), StaticDataMemberDeclaration(StaticDataMemberDeclaration) {} MDNodeKeyImpl(const DIGlobalVariable *N) : Scope(N->getRawScope()), Name(N->getRawName()), LinkageName(N->getRawLinkageName()), File(N->getRawFile()), Line(N->getLine()), Type(N->getRawType()), IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()), - Variable(N->getRawVariable()), + ConstantValue(N->getRawConstantValue()), StaticDataMemberDeclaration(N->getRawStaticDataMemberDeclaration()) {} bool isKeyOf(const DIGlobalVariable *RHS) const { @@ -776,13 +776,13 @@ File == RHS->getRawFile() && Line == RHS->getLine() && Type == RHS->getRawType() && IsLocalToUnit == RHS->isLocalToUnit() && IsDefinition == RHS->isDefinition() && - Variable == RHS->getRawVariable() && + ConstantValue == RHS->getRawConstantValue() && StaticDataMemberDeclaration == RHS->getRawStaticDataMemberDeclaration(); } unsigned getHashValue() const { return hash_combine(Scope, Name, LinkageName, File, Line, Type, - IsLocalToUnit, IsDefinition, Variable, + IsLocalToUnit, IsDefinition, ConstantValue, StaticDataMemberDeclaration); } }; @@ -997,6 +997,30 @@ } }; +/// Multimap-like storage for metadata attachments for globals. This differs +/// from MDAttachmentMap in two ways: +/// 1) It allows multiple attachments per metadata kind. +/// 2) It allows a byte offset to be associated with each metadata attachment. +/// This is normally useful for associating metadata with a particular +/// location within a global, and permits a simple mechanism for global merge +/// and other passes that re-arrange globals to copy metadata with an offset. +class MDGlobalAttachmentMap { + struct Attachment { + unsigned MDKind; + unsigned Offset; + TrackingMDNodeRef Node; + }; + SmallVector Attachments; + +public: + bool empty() const { return Attachments.empty(); } + + void get(unsigned ID, SmallVectorImpl> &Result); + void add(unsigned ID, unsigned Offset, MDNode &MD); + void erase(unsigned ID); + void getAll(SmallVectorImpl> &Result) const; +}; + class LLVMContextImpl { public: /// OwnedModules - The set of modules instantiated in this context, and which @@ -1108,7 +1132,7 @@ DenseMap InstructionMetadata; /// Collection of per-GlobalObject metadata used in this context. - DenseMap GlobalObjectMetadata; + DenseMap GlobalObjectMetadata; /// DiscriminatorTable - This table maps file:line locations to an /// integer representing the next DWARF path discriminator to assign to Index: lib/IR/Metadata.cpp =================================================================== --- lib/IR/Metadata.cpp +++ lib/IR/Metadata.cpp @@ -1125,6 +1125,40 @@ array_pod_sort(Result.begin(), Result.end()); } +void MDGlobalAttachmentMap::add(unsigned ID, unsigned Offset, MDNode &MD) { + Attachments.push_back({ID, Offset, TrackingMDNodeRef(&MD)}); +} + +void MDGlobalAttachmentMap::get( + unsigned ID, SmallVectorImpl> &Result) { + for (auto A : Attachments) + if (A.MDKind == ID) + Result.push_back({A.Offset, A.Node}); +} + +void MDGlobalAttachmentMap::erase(unsigned ID) { + auto Follower = Attachments.begin(); + for (auto Leader = Attachments.begin(), E = Attachments.end(); Leader != E; + ++Leader) { + if (Leader->MDKind != ID) { + if (Follower != Leader) + *Follower = std::move(*Leader); + ++Follower; + } + } + Attachments.resize(Follower - Attachments.begin()); +} + +void MDGlobalAttachmentMap::getAll( + SmallVectorImpl> &Result) const { + for (auto &A : Attachments) + Result.emplace_back(A.MDKind, A.Offset, A.Node); + + // Sort the resulting array so it is stable. + if (Result.size() > 1) + array_pod_sort(Result.begin(), Result.end()); +} + void Instruction::setMetadata(StringRef Kind, MDNode *Node) { if (!Node && !hasMetadata()) return; @@ -1281,27 +1315,36 @@ setHasMetadataHashEntry(false); } -MDNode *GlobalObject::getMetadata(unsigned KindID) const { +void GlobalObject::getMetadata( + unsigned KindID, + SmallVectorImpl> &MDs) const { if (!hasMetadata()) - return nullptr; - return getContext().pImpl->GlobalObjectMetadata[this].lookup(KindID); + return; + return getContext().pImpl->GlobalObjectMetadata[this].get(KindID, MDs); } -MDNode *GlobalObject::getMetadata(StringRef Kind) const { +void GlobalObject::getMetadata( + StringRef Kind, SmallVectorImpl> &MDs) const { if (!hasMetadata()) - return nullptr; - return getMetadata(getContext().getMDKindID(Kind)); + return; + getMetadata(getContext().getMDKindID(Kind), MDs); } -void GlobalObject::setMetadata(unsigned KindID, MDNode *MD) { +void GlobalObject::addMetadata(unsigned KindID, unsigned Offset, MDNode *MD) { if (MD) { if (!hasMetadata()) setHasMetadataHashEntry(true); - getContext().pImpl->GlobalObjectMetadata[this].set(KindID, *MD); + getContext().pImpl->GlobalObjectMetadata[this].add(KindID, Offset, *MD); return; } +} +void GlobalObject::addMetadata(StringRef Kind, unsigned Offset, MDNode *MD) { + addMetadata(getContext().getMDKindID(Kind), Offset, MD); +} + +void GlobalObject::eraseMetadata(unsigned KindID) { // Nothing to unset. if (!hasMetadata()) return; @@ -1312,14 +1355,8 @@ clearMetadata(); } -void GlobalObject::setMetadata(StringRef Kind, MDNode *MD) { - if (!MD && !hasMetadata()) - return; - setMetadata(getContext().getMDKindID(Kind), MD); -} - void GlobalObject::getAllMetadata( - SmallVectorImpl> &MDs) const { + SmallVectorImpl> &MDs) const { MDs.clear(); if (!hasMetadata()) @@ -1328,33 +1365,42 @@ getContext().pImpl->GlobalObjectMetadata[this].getAll(MDs); } -void GlobalObject::dropUnknownMetadata(ArrayRef KnownIDs) { +void GlobalObject::clearMetadata() { if (!hasMetadata()) return; - if (KnownIDs.empty()) { - clearMetadata(); - return; - } + getContext().pImpl->GlobalObjectMetadata.erase(this); + setHasMetadataHashEntry(false); +} - SmallSet KnownSet; - KnownSet.insert(KnownIDs.begin(), KnownIDs.end()); +void GlobalObject::copyMetadata(const GlobalObject *Other, unsigned Offset) { + SmallVector, 1> MDs; + Other->getAllMetadata(MDs); + for (auto &MD : MDs) + addMetadata(std::get<0>(MD), std::get<1>(MD) + Offset, std::get<2>(MD)); +} - auto &Store = getContext().pImpl->GlobalObjectMetadata[this]; - assert(!Store.empty()); +void GlobalObject::setMetadata(unsigned KindID, MDNode *N) { + eraseMetadata(KindID); + if (N) + addMetadata(KindID, 0, N); +} - Store.remove_if([&KnownSet](const std::pair &I) { - return !KnownSet.count(I.first); - }); +void GlobalObject::setMetadata(StringRef Kind, MDNode *N) { + setMetadata(getContext().getMDKindID(Kind), N); +} - if (Store.empty()) - clearMetadata(); +MDNode *GlobalObject::getMetadata(unsigned KindID) const { + SmallVector, 1> MDs; + getMetadata(KindID, MDs); + assert(MDs.size() <= 1); + if (MDs.empty()) + return nullptr; + assert(MDs[0].first == 0); + return MDs[0].second; } -void GlobalObject::clearMetadata() { - if (!hasMetadata()) - return; - getContext().pImpl->GlobalObjectMetadata.erase(this); - setHasMetadataHashEntry(false); +MDNode *GlobalObject::getMetadata(StringRef Kind) const { + return getMetadata(getContext().getMDKindID(Kind)); } void Function::setSubprogram(DISubprogram *SP) { @@ -1364,3 +1410,15 @@ DISubprogram *Function::getSubprogram() const { return cast_or_null(getMetadata(LLVMContext::MD_dbg)); } + +void GlobalVariable::addDebugInfo(DIGlobalVariable *GV) { + addMetadata(LLVMContext::MD_dbg, 0, GV); +} + +void GlobalVariable::getDebugInfo( + SmallVectorImpl> &GVs) const { + SmallVector, 1> MDs; + getMetadata(LLVMContext::MD_dbg, MDs); + for (auto &MD : MDs) + GVs.push_back({MD.first, cast(MD.second)}); +} Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -458,7 +458,7 @@ void verifyFunctionAttrs(FunctionType *FT, AttributeSet Attrs, const Value *V); void verifyFunctionMetadata( - const SmallVector, 4> MDs); + const SmallVector, 4> MDs); void visitConstantExprsRecursively(const Constant *EntryC); void visitConstantExpr(const ConstantExpr *CE); @@ -1098,10 +1098,10 @@ AssertDI(N.getTag() == dwarf::DW_TAG_variable, "invalid tag", &N); AssertDI(!N.getName().empty(), "missing global variable name", &N); - if (auto *V = N.getRawVariable()) { + if (auto *V = N.getRawConstantValue()) { AssertDI(isa(V) && - !isa(cast(V)->getValue()), - "invalid global varaible ref", &N, V); + isa(cast(V)->getValue()), + "invalid constant value", &N, V); visitConstantExprsRecursively(cast(V)->getValue()); } if (auto *Member = N.getRawStaticDataMemberDeclaration()) { @@ -1574,13 +1574,13 @@ } void Verifier::verifyFunctionMetadata( - const SmallVector, 4> MDs) { + const SmallVector, 4> MDs) { if (MDs.empty()) return; for (const auto &Pair : MDs) { - if (Pair.first == LLVMContext::MD_prof) { - MDNode *MD = Pair.second; + if (std::get<0>(Pair) == LLVMContext::MD_prof) { + MDNode *MD = std::get<2>(Pair); Assert(MD->getNumOperands() == 2, "!prof annotations should have exactly 2 operands", MD); @@ -1944,7 +1944,7 @@ "Functions returns a token but isn't an intrinsic", &F); // Get the function metadata attachments. - SmallVector, 4> MDs; + SmallVector, 4> MDs; F.getAllMetadata(MDs); assert(F.hasMetadata() != MDs.empty() && "Bit out-of-sync"); verifyFunctionMetadata(MDs); @@ -1961,12 +1961,12 @@ if (F.isMaterializable()) { // Function has a body somewhere we can't see. Assert(MDs.empty(), "unmaterialized function cannot have metadata", &F, - MDs.empty() ? nullptr : MDs.front().second); + MDs.empty() ? nullptr : std::get<2>(MDs.front())); } else if (F.isDeclaration()) { Assert(F.hasExternalLinkage() || F.hasExternalWeakLinkage(), "invalid linkage type for function declaration", &F); Assert(MDs.empty(), "function without a body cannot have metadata", &F, - MDs.empty() ? nullptr : MDs.front().second); + MDs.empty() ? nullptr : std::get<2>(MDs.front())); Assert(!F.hasPersonalityFn(), "Function declaration shouldn't have a personality routine", &F); } else { @@ -1985,20 +1985,25 @@ "blockaddress may not be used with the entry block!", Entry); } + unsigned NumDebugAttachments = 0; // Visit metadata attachments. for (const auto &I : MDs) { // Verify that the attachment is legal. - switch (I.first) { + switch (std::get<0>(I)) { default: break; case LLVMContext::MD_dbg: - AssertDI(isa(I.second), - "function !dbg attachment must be a subprogram", &F, I.second); + AssertDI(++NumDebugAttachments <= 1, + "function must have a single !dbg attachment", &F, + std::get<2>(I)); + AssertDI(isa(std::get<2>(I)), + "function !dbg attachment must be a subprogram", &F, + std::get<2>(I)); break; } // Verify the metadata itself. - visitMDNode(*I.second); + visitMDNode(*std::get<2>(I)); } } Index: lib/Linker/IRMover.cpp =================================================================== --- lib/Linker/IRMover.cpp +++ lib/Linker/IRMover.cpp @@ -459,7 +459,7 @@ bool linkModuleFlagsMetadata(); - void linkGlobalInit(GlobalVariable &Dst, GlobalVariable &Src); + void linkGlobalVariable(GlobalVariable &Dst, GlobalVariable &Src); bool linkFunctionBody(Function &Dst, Function &Src); void linkAliasBody(GlobalAlias &Dst, GlobalAlias &Src); bool linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src); @@ -931,7 +931,12 @@ /// Update the initializers in the Dest module now that all globals that may be /// referenced are in Dest. -void IRLinker::linkGlobalInit(GlobalVariable &Dst, GlobalVariable &Src) { +void IRLinker::linkGlobalVariable(GlobalVariable &Dst, GlobalVariable &Src) { + SmallVector, 8> MDs; + Src.getAllMetadata(MDs); + for (const auto &I : MDs) + Dst.addMetadata(std::get<0>(I), std::get<1>(I), std::get<2>(I)); + // Figure out what the initializer looks like in the dest module. Mapper.scheduleMapGlobalInitializer(Dst, *Src.getInitializer()); } @@ -955,10 +960,10 @@ Dst.setPersonalityFn(Src.getPersonalityFn()); // Copy over the metadata attachments without remapping. - SmallVector, 8> MDs; + SmallVector, 8> MDs; Src.getAllMetadata(MDs); for (const auto &I : MDs) - Dst.setMetadata(I.first, I.second); + Dst.addMetadata(std::get<0>(I), std::get<1>(I), std::get<2>(I)); // Steal arguments and splice the body of Src into Dst. Dst.stealArgumentListFrom(Src); @@ -977,7 +982,7 @@ if (auto *F = dyn_cast(&Src)) return linkFunctionBody(cast(Dst), *F); if (auto *GVar = dyn_cast(&Src)) { - linkGlobalInit(cast(Dst), *GVar); + linkGlobalVariable(cast(Dst), *GVar); return false; } linkAliasBody(cast(Dst), cast(Src)); Index: lib/Transforms/IPO/StripSymbols.cpp =================================================================== --- lib/Transforms/IPO/StripSymbols.cpp +++ lib/Transforms/IPO/StripSymbols.cpp @@ -312,13 +312,14 @@ // replace the current list of potentially dead global variables/functions // with the live list. SmallVector LiveGlobalVariables; - SmallVector LiveSubprograms; DenseSet VisitedSet; - std::set LiveSPs; - for (Function &F : M) { - if (DISubprogram *SP = F.getSubprogram()) - LiveSPs.insert(SP); + std::set LiveGVs; + for (GlobalVariable &GV : M.globals()) { + SmallVector, 1> DIs; + GV.getDebugInfo(DIs); + for (auto &DI : DIs) + LiveGVs.insert(DI.second); } for (DICompileUnit *DIC : F.compile_units()) { @@ -329,9 +330,8 @@ if (!VisitedSet.insert(DIG).second) continue; - // If the global variable referenced by DIG is not null, the global - // variable is live. - if (DIG->getVariable()) + // If a global variable references DIG, the global variable is live. + if (LiveGVs.count(DIG)) LiveGlobalVariables.push_back(DIG); else GlobalVariableChange = true; @@ -345,7 +345,6 @@ } // Reset lists for the next iteration. - LiveSubprograms.clear(); LiveGlobalVariables.clear(); } Index: lib/Transforms/Utils/CloneFunction.cpp =================================================================== --- lib/Transforms/Utils/CloneFunction.cpp +++ lib/Transforms/Utils/CloneFunction.cpp @@ -119,12 +119,12 @@ .addAttributes(NewFunc->getContext(), AttributeSet::FunctionIndex, OldAttrs.getFnAttributes())); - SmallVector, 1> MDs; + SmallVector, 1> MDs; OldFunc->getAllMetadata(MDs); for (auto MD : MDs) - NewFunc->setMetadata( - MD.first, - MapMetadata(MD.second, VMap, + NewFunc->addMetadata( + std::get<0>(MD), std::get<1>(MD), + MapMetadata(std::get<2>(MD), VMap, ModuleLevelChanges ? RF_None : RF_NoModuleLevelChanges, TypeMapper, Materializer)); Index: lib/Transforms/Utils/ValueMapper.cpp =================================================================== --- lib/Transforms/Utils/ValueMapper.cpp +++ lib/Transforms/Utils/ValueMapper.cpp @@ -939,10 +939,12 @@ Op = mapValue(Op); // Remap the metadata attachments. - SmallVector, 8> MDs; + SmallVector, 8> MDs; F.getAllMetadata(MDs); + F.clearMetadata(); for (const auto &I : MDs) - F.setMetadata(I.first, cast_or_null(mapMetadata(I.second))); + F.addMetadata(std::get<0>(I), std::get<1>(I), + cast_or_null(mapMetadata(std::get<2>(I)))); // Remap the argument types. if (TypeMapper) Index: test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll =================================================================== --- test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll +++ test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll @@ -10,7 +10,7 @@ @TestArrayPtr = global %struct.test* getelementptr inbounds ([10 x %struct.test], [10 x %struct.test]* @TestArray, i64 0, i64 3) ; <%struct.test**> [#uses=1] @TestArray = common global [10 x %struct.test] zeroinitializer, align 32 ; <[10 x %struct.test]*> [#uses=2] -define i32 @main() nounwind readonly !dbg !1 { +define i32 @main() nounwind readonly !dbg 0 !1 { %diff1 = alloca i64 ; [#uses=2] ; CHECK: call void @llvm.dbg.value(metadata i64 72, call void @llvm.dbg.declare(metadata i64* %diff1, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) Index: test/Assembler/diglobalvariable.ll =================================================================== --- test/Assembler/diglobalvariable.ll +++ test/Assembler/diglobalvariable.ll @@ -12,13 +12,13 @@ !3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !4 = distinct !{} -; CHECK: !5 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !0, file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, variable: i32* @foo) +; CHECK: !5 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !0, file: !2, line: 7, type: !3, isLocal: true, isDefinition: false) !5 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !0, file: !2, line: 7, type: !3, isLocal: true, - isDefinition: false, variable: i32* @foo) + isDefinition: false) -; CHECK: !6 = !DIGlobalVariable(name: "foo", scope: !0, isLocal: false, isDefinition: true) -!6 = !DIGlobalVariable(name: "foo", scope: !0) +; CHECK: !6 = !DIGlobalVariable(name: "foo", scope: !0, isLocal: false, isDefinition: true, constantValue: i32 42) +!6 = !DIGlobalVariable(name: "foo", scope: !0, constantValue: i32 42) !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 8, align: 8) !8 = !DIDerivedType(tag: DW_TAG_member, name: "mem", flags: DIFlagStaticMember, scope: !7, baseType: !3) Index: test/Assembler/disubprogram.ll =================================================================== --- test/Assembler/disubprogram.ll +++ test/Assembler/disubprogram.ll @@ -1,8 +1,8 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK: define void @_Z3foov() !dbg !9 -define void @_Z3foov() !dbg !9 { +; CHECK: define void @_Z3foov() !dbg 0 !9 +define void @_Z3foov() !dbg 0 !9 { ret void } Index: test/Assembler/drop-debug-info.ll =================================================================== --- test/Assembler/drop-debug-info.ll +++ test/Assembler/drop-debug-info.ll @@ -2,7 +2,7 @@ ; RUN: llvm-dis < %t.bc | FileCheck %s ; RUN: verify-uselistorder < %t.bc -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/Assembler/metadata.ll =================================================================== --- test/Assembler/metadata.ll +++ test/Assembler/metadata.ll @@ -1,12 +1,12 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ; RUN: verify-uselistorder %s -; CHECK-LABEL: @global = global i32 0, !foo !0, !baz !1 -@global = global i32 0, !foo !2, !baz !3 +; CHECK-LABEL: @global = global i32 0, !foo 0 !0, !baz 1 !1 +@global = global i32 0, !foo 0 !2, !baz 1 !3 ; CHECK-LABEL: @test ; CHECK: ret void, !foo !5, !bar !6 -define void @test() !dbg !1 { +define void @test() !dbg 0 !1 { add i32 2, 1, !bar !0 add i32 1, 2, !foo !1 call void @llvm.dbg.func.start(metadata !"foo") @@ -14,14 +14,14 @@ ret void, !foo !0, !bar !1 } -; CHECK-LABEL: define void @test2() !foo !0 !baz !1 -define void @test2() !foo !2 !baz !3 { +; CHECK-LABEL: define void @test2() !foo 2 !0 !baz 3 !1 +define void @test2() !foo 2 !2 !baz 3 !3 { unreachable } ; CHECK-LABEL: define void @test3() !bar !1 ; CHECK: unreachable, !bar !7 -define void @test3() !bar !3 { +define void @test3() !bar 0 !3 { unreachable, !bar !4 } Index: test/Bitcode/DISubprogram-distinct-definitions.ll =================================================================== --- test/Bitcode/DISubprogram-distinct-definitions.ll +++ test/Bitcode/DISubprogram-distinct-definitions.ll @@ -2,7 +2,7 @@ ; Check that subprogram definitions are correctly upgraded to 'distinct'. ; Bitcode compiled with llvm-as version 3.7. -define void @f() !dbg !3 { ret void } +define void @f() !dbg 0 !3 { ret void } !llvm.module.flags = !{!4} !llvm.dbg.cu = !{!0} Index: test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll =================================================================== --- test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll +++ test/Bitcode/Inputs/thinlto-function-summary-callgraph-pgo.ll @@ -3,7 +3,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind uwtable -define void @func() #0 !prof !2 { +define void @func() #0 !prof 0 !2 { entry: ret void } Index: test/Bitcode/dityperefs-3.8.ll =================================================================== --- test/Bitcode/dityperefs-3.8.ll +++ test/Bitcode/dityperefs-3.8.ll @@ -32,7 +32,7 @@ !7 = !DILocalVariable(name: "V1", scope: !6, type: !"T2") !8 = !DIObjCProperty(name: "P1", type: !"T1") !9 = !DITemplateTypeParameter(type: !"T1") -!10 = !DIGlobalVariable(name: "G", type: !"T1", isDefinition: false, variable: i32* @G1) +!10 = !DIGlobalVariable(name: "G", type: !"T1", isDefinition: false) !11 = !DITemplateValueParameter(type: !"T1", value: i32* @G1) !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !"T1") !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !14, identifier: "T3") @@ -40,4 +40,4 @@ !15 = !DISubprogram(scope: !"T3", isDefinition: false) !16 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !"T3") -@G1 = global i32 0 +@G1 = global i32 0, !dbg 0 !10 Index: test/Bitcode/metadata-function-blocks.ll =================================================================== --- test/Bitcode/metadata-function-blocks.ll +++ test/Bitcode/metadata-function-blocks.ll @@ -50,7 +50,7 @@ !110 = !{!"foo", !"foo and bar", !109, !7, !5} ; CHECK-NEXT: [#uses=1] +@length = common global i32 0, align 4, !dbg 0 !14 ; [#uses=1] define void @x0(i8* nocapture %buf, i32 %nbytes) nounwind optsize { entry: @@ -60,7 +60,7 @@ !11 = distinct !DILexicalBlock(line: 5, column: 1, file: !26, scope: !1) !12 = !DILocalVariable(name: "c", line: 7, scope: !11, file: !2, type: !13) !13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!14 = !DIGlobalVariable(name: "length", linkageName: "length", line: 1, isLocal: false, isDefinition: true, scope: !2, file: !2, type: !13, variable: i32* @length) +!14 = !DIGlobalVariable(name: "length", linkageName: "length", line: 1, isLocal: false, isDefinition: true, scope: !2, file: !2, type: !13) !15 = !DILocation(line: 4, column: 24, scope: !1) !16 = !DILocation(line: 4, column: 43, scope: !1) !17 = !DILocation(line: 9, column: 2, scope: !11) 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 @@ -6,7 +6,7 @@ %struct.SVal = type { i8*, i32 } -define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp !dbg !17 { +define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp !dbg 0 !17 { entry: %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !23, metadata !DIExpression()), !dbg !24 @@ -34,7 +34,7 @@ ret i32 %.0, !dbg !29 } -define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg !16 { +define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg 0 !16 { entry: %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] call void @llvm.dbg.value(metadata %struct.SVal* %this, i64 0, metadata !31, metadata !DIExpression()), !dbg !34 @@ -50,7 +50,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @main() nounwind ssp !dbg !20 { +define i32 @main() nounwind ssp !dbg 0 !20 { entry: %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3] %v = alloca %struct.SVal ; <%struct.SVal*> [#uses=4] 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 @@ -3,11 +3,11 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-darwin10" -@x1 = internal global i8 1, align 1 -@x2 = internal global i8 1, align 1 -@x3 = internal global i8 1, align 1 -@x4 = internal global i8 1, align 1 -@x5 = global i8 1, align 1 +@x1 = internal global i8 1, align 1, !dbg 0 !13 +@x2 = internal global i8 1, align 1, !dbg 0 !14 +@x3 = internal global i8 1, align 1, !dbg 0 !15 +@x4 = internal global i8 1, align 1, !dbg 0 !16 +@x5 = global i8 1, align 1, !dbg 0 !17 ; Check debug info output for merged global. ; DW_AT_location @@ -21,14 +21,14 @@ ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "x1" ; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x8> 03 [[ADDR:.. .. .. ..]] 10 00 22 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x5> 03 [[ADDR:.. .. .. ..]] ) ; CHECK: DW_TAG_variable ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "x2" ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x8> 03 [[ADDR]] 10 01 22 ) -define zeroext i8 @get1(i8 zeroext %a) nounwind optsize !dbg !0 { +define zeroext i8 @get1(i8 zeroext %a) nounwind optsize !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !10, metadata !DIExpression()), !dbg !30 %0 = load i8, i8* @x1, align 4, !dbg !30 @@ -39,7 +39,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define zeroext i8 @get2(i8 zeroext %a) nounwind optsize !dbg !6 { +define zeroext i8 @get2(i8 zeroext %a) nounwind optsize !dbg 0 !6 { entry: tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !18, metadata !DIExpression()), !dbg !32 %0 = load i8, i8* @x2, align 4, !dbg !32 @@ -48,7 +48,7 @@ ret i8 %0, !dbg !33 } -define zeroext i8 @get3(i8 zeroext %a) nounwind optsize !dbg !7 { +define zeroext i8 @get3(i8 zeroext %a) nounwind optsize !dbg 0 !7 { entry: tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !21, metadata !DIExpression()), !dbg !34 %0 = load i8, i8* @x3, align 4, !dbg !34 @@ -57,7 +57,7 @@ ret i8 %0, !dbg !35 } -define zeroext i8 @get4(i8 zeroext %a) nounwind optsize !dbg !8 { +define zeroext i8 @get4(i8 zeroext %a) nounwind optsize !dbg 0 !8 { entry: tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !24, metadata !DIExpression()), !dbg !36 %0 = load i8, i8* @x4, align 4, !dbg !36 @@ -66,7 +66,7 @@ ret i8 %0, !dbg !37 } -define zeroext i8 @get5(i8 zeroext %a) nounwind optsize !dbg !9 { +define zeroext i8 @get5(i8 zeroext %a) nounwind optsize !dbg 0 !9 { entry: tail call void @llvm.dbg.value(metadata i8 %a, i64 0, metadata !27, metadata !DIExpression()), !dbg !38 %0 = load i8, i8* @x5, align 4, !dbg !38 @@ -91,11 +91,11 @@ !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) -!13 = !DIGlobalVariable(name: "x1", line: 3, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x1) -!14 = !DIGlobalVariable(name: "x2", line: 6, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x2) -!15 = !DIGlobalVariable(name: "x3", line: 9, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x3) -!16 = !DIGlobalVariable(name: "x4", line: 12, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x4) -!17 = !DIGlobalVariable(name: "x5", line: 15, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x5) +!13 = !DIGlobalVariable(name: "x1", line: 3, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5) +!14 = !DIGlobalVariable(name: "x2", line: 6, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5) +!15 = !DIGlobalVariable(name: "x3", line: 9, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5) +!16 = !DIGlobalVariable(name: "x4", line: 12, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5) +!17 = !DIGlobalVariable(name: "x5", line: 15, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5) !18 = !DILocalVariable(name: "a", line: 7, arg: 1, scope: !6, file: !1, type: !5) !19 = !DILocalVariable(name: "b", line: 7, scope: !20, file: !1, type: !5) !20 = distinct !DILexicalBlock(line: 7, column: 0, file: !47, scope: !6) 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 @@ -12,7 +12,7 @@ ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "x1" ; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x8> 03 [[ADDR:.. .. .. ..]] 10 00 22 ) +; CHECK: DW_AT_location [DW_FORM_exprloc] (<0x5> 03 [[ADDR:.. .. .. ..]] ) ; CHECK: DW_TAG_variable ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "x2" @@ -22,13 +22,13 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32" target triple = "thumbv7-apple-macosx10.7.0" -@x1 = internal unnamed_addr global i32 1, align 4 -@x2 = internal unnamed_addr global i32 2, align 4 +@x1 = internal unnamed_addr global i32 1, align 4, !dbg 0 !25 +@x2 = internal unnamed_addr global i32 2, align 4, !dbg 0 !26 @x3 = internal unnamed_addr global i32 3, align 4 @x4 = internal unnamed_addr global i32 4, align 4 @x5 = global i32 0, align 4 -define i32 @get1(i32 %a) nounwind optsize ssp !dbg !1 { +define i32 @get1(i32 %a) nounwind optsize ssp !dbg 0 !1 { tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !10, metadata !DIExpression()), !dbg !30 %1 = load i32, i32* @x1, align 4, !dbg !31 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !11, metadata !DIExpression()), !dbg !31 @@ -36,7 +36,7 @@ ret i32 %1, !dbg !31 } -define i32 @get2(i32 %a) nounwind optsize ssp !dbg !6 { +define i32 @get2(i32 %a) nounwind optsize ssp !dbg 0 !6 { tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !13, metadata !DIExpression()), !dbg !32 %1 = load i32, i32* @x2, align 4, !dbg !33 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !14, metadata !DIExpression()), !dbg !33 @@ -44,7 +44,7 @@ ret i32 %1, !dbg !33 } -define i32 @get3(i32 %a) nounwind optsize ssp !dbg !7 { +define i32 @get3(i32 %a) nounwind optsize ssp !dbg 0 !7 { tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !16, metadata !DIExpression()), !dbg !34 %1 = load i32, i32* @x3, align 4, !dbg !35 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !17, metadata !DIExpression()), !dbg !35 @@ -52,7 +52,7 @@ ret i32 %1, !dbg !35 } -define i32 @get4(i32 %a) nounwind optsize ssp !dbg !8 { +define i32 @get4(i32 %a) nounwind optsize ssp !dbg 0 !8 { tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !19, metadata !DIExpression()), !dbg !36 %1 = load i32, i32* @x4, align 4, !dbg !37 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !20, metadata !DIExpression()), !dbg !37 @@ -60,7 +60,7 @@ ret i32 %1, !dbg !37 } -define i32 @get5(i32 %a) nounwind optsize ssp !dbg !9 { +define i32 @get5(i32 %a) nounwind optsize ssp !dbg 0 !9 { tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !27, metadata !DIExpression()), !dbg !38 %1 = load i32, i32* @x5, align 4, !dbg !39 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !28, metadata !DIExpression()), !dbg !39 @@ -95,8 +95,8 @@ !19 = !DILocalVariable(name: "a", line: 14, arg: 1, scope: !8, file: !2, type: !5) !20 = !DILocalVariable(name: "b", line: 14, scope: !21, file: !2, type: !5) !21 = distinct !DILexicalBlock(line: 14, column: 19, file: !47, scope: !8) -!25 = !DIGlobalVariable(name: "x1", line: 4, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5, variable: i32* @x1) -!26 = !DIGlobalVariable(name: "x2", line: 7, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5, variable: i32* @x2) +!25 = !DIGlobalVariable(name: "x1", line: 4, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5) +!26 = !DIGlobalVariable(name: "x2", line: 7, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !5) !27 = !DILocalVariable(name: "a", line: 17, arg: 1, scope: !9, file: !2, type: !5) !28 = !DILocalVariable(name: "b", line: 17, scope: !29, file: !2, type: !5) !29 = distinct !DILexicalBlock(line: 17, column: 19, file: !47, scope: !9) Index: test/CodeGen/ARM/coalesce-dbgvalue.ll =================================================================== --- test/CodeGen/ARM/coalesce-dbgvalue.ll +++ test/CodeGen/ARM/coalesce-dbgvalue.ll @@ -9,13 +9,13 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32" target triple = "thumbv7-apple-ios3.0.0" -@c = common global i32 0, align 4 -@b = common global i32 0, align 4 -@a = common global i64 0, align 8 -@d = common global i32 0, align 4 +@c = common global i32 0, align 4, !dbg 0 !19 +@b = common global i32 0, align 4, !dbg 0 !18 +@a = common global i64 0, align 8, !dbg 0 !16 +@d = common global i32 0, align 4, !dbg 0 !20 ; Function Attrs: nounwind ssp -define i32 @pr16110() #0 !dbg !4 { +define i32 @pr16110() #0 !dbg 0 !4 { for.cond1.preheader: store i32 0, i32* @c, align 4, !dbg !21 br label %for.cond1.outer, !dbg !26 @@ -94,11 +94,11 @@ !13 = distinct !DILexicalBlock(line: 12, column: 0, file: !1, scope: !4) !14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, baseType: !8) !15 = !{!16, !18, !19, !20} -!16 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !17, variable: i64* @a) +!16 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !17) !17 = !DIBasicType(tag: DW_TAG_base_type, name: "long long int", size: 64, align: 32, encoding: DW_ATE_signed) -!18 = !DIGlobalVariable(name: "b", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @b) -!19 = !DIGlobalVariable(name: "c", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @c) -!20 = !DIGlobalVariable(name: "d", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @d) +!18 = !DIGlobalVariable(name: "b", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) +!19 = !DIGlobalVariable(name: "c", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) +!20 = !DIGlobalVariable(name: "d", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) !21 = !DILocation(line: 10, scope: !22) !22 = distinct !DILexicalBlock(line: 10, column: 0, file: !1, scope: !4) !26 = !DILocation(line: 12, scope: !13) Index: test/CodeGen/ARM/debug-frame-vararg.ll =================================================================== --- test/CodeGen/ARM/debug-frame-vararg.ll +++ test/CodeGen/ARM/debug-frame-vararg.ll @@ -107,7 +107,7 @@ ; CHECK-THUMB-FP-ELIM: add r7, sp, #8 ; CHECK-THUMB-FP-ELIM: .cfi_def_cfa r7, 20 -define i32 @sum(i32 %count, ...) !dbg !4 { +define i32 @sum(i32 %count, ...) !dbg 0 !4 { entry: %vl = alloca i8*, align 4 %vl1 = bitcast i8** %vl to i8* Index: test/CodeGen/ARM/debug-info-arg.ll =================================================================== --- test/CodeGen/ARM/debug-info-arg.ll +++ test/CodeGen/ARM/debug-info-arg.ll @@ -6,7 +6,7 @@ %struct.tag_s = type { i32, i32, i32 } -define void @foo(%struct.tag_s* nocapture %this, %struct.tag_s* %c, i64 %x, i64 %y, %struct.tag_s* nocapture %ptr1, %struct.tag_s* nocapture %ptr2) nounwind ssp !dbg !1 { +define void @foo(%struct.tag_s* nocapture %this, %struct.tag_s* %c, i64 %x, i64 %y, %struct.tag_s* nocapture %ptr1, %struct.tag_s* nocapture %ptr2) nounwind ssp !dbg 0 !1 { tail call void @llvm.dbg.value(metadata %struct.tag_s* %this, i64 0, metadata !5, metadata !DIExpression()), !dbg !20 tail call void @llvm.dbg.value(metadata %struct.tag_s* %c, i64 0, metadata !13, metadata !DIExpression()), !dbg !21 tail call void @llvm.dbg.value(metadata i64 %x, i64 0, metadata !14, metadata !DIExpression()), !dbg !22 Index: test/CodeGen/ARM/debug-info-blocks.ll =================================================================== --- test/CodeGen/ARM/debug-info-blocks.ll +++ test/CodeGen/ARM/debug-info-blocks.ll @@ -43,7 +43,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind -define hidden void @foobar_func_block_invoke_0(i8* %.block_descriptor, %0* %loadedMydata, [4 x i32] %bounds.coerce0, [4 x i32] %data.coerce0) ssp !dbg !23 { +define hidden void @foobar_func_block_invoke_0(i8* %.block_descriptor, %0* %loadedMydata, [4 x i32] %bounds.coerce0, [4 x i32] %data.coerce0) ssp !dbg 0 !23 { %1 = alloca %0*, align 4 %bounds = alloca %struct.CR, align 4 %data = alloca %struct.CR, align 4 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 @@ -14,7 +14,7 @@ declare <4 x float> @test0001(float) nounwind readnone ssp -define i32 @main(i32 %argc, i8** nocapture %argv, i1 %cond) nounwind ssp !dbg !10 { +define i32 @main(i32 %argc, i8** nocapture %argv, i1 %cond) nounwind ssp !dbg 0 !10 { entry: br label %for.body9 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 @@ -10,7 +10,7 @@ @.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00", align 4 @.str1 = private unnamed_addr constant [6 x i8] c"point\00", align 4 -define i32 @inlineprinter(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize !dbg !9 { +define i32 @inlineprinter(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize !dbg 0 !9 { entry: tail call void @llvm.dbg.value(metadata i8* %ptr, i64 0, metadata !19, metadata !DIExpression()), !dbg !26 tail call void @llvm.dbg.value(metadata double %val, i64 0, metadata !20, metadata !DIExpression()), !dbg !26 @@ -20,7 +20,7 @@ ret i32 0, !dbg !29 } -define i32 @printer(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize noinline !dbg !0 { +define i32 @printer(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize noinline !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i8* %ptr, i64 0, metadata !16, metadata !DIExpression()), !dbg !30 tail call void @llvm.dbg.value(metadata double %val, i64 0, metadata !17, metadata !DIExpression()), !dbg !30 @@ -34,7 +34,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize !dbg !10 { +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize !dbg 0 !10 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !22, metadata !DIExpression()), !dbg !34 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !23, metadata !DIExpression()), !dbg !34 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 @@ -1,7 +1,7 @@ ; RUN: llc -mtriple=armv7-none-linux-gnueabihf < %s -o - | FileCheck %s ; Function Attrs: nounwind -define void @need_cfi_def_cfa_offset() #0 !dbg !3 { +define void @need_cfi_def_cfa_offset() #0 !dbg 0 !3 { ; CHECK-LABEL: need_cfi_def_cfa_offset: ; CHECK: sub sp, sp, #4 ; CHECK: .cfi_def_cfa_offset 4 Index: test/CodeGen/ARM/debug-info-qreg.ll =================================================================== --- test/CodeGen/ARM/debug-info-qreg.ll +++ test/CodeGen/ARM/debug-info-qreg.ll @@ -15,7 +15,7 @@ declare <4 x float> @test0001(float) nounwind readnone ssp -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp !dbg !10 { +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp !dbg 0 !10 { entry: br label %for.body9 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 @@ -12,7 +12,7 @@ @.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00" @.str1 = private unnamed_addr constant [6 x i8] c"point\00" -define i32 @inlineprinter(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize ssp !dbg !0 { +define i32 @inlineprinter(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i8* %ptr, i64 0, metadata !8, metadata !DIExpression()), !dbg !24 tail call void @llvm.dbg.value(metadata float %val, i64 0, metadata !10, metadata !DIExpression()), !dbg !25 @@ -25,7 +25,7 @@ declare i32 @printf(i8* nocapture, ...) nounwind optsize -define i32 @printer(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize noinline ssp !dbg !6 { +define i32 @printer(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize noinline ssp !dbg 0 !6 { entry: tail call void @llvm.dbg.value(metadata i8* %ptr, i64 0, metadata !14, metadata !DIExpression()), !dbg !30 tail call void @llvm.dbg.value(metadata float %val, i64 0, metadata !15, metadata !DIExpression()), !dbg !31 @@ -36,7 +36,7 @@ ret i32 0, !dbg !35 } -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize ssp !dbg !7 { +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize ssp !dbg 0 !7 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !17, metadata !DIExpression()), !dbg !36 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !18, metadata !DIExpression()), !dbg !37 Index: test/CodeGen/ARM/debug-info-sreg2.ll =================================================================== --- test/CodeGen/ARM/debug-info-sreg2.ll +++ test/CodeGen/ARM/debug-info-sreg2.ll @@ -12,7 +12,7 @@ ; CHECK-NEXT: Ending address offset: ; CHECK-NEXT: Location description: 90 {{.. .. .. .. $}} -define void @_Z3foov() optsize ssp !dbg !1 { +define void @_Z3foov() optsize ssp !dbg 0 !1 { entry: %call = tail call float @_Z3barv() optsize, !dbg !11 tail call void @llvm.dbg.value(metadata float %call, i64 0, metadata !5, metadata !DIExpression()), !dbg !11 Index: test/CodeGen/ARM/debug-segmented-stacks.ll =================================================================== --- test/CodeGen/ARM/debug-segmented-stacks.ll +++ test/CodeGen/ARM/debug-segmented-stacks.ll @@ -5,7 +5,7 @@ !llvm.module.flags = !{!9, !10} !llvm.ident = !{!11} -define void @test_basic() #0 !dbg !4 { +define void @test_basic() #0 !dbg 0 !4 { %mem = alloca i32, i32 10 call void @dummy_use (i32* %mem, i32 10) ret void Index: test/CodeGen/ARM/vfp-regs-dwarf.ll =================================================================== --- test/CodeGen/ARM/vfp-regs-dwarf.ll +++ test/CodeGen/ARM/vfp-regs-dwarf.ll @@ -10,7 +10,7 @@ ; the layout of the VFP registers correctly. The fact that the numbers are ; monotonic in memory is also a nice property to have. -define void @stack_offsets() !dbg !4 { +define void @stack_offsets() !dbg 0 !4 { ; CHECK-LABEL: stack_offsets: ; CHECK: vpush {d13} ; CHECK: vpush {d11} Index: test/CodeGen/Hexagon/cfi-late.ll =================================================================== --- test/CodeGen/Hexagon/cfi-late.ll +++ test/CodeGen/Hexagon/cfi-late.ll @@ -16,7 +16,7 @@ ; CHECK: } ; Function Attrs: nounwind -define i32 @foo(i32 %x, i32 %y) #0 !dbg !4 { +define i32 @foo(i32 %x, i32 %y) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !14), !dbg !15 tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !10, metadata !14), !dbg !16 Index: test/CodeGen/Hexagon/hwloop-dbg.ll =================================================================== --- test/CodeGen/Hexagon/hwloop-dbg.ll +++ test/CodeGen/Hexagon/hwloop-dbg.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32" target triple = "hexagon" -define void @foo(i32* nocapture %a, i32* nocapture %b) nounwind !dbg !5 { +define void @foo(i32* nocapture %a, i32* nocapture %b) nounwind !dbg 0 !5 { entry: tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !13, metadata !DIExpression()), !dbg !17 tail call void @llvm.dbg.value(metadata i32* %b, i64 0, metadata !14, metadata !DIExpression()), !dbg !18 Index: test/CodeGen/Hexagon/misched-top-rptracker-sync.ll =================================================================== --- test/CodeGen/Hexagon/misched-top-rptracker-sync.ll +++ test/CodeGen/Hexagon/misched-top-rptracker-sync.ll @@ -18,7 +18,7 @@ declare void @_Assert(i8*, i8*) #0 ; Function Attrs: nounwind -define void @fred(%struct.A* %pA, %struct.B* %p) #0 !dbg !6 { +define void @fred(%struct.A* %pA, %struct.B* %p) #0 !dbg 0 !6 { entry: tail call void @llvm.dbg.value(metadata %struct.A* %pA, i64 0, metadata !26, metadata !28), !dbg !29 tail call void @llvm.dbg.value(metadata %struct.B* %p, i64 0, metadata !27, metadata !28), !dbg !30 Index: test/CodeGen/Inputs/DbgValueOtherTargets.ll =================================================================== --- test/CodeGen/Inputs/DbgValueOtherTargets.ll +++ test/CodeGen/Inputs/DbgValueOtherTargets.ll @@ -1,6 +1,6 @@ ; Check that DEBUG_VALUE comments come through on a variety of targets. -define i32 @main() nounwind ssp !dbg !0 { +define i32 @main() nounwind ssp !dbg 0 !0 { entry: ; CHECK: DEBUG_VALUE call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !7, metadata !DIExpression()), !dbg !9 Index: test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir =================================================================== --- test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir +++ test/CodeGen/MIR/ARM/ARMLoadStoreDBG.mir @@ -7,7 +7,7 @@ %struct.s = type opaque ; Function Attrs: nounwind - define arm_aapcscc i32 @f(%struct.s* %s, i32 %u, i8* %b, i32 %n) #0 !dbg !4 { + define arm_aapcscc i32 @f(%struct.s* %s, i32 %u, i8* %b, i32 %n) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata %struct.s* %s, i64 0, metadata !18, metadata !27), !dbg !28 tail call void @llvm.dbg.value(metadata i32 %u, i64 0, metadata !19, metadata !27), !dbg !28 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 @@ -7,7 +7,7 @@ %struct.s = type opaque ; Function Attrs: nounwind - define arm_aapcscc i32 @f(%struct.s* %s, i32 %u, i8* %b, i32 %n) #0 !dbg !4 { + define arm_aapcscc i32 @f(%struct.s* %s, i32 %u, i8* %b, i32 %n) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata %struct.s* %s, i64 0, metadata !18, metadata !27), !dbg !28 tail call void @llvm.dbg.value(metadata i32 %u, i64 0, metadata !19, metadata !27), !dbg !28 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 @@ -2,7 +2,7 @@ --- | - define i32 @test(i32 %x) #0 !dbg !4 { + define i32 @test(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 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 @@ -2,7 +2,7 @@ --- | - define i32 @test(i32 %x) #0 !dbg !4 { + define i32 @test(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 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 @@ -4,7 +4,7 @@ --- | - define i32 @test(i32 %x) #0 !dbg !4 { + define i32 @test(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 Index: test/CodeGen/MIR/X86/metadata-operands.mir =================================================================== --- test/CodeGen/MIR/X86/metadata-operands.mir +++ test/CodeGen/MIR/X86/metadata-operands.mir @@ -4,7 +4,7 @@ --- | - define i32 @test(i32 %x) #0 !dbg !4 { + define i32 @test(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 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 @@ -2,7 +2,7 @@ --- | - define i32 @test(i32 %x) #0 !dbg !4 { + define i32 @test(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 Index: test/CodeGen/NVPTX/debug-file-loc.ll =================================================================== --- test/CodeGen/NVPTX/debug-file-loc.ll +++ test/CodeGen/NVPTX/debug-file-loc.ll @@ -12,7 +12,7 @@ ; CHECK: .file 2 "/source/dir{{/|\\\\}}foo.h" ; CHECK-LABEL: @foo -define void @foo() !dbg !4 { +define void @foo() !dbg 0 !4 { bb: ret void, !dbg !10 } @@ -20,7 +20,7 @@ ; CHECK: ret ; CHECK-LABEL: @bar -define void @bar() !dbg !7 { +define void @bar() !dbg 0 !7 { bb: ret void, !dbg !11 } Index: test/CodeGen/PowerPC/dbg.ll =================================================================== --- test/CodeGen/PowerPC/dbg.ll +++ test/CodeGen/PowerPC/dbg.ll @@ -4,7 +4,7 @@ target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64" target triple = "powerpc64-unknown-linux-gnu" -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone !dbg !5 { +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone !dbg 0 !5 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !15, metadata !DIExpression()), !dbg !17 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !16, metadata !DIExpression()), !dbg !18 Index: test/CodeGen/PowerPC/pr17168.ll =================================================================== --- test/CodeGen/PowerPC/pr17168.ll +++ test/CodeGen/PowerPC/pr17168.ll @@ -6,10 +6,10 @@ target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" target triple = "powerpc64-unknown-linux-gnu" -@grid_points = external global [3 x i32], align 4 +@grid_points = external global [3 x i32], align 4, !dbg 0 !299 ; Function Attrs: nounwind -define fastcc void @compute_rhs() #0 !dbg !114 { +define fastcc void @compute_rhs() #0 !dbg 0 !114 { entry: br i1 undef, label %for.cond871.preheader.for.inc960_crit_edge, label %for.end1042, !dbg !439 @@ -352,7 +352,7 @@ !296 = !DILocalVariable(name: "j", line: 907, scope: !293, file: !5, type: !8) !297 = !DILocalVariable(name: "k", line: 907, scope: !293, file: !5, type: !8) !298 = !{!299, !304, !305, !309, !310, !311, !312, !313, !314, !315, !316, !317, !318, !319, !320, !321, !322, !323, !324, !325, !326, !327, !328, !329, !330, !331, !332, !333, !334, !335, !336, !337, !338, !339, !340, !341, !342, !343, !347, !350, !351, !352, !353, !354, !355, !356, !360, !361, !362, !363, !364, !365, !366, !367, !368, !369, !370, !371, !372, !373, !374, !375, !376, !377, !378, !379, !380, !381, !382, !383, !384, !385, !386, !387, !388, !389, !390, !391, !392, !393, !394, !395, !396, !397, !398, !399, !400, !401, !402, !403, !404, !405, !406, !407, !408, !409, !410, !411, !412, !413, !414, !415, !416, !417, !418, !419, !422, !426, !427, !430, !431, !434, !435, !436, !437} -!299 = !DIGlobalVariable(name: "grid_points", line: 28, isLocal: true, isDefinition: true, scope: null, file: !300, type: !302, variable: [3 x i32]* @grid_points) +!299 = !DIGlobalVariable(name: "grid_points", line: 28, isLocal: true, isDefinition: true, scope: null, file: !300, type: !302) !300 = !DIFile(filename: "./header.h", directory: "/home/hfinkel/src/NPB2.3-omp-C/BT") !301 = !{!"./header.h", !"/home/hfinkel/src/NPB2.3-omp-C/BT"} !302 = !DICompositeType(tag: DW_TAG_array_type, size: 96, align: 32, baseType: !8, elements: !303) Index: test/CodeGen/PowerPC/pr24546.ll =================================================================== --- test/CodeGen/PowerPC/pr24546.ll +++ test/CodeGen/PowerPC/pr24546.ll @@ -3,10 +3,10 @@ ; Verify that we no longer crash in VSX swap removal when debug values ; are in the code stream. -@php_intpow10.powers = external unnamed_addr constant [23 x double], align 8 +@php_intpow10.powers = external unnamed_addr constant [23 x double], align 8, !dbg 0 !24 ; Function Attrs: nounwind -define double @_php_math_round(double %value, i32 signext %places, i32 signext %mode) #0 !dbg !6 { +define double @_php_math_round(double %value, i32 signext %places, i32 signext %mode) #0 !dbg 0 !6 { entry: br i1 undef, label %if.then, label %if.else, !dbg !32 @@ -79,7 +79,7 @@ !21 = !{!22} !22 = !DILocalVariable(name: "power", arg: 1, scope: !18, file: !1, line: 1, type: !9) !23 = !{!24} -!24 = !DIGlobalVariable(name: "powers", scope: !18, file: !1, line: 3, type: !25, isLocal: true, isDefinition: true, variable: [23 x double]* @php_intpow10.powers) +!24 = !DIGlobalVariable(name: "powers", scope: !18, file: !1, line: 3, type: !25, isLocal: true, isDefinition: true) !25 = !DICompositeType(tag: DW_TAG_array_type, baseType: !26, size: 1472, align: 64, elements: !27) !26 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !4) !27 = !{!28} Index: test/CodeGen/PowerPC/unwind-dw2-g.ll =================================================================== --- test/CodeGen/PowerPC/unwind-dw2-g.ll +++ test/CodeGen/PowerPC/unwind-dw2-g.ll @@ -3,7 +3,7 @@ target triple = "powerpc64-unknown-linux-gnu" ; Function Attrs: nounwind -define void @foo() #0 !dbg !4 { +define void @foo() #0 !dbg 0 !4 { entry: call void @llvm.eh.unwind.init(), !dbg !9 ret void, !dbg !10 Index: test/CodeGen/WinEH/wineh-cloning.ll =================================================================== --- test/CodeGen/WinEH/wineh-cloning.ll +++ test/CodeGen/WinEH/wineh-cloning.ll @@ -295,7 +295,7 @@ ; CHECK-NEXT: call void @llvm.bar() ; CHECK-NEXT: unreachable -define void @test12() personality i32 (...)* @__CxxFrameHandler3 !dbg !5 { +define void @test12() personality i32 (...)* @__CxxFrameHandler3 !dbg 0 !5 { entry: invoke void @f() to label %cont unwind label %left, !dbg !8 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 @@ -6,7 +6,7 @@ %struct.Pt = type { double, double } %struct.Rect = type { %struct.Pt, %struct.Pt } -define double @foo(%struct.Rect* byval %my_r0) nounwind ssp !dbg !1 { +define double @foo(%struct.Rect* byval %my_r0) nounwind ssp !dbg 0 !1 { entry: ;CHECK: DEBUG_VALUE %retval = alloca double ; [#uses=2] 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 @@ -7,7 +7,7 @@ %0 = type { double } -define hidden %0 @__divsc3(float %a, float %b, float %c, float %d) nounwind readnone !dbg !1 { +define hidden %0 @__divsc3(float %a, float %b, float %c, float %d) nounwind readnone !dbg 0 !1 { entry: tail call void @llvm.dbg.value(metadata float %a, i64 0, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) tail call void @llvm.dbg.value(metadata float %b, i64 0, metadata !11, metadata !DIExpression()), !dbg !DILocation(scope: !1) 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 @@ -7,7 +7,7 @@ @llvm.used = appending global [1 x i8*] [i8* bitcast (i8* (%struct.a*)* @bar to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] -define i8* @bar(%struct.a* %myvar) nounwind optsize noinline ssp !dbg !9 { +define i8* @bar(%struct.a* %myvar) nounwind optsize noinline ssp !dbg 0 !9 { entry: tail call void @llvm.dbg.value(metadata %struct.a* %myvar, i64 0, metadata !8, metadata !DIExpression()), !dbg !DILocation(scope: !9) %0 = getelementptr inbounds %struct.a, %struct.a* %myvar, i64 0, i32 0, !dbg !28 ; [#uses=1] 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 @@ -2,7 +2,7 @@ ; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s ; Test to check separate label for inlined function argument. -define i32 @foo(i32 %y) nounwind optsize ssp !dbg !1 { +define i32 @foo(i32 %y) nounwind optsize ssp !dbg 0 !1 { entry: tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) %0 = tail call i32 (...) @zoo(i32 %y) nounwind, !dbg !9 ; [#uses=1] @@ -13,7 +13,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @bar(i32 %x) nounwind optsize ssp !dbg !8 { +define i32 @bar(i32 %x) nounwind optsize ssp !dbg 0 !8 { entry: tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !7, metadata !DIExpression()), !dbg !DILocation(scope: !8) tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !0, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !1, inlinedAt: !DILocation(scope: !8)) 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 @@ -7,7 +7,7 @@ @llvm.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.foo*, i32)* @_ZN3foo3bazEi to i8*)], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] -define i32 @_ZN3foo3bazEi(%struct.foo* nocapture %this, i32 %x) nounwind readnone optsize noinline ssp align 2 !dbg !8 { +define i32 @_ZN3foo3bazEi(%struct.foo* nocapture %this, i32 %x) nounwind readnone optsize noinline ssp align 2 !dbg 0 !8 { ;CHECK: DEBUG_VALUE: baz:this <- %RDI{{$}} entry: tail call void @llvm.dbg.value(metadata %struct.foo* %this, i64 0, metadata !15, metadata !DIExpression()), !dbg !DILocation(scope: !8) 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 @@ -3,7 +3,7 @@ %struct.SVal = type { i8*, i32 } -define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp !dbg !17 { +define i32 @_Z3fooi4SVal(i32 %i, %struct.SVal* noalias %location) nounwind ssp !dbg 0 !17 { entry: %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !23, metadata !DIExpression()), !dbg !24 @@ -31,7 +31,7 @@ ret i32 %.0, !dbg !29 } -define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg !16 { +define linkonce_odr void @_ZN4SValC1Ev(%struct.SVal* %this) nounwind ssp align 2 !dbg 0 !16 { entry: %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] call void @llvm.dbg.value(metadata %struct.SVal* %this, i64 0, metadata !31, metadata !DIExpression()), !dbg !34 @@ -47,7 +47,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @main() nounwind ssp !dbg !20 { +define i32 @main() nounwind ssp !dbg 0 !20 { entry: %0 = alloca %struct.SVal ; <%struct.SVal*> [#uses=3] %v = alloca %struct.SVal ; <%struct.SVal*> [#uses=4] 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 @@ -2,12 +2,12 @@ ; Radar 8286101 ; CHECK: .file {{[0-9]+}} "" -define i32 @foo() nounwind ssp !dbg !0 { +define i32 @foo() nounwind ssp !dbg 0 !0 { entry: ret i32 42, !dbg !8 } -define i32 @bar() nounwind ssp !dbg !6 { +define i32 @bar() nounwind ssp !dbg 0 !6 { entry: ret i32 21, !dbg !10 } 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 @@ -6,7 +6,7 @@ %struct.bar = type { i32, i32 } -define i32 @foo(%struct.bar* nocapture %i) nounwind readnone optsize noinline ssp !dbg !0 { +define i32 @foo(%struct.bar* nocapture %i) nounwind readnone optsize noinline ssp !dbg 0 !0 { ; CHECK: TAG_formal_parameter entry: tail call void @llvm.dbg.value(metadata %struct.bar* %i, i64 0, metadata !6, metadata !DIExpression()), !dbg !12 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 @@ -20,7 +20,7 @@ @.str1 = private unnamed_addr constant [14 x i8] c"m=%u, z_s=%d\0A\00" @str = internal constant [21 x i8] c"Failing test vector:\00" -define i64 @gcd(i64 %a, i64 %b) nounwind readnone optsize noinline ssp !dbg !0 { +define i64 @gcd(i64 %a, i64 %b) nounwind readnone optsize noinline ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i64 %a, i64 0, metadata !10, metadata !DIExpression()), !dbg !18 tail call void @llvm.dbg.value(metadata i64 %b, i64 0, metadata !11, metadata !DIExpression()), !dbg !19 @@ -38,7 +38,7 @@ ret i64 %b.addr.0, !dbg !23 } -define i32 @main() nounwind optsize ssp !dbg !6 { +define i32 @main() nounwind optsize ssp !dbg 0 !6 { entry: %call = tail call i32 @rand() nounwind optsize, !dbg !24 tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !14, metadata !DIExpression()), !dbg !24 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 @@ -14,7 +14,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define signext i16 @subdivp(%struct.node.0.27* nocapture %p, double %dsq, double %tolsq, %struct.hgstruct.2.29* nocapture byval align 8 %hg) nounwind uwtable readonly ssp !dbg !14 { +define signext i16 @subdivp(%struct.node.0.27* nocapture %p, double %dsq, double %tolsq, %struct.hgstruct.2.29* nocapture byval align 8 %hg) nounwind uwtable readonly ssp !dbg 0 !14 { entry: call void @llvm.dbg.declare(metadata %struct.hgstruct.2.29* %hg, metadata !4, metadata !DIExpression()), !dbg !DILocation(scope: !14) %type = getelementptr inbounds %struct.node.0.27, %struct.node.0.27* %p, i64 0, i32 0 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 @@ -14,7 +14,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @AttachGalley(%union.rec** nocapture %suspend_pt) nounwind uwtable ssp !dbg !21 { +define i32 @AttachGalley(%union.rec** nocapture %suspend_pt) nounwind uwtable ssp !dbg 0 !21 { entry: %num14075 = alloca [20 x i8], align 16 br label %if.end33 @@ -98,7 +98,7 @@ %"class.__gnu_cxx::hash_map" = type { %"class.__gnu_cxx::hashtable" } %"class.__gnu_cxx::hashtable" = type { i64, i64, i64, i64, i64, i64 } -define void @main() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !37 { +define void @main() uwtable ssp personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !37 { entry: %X = alloca %"class.__gnu_cxx::hash_map", align 8 br i1 undef, label %cond.true, label %cond.end 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 @@ -11,7 +11,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define void @test() unnamed_addr uwtable ssp align 2 !dbg !2 { +define void @test() unnamed_addr uwtable ssp align 2 !dbg 0 !2 { entry: %callback = alloca %struct.btCompoundLeafCallback, align 8 br i1 undef, label %if.end, label %if.then Index: test/CodeGen/X86/MachineSink-DbgValue.ll =================================================================== --- test/CodeGen/X86/MachineSink-DbgValue.ll +++ test/CodeGen/X86/MachineSink-DbgValue.ll @@ -3,7 +3,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -define i32 @foo(i32 %i, i32* nocapture %c) nounwind uwtable readonly ssp !dbg !1 { +define i32 @foo(i32 %i, i32* nocapture %c) nounwind uwtable readonly ssp !dbg 0 !1 { tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !6, metadata !DIExpression()), !dbg !12 %ab = load i32, i32* %c, align 1, !dbg !14 tail call void @llvm.dbg.value(metadata i32* %c, i64 0, metadata !7, metadata !DIExpression()), !dbg !13 Index: test/CodeGen/X86/bit-piece-comment.ll =================================================================== --- test/CodeGen/X86/bit-piece-comment.ll +++ test/CodeGen/X86/bit-piece-comment.ll @@ -19,7 +19,7 @@ %struct.anon = type { [2 x i32] } ; Function Attrs: norecurse nounwind optsize readnone uwtable -define void @_Z3fn1v() #0 !dbg !4 { +define void @_Z3fn1v() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.declare(metadata %struct.anon* undef, metadata !8, metadata !19), !dbg !20 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !8, metadata !21), !dbg !20 Index: test/CodeGen/X86/code_placement_cold_loop_blocks.ll =================================================================== --- test/CodeGen/X86/code_placement_cold_loop_blocks.ll +++ test/CodeGen/X86/code_placement_cold_loop_blocks.ll @@ -1,6 +1,6 @@ ; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux < %s | FileCheck %s -define void @foo() !prof !1 { +define void @foo() !prof 0 !1 { ; Test if a cold block in a loop will be placed at the end of the function ; chain. ; @@ -37,7 +37,7 @@ ret void } -define void @nested_loop_0() !prof !1 { +define void @nested_loop_0() !prof 0 !1 { ; Test if a block that is cold in the inner loop but not cold in the outer loop ; will merged to the outer loop chain. ; @@ -76,7 +76,7 @@ ret void } -define void @nested_loop_1() !prof !1 { +define void @nested_loop_1() !prof 0 !1 { ; Test if a cold block in an inner loop will be placed at the end of the ; function chain. ; Index: test/CodeGen/X86/code_placement_loop_rotation.ll =================================================================== --- test/CodeGen/X86/code_placement_loop_rotation.ll +++ test/CodeGen/X86/code_placement_loop_rotation.ll @@ -36,7 +36,7 @@ ret void } -define void @bar() !prof !1 { +define void @bar() !prof 0 !1 { ; Test that all edges in the loop chain are fall through with profile data. ; ; CHECK-PROFILE-LABEL: bar: Index: test/CodeGen/X86/code_placement_loop_rotation2.ll =================================================================== --- test/CodeGen/X86/code_placement_loop_rotation2.ll +++ test/CodeGen/X86/code_placement_loop_rotation2.ll @@ -55,7 +55,7 @@ ret void } -define void @bar() !prof !1 { +define void @bar() !prof 0 !1 { ; Test a nested loop case when profile data is available. ; ; CHECK-PROFILE-LABEL: bar: 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 @@ -48,7 +48,7 @@ @.str.2 = private unnamed_addr constant [2 x i8] c"-\00", align 1 ; Function Attrs: uwtable -define void @_Z3barii(i32 %param1, i32 %param2) #0 !dbg !24 { +define void @_Z3barii(i32 %param1, i32 %param2) #0 !dbg 0 !24 { entry: %var1 = alloca %struct.AAA3, align 1 %var2 = alloca %struct.AAA3, align 1 Index: test/CodeGen/X86/dbg-combine.ll =================================================================== --- test/CodeGen/X86/dbg-combine.ll +++ test/CodeGen/X86/dbg-combine.ll @@ -24,7 +24,7 @@ ; ModuleID = 'dbg-combine.c' ; Function Attrs: nounwind uwtable -define i32 @foo() #0 !dbg !4 { +define i32 @foo() #0 !dbg 0 !4 { entry: %elems = alloca i32, align 4 %saved_stack = alloca i8* Index: test/CodeGen/X86/debugloc-argsize.ll =================================================================== --- test/CodeGen/X86/debugloc-argsize.ll +++ test/CodeGen/X86/debugloc-argsize.ll @@ -3,7 +3,7 @@ ; CHECK-LABEL: _Z3foov: ; CHECK: .loc 1 4 3 prologue_end ; CHECK: .cfi_escape 0x2e, 0x10 -define void @_Z3foov() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !4 { +define void @_Z3foov() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !4 { entry: tail call void @_Z3bariii(i32 0, i32 1, i32 2) #1, !dbg !10 invoke void @_Z3bariii(i32 4, i32 5, i32 6) #1 Index: test/CodeGen/X86/fpstack-debuginstr-kill.ll =================================================================== --- test/CodeGen/X86/fpstack-debuginstr-kill.ll +++ test/CodeGen/X86/fpstack-debuginstr-kill.ll @@ -1,9 +1,9 @@ ; RUN: llc < %s -mcpu=generic -mtriple=i386-apple-darwin -no-integrated-as -@g1 = global double 0.000000e+00, align 8 -@g2 = global i32 0, align 4 +@g1 = global double 0.000000e+00, align 8, !dbg 0 !22 +@g2 = global i32 0, align 4, !dbg 0 !23 -define void @_Z16fpuop_arithmeticjj(i32, i32) !dbg !4 { +define void @_Z16fpuop_arithmeticjj(i32, i32) !dbg 0 !4 { entry: switch i32 undef, label %sw.bb.i1921 [ ] @@ -64,7 +64,7 @@ !19 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !20 = !DILocalVariable(name: "value", line: 16, scope: !4, file: !6, type: !14) !21 = !{!22, !23} -!22 = !DIGlobalVariable(name: "g1", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14, variable: double* @g1) -!23 = !DIGlobalVariable(name: "g2", line: 6, isLocal: false, isDefinition: true, scope: null, file: !6, type: !19, variable: i32* @g2) +!22 = !DIGlobalVariable(name: "g1", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14) +!23 = !DIGlobalVariable(name: "g2", line: 6, isLocal: false, isDefinition: true, scope: null, file: !6, type: !19) !24 = !{i32 2, !"Dwarf Version", i32 2} !25 = !{i32 2, !"Debug Info Version", i32 3} Index: test/CodeGen/X86/loc-remat.ll =================================================================== --- test/CodeGen/X86/loc-remat.ll +++ test/CodeGen/X86/loc-remat.ll @@ -4,7 +4,7 @@ @x = common global i32 0, align 4 -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %0 = load volatile i32, i32* @x, align 4, !dbg !9, !tbaa !10 %add = add nsw i32 %0, 24, !dbg !9 Index: test/CodeGen/X86/mbp-false-cfg-break.ll =================================================================== --- test/CodeGen/X86/mbp-false-cfg-break.ll +++ test/CodeGen/X86/mbp-false-cfg-break.ll @@ -1,6 +1,6 @@ ; RUN: llc < %s -march=x86-64 | FileCheck %s -define void @test(i1 %cnd) !prof !{!"function_entry_count", i64 1024} { +define void @test(i1 %cnd) !prof 0 !{!"function_entry_count", i64 1024} { ; CHECK-LABEL: @test ; Using the assembly comments to indicate block order.. ; CHECK: # %loop 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 @@ -22,7 +22,7 @@ %class.C = type { i8 } -@argc = global i8 0, align 1 +@argc = global i8 0, align 1, !dbg 0 !21 declare i32 @test_function(%class.C*, i8 signext, i8 signext, i8 signext, ...) @@ -43,7 +43,7 @@ ; CHECK-LABEL: test_with_debug ; CHECK: movl [[A]], [[B]] ; CHECK-NEXT: movl [[A]], [[C]] -define void @test_with_debug() !dbg !13 { +define void @test_with_debug() !dbg 0 !13 { entry: %c = alloca %class.C, align 1 %0 = load i8, i8* @argc, align 1 @@ -82,7 +82,7 @@ !18 = !DILocalVariable(name: "c", line: 7, scope: !13, file: !14, type: !4) !19 = !DILocalVariable(name: "lc", line: 8, scope: !13, file: !14, type: !11) !20 = !{!21} -!21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11, variable: i8* @argc) +!21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11) !22 = !{i32 2, !"Dwarf Version", i32 4} !23 = !{i32 2, !"Debug Info Version", i32 3} !25 = !DILocation(line: 8, column: 3, scope: !13) Index: test/CodeGen/X86/movpc32-check.ll =================================================================== --- test/CodeGen/X86/movpc32-check.ll +++ test/CodeGen/X86/movpc32-check.ll @@ -4,7 +4,7 @@ target triple = "i686-pc-linux" ; Function Attrs: nounwind -define void @test() #0 !dbg !4 { +define void @test() #0 !dbg 0 !4 { entry: call void bitcast (void (...)* @bar to void ()*)(), !dbg !11 ret void, !dbg !12 Index: test/CodeGen/X86/partition-sections.ll =================================================================== --- test/CodeGen/X86/partition-sections.ll +++ test/CodeGen/X86/partition-sections.ll @@ -13,7 +13,7 @@ ; PARTITION: .globl _Z3barv ; NO-PARTITION-FUNCTION-SECTION: .text._Z3barv ; PARTITION-FUNCTION-SECTION: .text.unlikely._Z3barv -define i32 @_Z3barv() #1 !prof !0 { +define i32 @_Z3barv() #1 !prof 0 !0 { ret i32 1 } Index: test/CodeGen/X86/push-cfi-debug.ll =================================================================== --- test/CodeGen/X86/push-cfi-debug.ll +++ test/CodeGen/X86/push-cfi-debug.ll @@ -25,7 +25,7 @@ ; CHECK: .cfi_adjust_cfa_offset -8 ; CHECK: addl $20, %esp ; CHECK: .cfi_adjust_cfa_offset -8 -define void @test1() #0 !dbg !4 { +define void @test1() #0 !dbg 0 !4 { entry: tail call void @foo(i32 1, i32 2) #1, !dbg !10 tail call x86_stdcallcc void @stdfoo(i32 3, i32 4) #1, !dbg !11 Index: test/CodeGen/X86/stack-protector-dbginfo.ll =================================================================== --- test/CodeGen/X86/stack-protector-dbginfo.ll +++ test/CodeGen/X86/stack-protector-dbginfo.ll @@ -8,7 +8,7 @@ @a = external global { i64, [56 x i8] }, align 32 ; Function Attrs: nounwind sspreq -define i32 @_Z18read_response_sizev() #0 !dbg !9 { +define i32 @_Z18read_response_sizev() #0 !dbg 0 !9 { entry: tail call void @llvm.dbg.value(metadata !22, i64 0, metadata !23, metadata !DIExpression()), !dbg !39 %0 = load i64, i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0), align 8, !dbg !40 Index: test/CodeGen/X86/unknown-location.ll =================================================================== --- test/CodeGen/X86/unknown-location.ll +++ test/CodeGen/X86/unknown-location.ll @@ -10,7 +10,7 @@ ; CHECK-NEXT: idivl ; CHECK-NEXT: .loc 1 4 3 -define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind !dbg !1 { +define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind !dbg 0 !1 { entry: %a = add i32 %w, %x, !dbg !8 %b = sdiv i32 %a, %y Index: test/CodeGen/XCore/dwarf_debug.ll =================================================================== --- test/CodeGen/XCore/dwarf_debug.ll +++ test/CodeGen/XCore/dwarf_debug.ll @@ -9,7 +9,7 @@ ; CHECK: .loc 1 2 0 prologue_end # test.c:2:0 ; CHECK: add r0, r0, 1 ; CHECK: retsp 2 -define i32 @f(i32 %a) !dbg !4 { +define i32 @f(i32 %a) !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 Index: test/DebugInfo/AArch64/big-endian.ll =================================================================== --- test/DebugInfo/AArch64/big-endian.ll +++ test/DebugInfo/AArch64/big-endian.ll @@ -3,7 +3,7 @@ target datalayout = "E-m:e-i64:64-i128:128-n32:64-S128" target triple = "aarch64_be--none-eabi" -@a = common global i32 0, align 4 +@a = common global i32 0, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} @@ -13,7 +13,7 @@ !1 = !DIFile(filename: "-", directory: "/work/validation") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !7, variable: i32* @a) +!4 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !7) !5 = !DIFile(filename: "", directory: "/work/validation") !6 = !{!"", !"/work/validation"} !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/AArch64/bitfields.ll =================================================================== --- test/DebugInfo/AArch64/bitfields.ll +++ test/DebugInfo/AArch64/bitfields.ll @@ -48,7 +48,7 @@ %struct.bitfield = type <{ i8, [3 x i8], i64 }> -@b = common global %struct.bitfield zeroinitializer, align 4 +@b = common global %struct.bitfield zeroinitializer, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !14, !15} @@ -58,7 +58,7 @@ !1 = !DIFile(filename: "bitfields.c", directory: "/") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "b", scope: !0, file: !5, line: 8, type: !6, isLocal: false, isDefinition: true, variable: %struct.bitfield* @b) +!4 = !DIGlobalVariable(name: "b", scope: !0, file: !5, line: 8, type: !6, isLocal: false, isDefinition: true) !5 = !DIFile(filename: "bitfields.c", directory: "/") !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "bitfield", file: !5, line: 1, size: 96, align: 32, elements: !7) !7 = !{!8, !10, !11, !12} Index: test/DebugInfo/AArch64/cfi-eof-prologue.ll =================================================================== --- test/DebugInfo/AArch64/cfi-eof-prologue.ll +++ test/DebugInfo/AArch64/cfi-eof-prologue.ll @@ -26,7 +26,7 @@ @_ZTV1B = external unnamed_addr constant [4 x i8*] ; Function Attrs: nounwind -define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !28 { +define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg 0 !28 { entry: tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !30, metadata !38), !dbg !39 %0 = getelementptr inbounds %struct.B, %struct.B* %this, i64 0, i32 0, !dbg !40 @@ -39,7 +39,7 @@ declare %struct.A* @_ZN1AC2Ev(%struct.A*) ; Function Attrs: nounwind -define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !32 { +define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg 0 !32 { entry: tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !34, metadata !38), !dbg !44 tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !45, metadata !38) #3, !dbg !47 Index: test/DebugInfo/AArch64/coalescing.ll =================================================================== --- test/DebugInfo/AArch64/coalescing.ll +++ test/DebugInfo/AArch64/coalescing.ll @@ -14,7 +14,7 @@ target triple = "arm64-apple-ios" ; Function Attrs: nounwind optsize -define void @_Z5startv() #0 !dbg !4 { +define void @_Z5startv() #0 !dbg 0 !4 { entry: %size = alloca i32, align 4 %0 = bitcast i32* %size to i8*, !dbg !15 Index: test/DebugInfo/AArch64/constant-dbgloc.ll =================================================================== --- test/DebugInfo/AArch64/constant-dbgloc.ll +++ test/DebugInfo/AArch64/constant-dbgloc.ll @@ -13,7 +13,7 @@ ; CHECK: movn ; Function Attrs: nounwind -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/AArch64/dwarfdump.ll =================================================================== --- test/DebugInfo/AArch64/dwarfdump.ll +++ test/DebugInfo/AArch64/dwarfdump.ll @@ -18,7 +18,7 @@ ; CHECK-4: DW_AT_high_pc [DW_FORM_data4] (0x00000008) ; CHECK-3: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008) -define i32 @main() nounwind !dbg !3 { +define i32 @main() nounwind !dbg 0 !3 { ret i32 0, !dbg !8 } Index: test/DebugInfo/AArch64/frameindices.ll =================================================================== --- test/DebugInfo/AArch64/frameindices.ll +++ test/DebugInfo/AArch64/frameindices.ll @@ -39,10 +39,10 @@ %struct.A = type { i8, i8*, i8 } %struct.B = type { i8 } -@a = global i64 0, align 8 -@b = global i32* null, align 8 +@a = global i64 0, align 8, !dbg 0 !41 +@b = global i32* null, align 8, !dbg 0 !42 -define void @_Z3f131A(%struct.A* nocapture readonly %p1) #0 !dbg !25 { +define void @_Z3f131A(%struct.A* nocapture readonly %p1) #0 !dbg 0 !25 { entry: %agg.tmp = alloca %struct.A, align 8 tail call void @llvm.dbg.declare(metadata %struct.A* %p1, metadata !30, metadata !46), !dbg !47 @@ -67,7 +67,7 @@ ; Function Attrs: nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #3 -define void @_Z3f111A(%struct.A* nocapture readonly %p1) #0 !dbg !31 { +define void @_Z3f111A(%struct.A* nocapture readonly %p1) #0 !dbg 0 !31 { entry: %agg.tmp.i = alloca %struct.A, align 8 tail call void @llvm.dbg.declare(metadata %struct.A* %p1, metadata !33, metadata !46), !dbg !63 @@ -83,7 +83,7 @@ ret void, !dbg !73 } -define void @_Z3f16v() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !34 { +define void @_Z3f16v() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !34 { entry: %agg.tmp.i.i = alloca %struct.A, align 8 %d = alloca %struct.B, align 1 @@ -200,8 +200,8 @@ !38 = !DILocalVariable(name: "c", line: 19, scope: !34, file: !26, type: !4) !39 = !DILocalVariable(name: "d", line: 20, scope: !34, file: !26, type: !14) !40 = !{!41, !42} -!41 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !26, type: !20, variable: i64* @a) -!42 = !DIGlobalVariable(name: "b", line: 7, isLocal: false, isDefinition: true, scope: null, file: !26, type: !12, variable: i32** @b) +!41 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !26, type: !20) +!42 = !DIGlobalVariable(name: "b", line: 7, isLocal: false, isDefinition: true, scope: null, file: !26, type: !12) !43 = !{i32 2, !"Dwarf Version", i32 2} !44 = !{i32 2, !"Debug Info Version", i32 3} !45 = !{!"clang version 3.7.0 "} Index: test/DebugInfo/AArch64/prologue_end.ll =================================================================== --- test/DebugInfo/AArch64/prologue_end.ll +++ test/DebugInfo/AArch64/prologue_end.ll @@ -6,7 +6,7 @@ ; func(); ; } -define void @prologue_end_test() nounwind uwtable !dbg !4 { +define void @prologue_end_test() nounwind uwtable !dbg 0 !4 { ; CHECK: prologue_end_test: ; CHECK: .cfi_startproc ; CHECK: sub sp, sp Index: test/DebugInfo/AArch64/struct_by_value.ll =================================================================== --- test/DebugInfo/AArch64/struct_by_value.ll +++ test/DebugInfo/AArch64/struct_by_value.ll @@ -31,7 +31,7 @@ %struct.five = type { i32, i32, i32, i32, i32 } ; Function Attrs: nounwind ssp -define i32 @return_five_int(%struct.five* %f) #0 !dbg !4 { +define i32 @return_five_int(%struct.five* %f) #0 !dbg 0 !4 { entry: call void @llvm.dbg.declare(metadata %struct.five* %f, metadata !17, metadata !DIExpression(DW_OP_deref)), !dbg !18 %a = getelementptr inbounds %struct.five, %struct.five* %f, i32 0, i32 0, !dbg !19 Index: test/DebugInfo/ARM/PR16736.ll =================================================================== --- test/DebugInfo/ARM/PR16736.ll +++ test/DebugInfo/ARM/PR16736.ll @@ -13,7 +13,7 @@ target triple = "thumbv7-apple-ios" ; Function Attrs: nounwind -define arm_aapcscc void @_Z1hiiiif(i32, i32, i32, i32, float %x) #0 !dbg !4 { +define arm_aapcscc void @_Z1hiiiif(i32, i32, i32, i32, float %x) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !12, metadata !DIExpression()), !dbg !18 tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !13, metadata !DIExpression()), !dbg !18 Index: test/DebugInfo/ARM/PR26163.ll =================================================================== --- test/DebugInfo/ARM/PR26163.ll +++ test/DebugInfo/ARM/PR26163.ll @@ -56,7 +56,7 @@ declare void @foo() -define i32 @parse_config_file() !dbg !4 { +define i32 @parse_config_file() !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !15, metadata !26), !dbg !27 tail call void @llvm.dbg.declare(metadata %struct.timeval* undef, metadata !16, metadata !26), !dbg !29 Index: test/DebugInfo/ARM/big-endian-bitfield.ll =================================================================== --- test/DebugInfo/ARM/big-endian-bitfield.ll +++ test/DebugInfo/ARM/big-endian-bitfield.ll @@ -12,7 +12,7 @@ %struct.S = type { i24 } -@s = common global %struct.S zeroinitializer, align 4 +@s = common global %struct.S zeroinitializer, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12, !13, !14} @@ -22,7 +22,7 @@ !1 = !DIFile(filename: "bitfield.c", directory: "/Volumes/Data/llvm") !2 = !{} !3 = !{!4} -!4 = distinct !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, variable: %struct.S* @s) +!4 = distinct !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true) !5 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !1, line: 1, size: 32, align: 32, elements: !6) !6 = !{!7, !9, !10, !11} ; CHECK: DW_TAG_member Index: test/DebugInfo/ARM/bitfield.ll =================================================================== --- test/DebugInfo/ARM/bitfield.ll +++ test/DebugInfo/ARM/bitfield.ll @@ -20,7 +20,7 @@ %struct.anon = type { i8, [5 x i8] } -@a = common global %struct.anon zeroinitializer, align 1 +@a = common global %struct.anon zeroinitializer, align 1, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!11, !12, !13, !14, !15} @@ -30,7 +30,7 @@ !1 = !DIFile(filename: "test.i", directory: "/") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, variable: %struct.anon* @a) +!4 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true) !5 = !DICompositeType(tag: DW_TAG_structure_type, file: !1, line: 1, size: 48, align: 8, elements: !6) !6 = !{!7, !9} !7 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !5, file: !1, line: 2, baseType: !8, size: 8, align: 8) Index: test/DebugInfo/ARM/cfi-eof-prologue.ll =================================================================== --- test/DebugInfo/ARM/cfi-eof-prologue.ll +++ test/DebugInfo/ARM/cfi-eof-prologue.ll @@ -27,7 +27,7 @@ @_ZTV1B = external unnamed_addr constant [4 x i8*] ; Function Attrs: nounwind -define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !28 { +define %struct.B* @_ZN1BC2Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg 0 !28 { entry: tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !30, metadata !40), !dbg !41 %0 = getelementptr inbounds %struct.B, %struct.B* %this, i32 0, i32 0, !dbg !42 @@ -40,7 +40,7 @@ declare %struct.A* @_ZN1AC2Ev(%struct.A*) ; Function Attrs: nounwind -define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg !32 { +define %struct.B* @_ZN1BC1Ev(%struct.B* %this) unnamed_addr #0 align 2 !dbg 0 !32 { entry: tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !34, metadata !40), !dbg !46 tail call void @llvm.dbg.value(metadata %struct.B* %this, i64 0, metadata !47, metadata !40) #3, !dbg !49 Index: test/DebugInfo/ARM/constant-dbgloc.ll =================================================================== --- test/DebugInfo/ARM/constant-dbgloc.ll +++ test/DebugInfo/ARM/constant-dbgloc.ll @@ -13,7 +13,7 @@ ; CHECK: mvn ; Function Attrs: nounwind -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/ARM/float-args.ll =================================================================== --- test/DebugInfo/ARM/float-args.ll +++ test/DebugInfo/ARM/float-args.ll @@ -16,7 +16,7 @@ target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv7--none-eabi" -define float @foo(float %p) !dbg !4 { +define float @foo(float %p) !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata float %p, i64 0, metadata !9, metadata !15), !dbg !16 ret float %p, !dbg !18 Index: test/DebugInfo/ARM/header.ll =================================================================== --- test/DebugInfo/ARM/header.ll +++ test/DebugInfo/ARM/header.ll @@ -12,7 +12,7 @@ ; CHECK: .section __DWARF,__debug_str,regular,debug -define void @f() !dbg !4 { +define void @f() !dbg 0 !4 { ret void, !dbg !9 } !llvm.dbg.cu = !{!0} Index: test/DebugInfo/ARM/lowerbdgdeclare_vla.ll =================================================================== --- test/DebugInfo/ARM/lowerbdgdeclare_vla.ll +++ test/DebugInfo/ARM/lowerbdgdeclare_vla.ll @@ -17,7 +17,7 @@ target triple = "thumbv7-apple-ios8.0.0" ; Function Attrs: nounwind optsize readnone -define void @run(float %r) #0 !dbg !4 { +define void @run(float %r) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.declare(metadata float %r, metadata !11, metadata !DIExpression()), !dbg !22 %conv = fptosi float %r to i32, !dbg !23 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 @@ -15,11 +15,11 @@ target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv7--linux-gnueabihf" -@ch = common global i8 0, align 1 -@b = common global i32 0, align 4 +@ch = common global i8 0, align 1, !dbg 0 !8 +@b = common global i32 0, align 4, !dbg 0 !10 ; Function Attrs: nounwind -define void @proc() #0 !dbg !4 { +define void @proc() #0 !dbg 0 !4 { entry: store i8 65, i8* @ch, align 1, !dbg !17 store i32 0, i32* @b, align 4, !dbg !18 @@ -39,9 +39,9 @@ !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !{!8, !10} -!8 = !DIGlobalVariable(name: "ch", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true, variable: i8* @ch) +!8 = !DIGlobalVariable(name: "ch", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true) !9 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) -!10 = !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 2, type: !11, isLocal: false, isDefinition: true, variable: i32* @b) +!10 = !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 2, type: !11, isLocal: false, isDefinition: true) !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !12 = !{i32 2, !"Dwarf Version", i32 4} !13 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/ARM/prologue_end.ll =================================================================== --- test/DebugInfo/ARM/prologue_end.ll +++ test/DebugInfo/ARM/prologue_end.ll @@ -7,7 +7,7 @@ ; func(); ; } -define void @prologue_end_test() nounwind uwtable !dbg !4 { +define void @prologue_end_test() nounwind uwtable !dbg 0 !4 { ; CHECK: prologue_end_test: ; CHECK: .cfi_startproc ; CHECK: push {r7, lr} Index: test/DebugInfo/ARM/s-super-register.ll =================================================================== --- test/DebugInfo/ARM/s-super-register.ll +++ test/DebugInfo/ARM/s-super-register.ll @@ -9,7 +9,7 @@ ; 0x9d DW_OP_bit_piece ; CHECK: Location description: 90 {{.. .. ((93 ..)|(9d .. ..)) $}} -define void @_Z3foov() optsize ssp !dbg !1 { +define void @_Z3foov() optsize ssp !dbg 0 !1 { entry: %call = tail call float @_Z3barv() optsize, !dbg !11 tail call void @llvm.dbg.value(metadata float %call, i64 0, metadata !5, metadata !DIExpression()), !dbg !11 Index: test/DebugInfo/ARM/selectiondag-deadcode.ll =================================================================== --- test/DebugInfo/ARM/selectiondag-deadcode.ll +++ test/DebugInfo/ARM/selectiondag-deadcode.ll @@ -1,7 +1,7 @@ ; RUN: llc -filetype=asm < %s | FileCheck %s target triple = "thumbv7-apple-ios7.0.0" %class.Matrix3.0.6.10 = type { [9 x float] } -define arm_aapcscc void @_Z9GetMatrixv(%class.Matrix3.0.6.10* noalias nocapture sret %agg.result) #0 !dbg !39 { +define arm_aapcscc void @_Z9GetMatrixv(%class.Matrix3.0.6.10* noalias nocapture sret %agg.result) #0 !dbg 0 !39 { br i1 fcmp oeq (float fadd (float fadd (float fmul (float undef, float undef), float fmul (float undef, float undef)), float fmul (float undef, float undef)), float 0.000000e+00), label %_ZN7Vector39NormalizeEv.exit, label %1 tail call arm_aapcscc void @_ZL4Sqrtd() #3 br label %_ZN7Vector39NormalizeEv.exit 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 @@ -16,7 +16,7 @@ target triple = "armv7--linux-gnueabihf" ; Function Attrs: nounwind -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %retval = alloca i32, align 4 %x = alloca i32, align 4 Index: test/DebugInfo/ARM/split-complex.ll =================================================================== --- test/DebugInfo/ARM/split-complex.ll +++ test/DebugInfo/ARM/split-complex.ll @@ -8,7 +8,7 @@ ; void f(_Complex double c) { c = 0; } ; Function Attrs: nounwind readnone -define arm_aapcscc void @f([2 x i64] %c.coerce) #0 !dbg !4 { +define arm_aapcscc void @f([2 x i64] %c.coerce) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.declare(metadata { double, double }* undef, metadata !14, metadata !15), !dbg !16 ; The target has no native double type. Index: test/DebugInfo/ARM/sroa-complex.ll =================================================================== --- test/DebugInfo/ARM/sroa-complex.ll +++ test/DebugInfo/ARM/sroa-complex.ll @@ -7,7 +7,7 @@ ; void f(_Complex double c) { c = 0; } ; Function Attrs: nounwind -define arm_aapcscc void @f([2 x i64] %c.coerce) #0 !dbg !4 { +define arm_aapcscc void @f([2 x i64] %c.coerce) #0 !dbg 0 !4 { entry: %c = alloca { double, double }, align 8 %0 = bitcast { double, double }* %c to [2 x i64]* Index: test/DebugInfo/ARM/tls.ll =================================================================== --- test/DebugInfo/ARM/tls.ll +++ test/DebugInfo/ARM/tls.ll @@ -6,7 +6,7 @@ ; Generated with clang with source ; __thread int x; -@x = thread_local global i32 0, align 4 +@x = thread_local global i32 0, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} @@ -26,7 +26,7 @@ !1 = !DIFile(filename: "tls.c", directory: "/tmp") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @x) +!4 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "tls.c", directory: "/tmp") !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !{i32 2, !"Dwarf Version", i32 4} Index: test/DebugInfo/COFF/asan-module-ctor.ll =================================================================== --- test/DebugInfo/COFF/asan-module-ctor.ll +++ test/DebugInfo/COFF/asan-module-ctor.ll @@ -24,7 +24,7 @@ @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }] ; Function Attrs: nounwind sanitize_address -define i32 @foo() #0 !dbg !4 { +define i32 @foo() #0 !dbg 0 !4 { entry: ret i32 0, !dbg !10 } Index: test/DebugInfo/COFF/asm.ll =================================================================== --- test/DebugInfo/COFF/asm.ll +++ test/DebugInfo/COFF/asm.ll @@ -196,7 +196,7 @@ ; OBJ64-NEXT: ] ; Function Attrs: nounwind -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: call void asm sideeffect inteldialect ".align 4", "~{dirflag},~{fpsr},~{flags}"() #2, !dbg !12 call void @g(), !dbg !13 Index: test/DebugInfo/COFF/cpp-mangling.ll =================================================================== --- test/DebugInfo/COFF/cpp-mangling.ll +++ test/DebugInfo/COFF/cpp-mangling.ll @@ -15,7 +15,7 @@ ; CHECK-NEXT: LinkageName: ?bar@foo@@YAHH@Z ; Function Attrs: nounwind uwtable -define i32 @"\01?bar@foo@@YAHH@Z"(i32 %x) #0 !dbg !4 { +define i32 @"\01?bar@foo@@YAHH@Z"(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 Index: test/DebugInfo/COFF/fp-stack.ll =================================================================== --- test/DebugInfo/COFF/fp-stack.ll +++ test/DebugInfo/COFF/fp-stack.ll @@ -3,7 +3,7 @@ target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-windows-msvc18.0.0" -define double @f(double %p1) !dbg !4 { +define double @f(double %p1) !dbg 0 !4 { entry: %sub = fsub double -0.000000e+00, %p1, !dbg !16 tail call void @llvm.dbg.value(metadata double %sub, i64 0, metadata !10, metadata !14), !dbg !15 Index: test/DebugInfo/COFF/inlining-files.ll =================================================================== --- test/DebugInfo/COFF/inlining-files.ll +++ test/DebugInfo/COFF/inlining-files.ll @@ -44,10 +44,10 @@ target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc18.0.0" -@x = common global i32 0, align 4 +@x = common global i32 0, align 4, !dbg 0 !9 ; Function Attrs: norecurse nounwind uwtable -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: %0 = load volatile i32, i32* @x, align 4, !dbg !16, !tbaa !17 %inc = add nsw i32 %0, 1, !dbg !16 @@ -84,7 +84,7 @@ !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, 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) +!9 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true) !10 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !11) !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !12 = !{i32 2, !"CodeView", i32 1} Index: test/DebugInfo/COFF/inlining-levels.ll =================================================================== --- test/DebugInfo/COFF/inlining-levels.ll +++ test/DebugInfo/COFF/inlining-levels.ll @@ -41,10 +41,10 @@ target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc18.0.0" -@"\01?x@@3HC" = global i32 0, align 4 +@"\01?x@@3HC" = global i32 0, align 4, !dbg 0 !14 ; Function Attrs: norecurse nounwind uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %0 = load volatile i32, i32* @"\01?x@@3HC", align 4, !dbg !20, !tbaa !24 %inc.i.i.i = add nsw i32 %0, 1, !dbg !20 @@ -71,7 +71,7 @@ !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") +!14 = !DIGlobalVariable(name: "x", linkageName: "\01?x@@3HC", scope: !0, file: !1, line: 1, type: !15, isLocal: false, isDefinition: true) !15 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) !16 = !{i32 2, !"CodeView", i32 1} !17 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/COFF/inlining.ll =================================================================== --- test/DebugInfo/COFF/inlining.ll +++ test/DebugInfo/COFF/inlining.ll @@ -174,7 +174,7 @@ @"\01?x@@3HC" = external global i32, align 4 ; Function Attrs: norecurse nounwind uwtable -define void @"\01?baz@@YAXXZ"() #0 !dbg !4 { +define void @"\01?baz@@YAXXZ"() #0 !dbg 0 !4 { entry: %y.i.i = alloca i32, align 4 %0 = load volatile i32, i32* @"\01?x@@3HC", align 4, !dbg !12, !tbaa !13 Index: test/DebugInfo/COFF/local-constant.ll =================================================================== --- test/DebugInfo/COFF/local-constant.ll +++ test/DebugInfo/COFF/local-constant.ll @@ -29,7 +29,7 @@ target triple = "x86_64-pc-windows-msvc18.0.0" ; Function Attrs: nounwind uwtable -define void @"\01?constant_var@@YAXXZ"() #0 !dbg !4 { +define void @"\01?constant_var@@YAXXZ"() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !8, metadata !14), !dbg !15 tail call void @"\01?useint@@YAXH@Z"(i32 42) #3, !dbg !16 Index: test/DebugInfo/COFF/local-variables.ll =================================================================== --- test/DebugInfo/COFF/local-variables.ll +++ test/DebugInfo/COFF/local-variables.ll @@ -227,7 +227,7 @@ target triple = "x86_64-pc-windows-msvc18.0.0" ; Function Attrs: nounwind uwtable -define void @f(i32 %param) #0 !dbg !4 { +define void @f(i32 %param) #0 !dbg 0 !4 { entry: %v.i1 = alloca i32, align 4 call void @llvm.dbg.declare(metadata i32* %v.i1, metadata !15, metadata !16), !dbg !17 Index: test/DebugInfo/COFF/multifile.ll =================================================================== --- test/DebugInfo/COFF/multifile.ll +++ test/DebugInfo/COFF/multifile.ll @@ -229,7 +229,7 @@ ; OBJ64-NEXT: ] ; Function Attrs: nounwind -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: call void @g(), !dbg !12 call void @g(), !dbg !15 Index: test/DebugInfo/COFF/multifunction.ll =================================================================== --- test/DebugInfo/COFF/multifunction.ll +++ test/DebugInfo/COFF/multifunction.ll @@ -553,7 +553,7 @@ ; OBJ64-NEXT: ] ; Function Attrs: nounwind -define void @x() #0 !dbg !4 { +define void @x() #0 !dbg 0 !4 { entry: call void @z(), !dbg !14 ret void, !dbg !15 @@ -562,14 +562,14 @@ declare void @z() #1 ; Function Attrs: nounwind -define void @y() #0 !dbg !9 { +define void @y() #0 !dbg 0 !9 { entry: call void @z(), !dbg !16 ret void, !dbg !17 } ; Function Attrs: nounwind -define void @f() #0 !dbg !10 { +define void @f() #0 !dbg 0 !10 { entry: call void @x(), !dbg !18 call void @y(), !dbg !19 Index: test/DebugInfo/COFF/register-variables.ll =================================================================== --- test/DebugInfo/COFF/register-variables.ll +++ test/DebugInfo/COFF/register-variables.ll @@ -192,10 +192,10 @@ target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc18.0.0" -@x = internal global i32 0, align 4 +@x = internal global i32 0, align 4, !dbg 0 !23 ; Function Attrs: nounwind uwtable -define void @f(i32 %p) #0 !dbg !4 { +define void @f(i32 %p) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %p, i64 0, metadata !9, metadata !29), !dbg !30 %tobool = icmp eq i32 %p, 0, !dbg !31 @@ -261,7 +261,7 @@ !20 = !DILocalVariable(name: "a", arg: 1, scope: !16, file: !1, line: 4, type: !7) !21 = !DILocalVariable(name: "b", scope: !16, file: !1, line: 5, type: !7) !22 = !{!23} -!23 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !24, isLocal: false, isDefinition: true, variable: i32* @x) +!23 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !24, isLocal: false, isDefinition: true) !24 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) !25 = !{i32 2, !"CodeView", i32 1} !26 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/COFF/simple.ll =================================================================== --- test/DebugInfo/COFF/simple.ll +++ test/DebugInfo/COFF/simple.ll @@ -191,7 +191,7 @@ ; OBJ64-NEXT: ] ; Function Attrs: nounwind -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: call void @g(), !dbg !12 ret void, !dbg !13 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 @@ -35,14 +35,14 @@ target triple = "i686-pc-win32" ; Function Attrs: nounwind -define void @"\01?spam@@YAXXZ"() #0 !dbg !4 { +define void @"\01?spam@@YAXXZ"() #0 !dbg 0 !4 { entry: tail call void @"\01?bar@@YAXHZZ"(), !dbg !11 ret void, !dbg !12 } ; Function Attrs: nounwind -define internal void @"\01?bar@@YAXHZZ"() #0 !dbg !7 { +define internal void @"\01?bar@@YAXHZZ"() #0 !dbg 0 !7 { entry: tail call void @"\01?foo@@YAXXZ"() #2, !dbg !13 ret void, !dbg !14 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 @@ -10,7 +10,7 @@ !4 = !DIFile(filename: "/foo", directory: "bar.cpp") !5 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: true, emissionKind: FullDebug, file: !4, enums: !{}, retainedTypes: !{}) -define <{i32, i32}> @f1() !dbg !0 { +define <{i32, i32}> @f1() !dbg 0 !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 @@ -2,7 +2,7 @@ ; Here variable bar is optimized away. Do not trip over while trying to generate debug info. -define i32 @foo() nounwind uwtable readnone ssp !dbg !5 { +define i32 @foo() nounwind uwtable readnone ssp !dbg 0 !5 { entry: ret i32 42, !dbg !15 } 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 @@ -1,5 +1,5 @@ ; RUN: llc %s -o /dev/null -@0 = internal constant i32 1 +@0 = internal constant i32 1, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} @@ -7,7 +7,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "g.c", directory: "/private/tmp") !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DIFile(filename: "g.c", directory: "/private/tmp") 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 @@ -1,6 +1,6 @@ ; RUN: llc < %s -o /dev/null -define void @bar(i32 %i) nounwind uwtable ssp !dbg !5 { +define void @bar(i32 %i) nounwind uwtable ssp !dbg 0 !5 { entry: tail call void (...) @foo() nounwind, !dbg !14 ret void, !dbg !16 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 @@ -2,7 +2,7 @@ ; Here _ZN1S3fooEv is defined in header file identified as AT_decl_file no. 2 in debug info. %struct.S = type <{ i8 }> -define i32 @_Z3barv() nounwind ssp !dbg !3 { +define i32 @_Z3barv() nounwind ssp !dbg 0 !3 { entry: %retval = alloca i32 ; [#uses=2] %0 = alloca i32 ; [#uses=2] @@ -20,7 +20,7 @@ ret i32 %retval1, !dbg !16 } -define linkonce_odr i32 @_ZN1S3fooEv(%struct.S* %this) nounwind ssp align 2 !dbg !12 { +define linkonce_odr i32 @_ZN1S3fooEv(%struct.S* %this) nounwind ssp align 2 !dbg 0 !12 { entry: %this_addr = alloca %struct.S* ; <%struct.S**> [#uses=1] %retval = alloca i32 ; [#uses=1] 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 @@ -21,7 +21,7 @@ %class.A = type { i8 } %class.B = type { i8 } -define i32 @main() ssp !dbg !2 { +define i32 @main() ssp !dbg 0 !2 { entry: %retval = alloca i32, align 4 ; [#uses=3] %b = alloca %class.A, align 1 ; <%class.A*> [#uses=1] @@ -35,7 +35,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr i32 @_ZN1B2fnEv(%class.A* %this) ssp align 2 !dbg !10 { +define linkonce_odr i32 @_ZN1B2fnEv(%class.A* %this) ssp align 2 !dbg 0 !10 { entry: %retval = alloca i32, align 4 ; [#uses=2] %this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2] @@ -54,7 +54,7 @@ ret i32 %0, !dbg !32 } -define internal i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %this) ssp align 2 !dbg !23 { +define internal i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %this) ssp align 2 !dbg 0 !23 { entry: %retval = alloca i32, align 4 ; [#uses=2] %this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2] 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 @@ -4,7 +4,7 @@ ; RUN: grep -v DW_AT_APPLE_omit_frame_ptr %t -define i32 @foo() nounwind ssp !dbg !1 { +define i32 @foo() nounwind ssp !dbg 0 !1 { entry: %retval = alloca i32 ; [#uses=2] %0 = alloca i32 ; [#uses=2] 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 @@ -7,12 +7,12 @@ ; CHECK: Compile Unit: ; CHECK: Compile Unit: -define i32 @foo() nounwind readnone ssp !dbg !2 { +define i32 @foo() nounwind readnone ssp !dbg 0 !2 { return: ret i32 42, !dbg !0 } -define i32 @bar() nounwind readnone ssp !dbg !10 { +define i32 @bar() nounwind readnone ssp !dbg 0 !10 { return: ret i32 21, !dbg !8 } 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 @@ -6,13 +6,13 @@ ; CHECK-NEXT: DW_AT_name -@i = common global i32 0 ; [#uses=2] +@i = common global i32 0, !dbg 0 !16 ; [#uses=2] declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @bar() nounwind ssp !dbg !6 { +define i32 @bar() nounwind ssp !dbg 0 !6 { entry: %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2] tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !59, metadata !DIExpression()), !dbg !19 @@ -45,7 +45,7 @@ !13 = !{!14, !15} !14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 10, size: 32, align: 32, file: !27, scope: !12, baseType: !5) !15 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 10, size: 32, align: 32, offset: 32, file: !27, scope: !12, baseType: !5) -!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5, variable: i32* @i) +!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5) !17 = !DILocation(line: 15, scope: !18) !18 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !6) !19 = !DILocation(line: 9, scope: !0, inlinedAt: !17) 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 @@ -2,7 +2,7 @@ ; PR7662 ; Do not add variables to !11 because it is a declaration entry. -define i32 @bar() nounwind readnone ssp !dbg !0 { +define i32 @bar() nounwind readnone ssp !dbg 0 !0 { entry: ret i32 42, !dbg !9 } 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 @@ -1,6 +1,6 @@ ; RUN: llc -O0 %s -o /dev/null -define void @CGRectStandardize(i32* sret %agg.result, i32* byval %rect) nounwind ssp !dbg !0 { +define void @CGRectStandardize(i32* sret %agg.result, i32* byval %rect) nounwind ssp !dbg 0 !0 { entry: call void @llvm.dbg.declare(metadata i32* %rect, metadata !23, metadata !DIExpression()), !dbg !24 ret void Index: test/DebugInfo/Generic/Inputs/gmlt.ll =================================================================== --- test/DebugInfo/Generic/Inputs/gmlt.ll +++ test/DebugInfo/Generic/Inputs/gmlt.ll @@ -98,26 +98,26 @@ ; CHECK: .apple{{.*}} contents: ; Function Attrs: nounwind uwtable -define void @_Z2f1v() #0 !dbg !4 { +define void @_Z2f1v() #0 !dbg 0 !4 { entry: ret void, !dbg !13 } ; Function Attrs: nounwind uwtable -define void @_Z2f2v() #0 section "__TEXT,__bar" !dbg !7 { +define void @_Z2f2v() #0 section "__TEXT,__bar" !dbg 0 !7 { entry: ret void, !dbg !14 } ; Function Attrs: alwaysinline nounwind uwtable -define void @_Z2f3v() #1 !dbg !8 { +define void @_Z2f3v() #1 !dbg 0 !8 { entry: call void @_Z2f1v(), !dbg !15 ret void, !dbg !16 } ; Function Attrs: nounwind uwtable -define void @_Z2f4v() #0 !dbg !9 { +define void @_Z2f4v() #0 !dbg 0 !9 { entry: call void @_Z2f1v() #2, !dbg !17 ret void, !dbg !19 Index: test/DebugInfo/Generic/PR20038.ll =================================================================== --- test/DebugInfo/Generic/PR20038.ll +++ test/DebugInfo/Generic/PR20038.ll @@ -55,7 +55,7 @@ @b = external global i8 ; Function Attrs: nounwind -define void @_Z4fun4v() #0 !dbg !12 { +define void @_Z4fun4v() #0 !dbg 0 !12 { entry: %this.addr.i.i = alloca %struct.C*, align 8, !dbg !21 %this.addr.i = alloca %struct.C*, align 8, !dbg !22 @@ -89,7 +89,7 @@ } ; Function Attrs: alwaysinline nounwind -define void @_ZN1CD1Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !17 { +define void @_ZN1CD1Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg 0 !17 { entry: %this.addr.i = alloca %struct.C*, align 8, !dbg !37 %this.addr = alloca %struct.C*, align 8 @@ -103,7 +103,7 @@ } ; Function Attrs: alwaysinline nounwind -define void @_ZN1CD2Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !16 { +define void @_ZN1CD2Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg 0 !16 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 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 @@ -52,18 +52,18 @@ -@ForceTopDown = common global i32 0, align 4 -@_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_ = common global i32 0, align 4 -@_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4 -@_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4 -@_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4 -@_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4 -@k1 = common global i32 0, align 4 -@is = common global i32 0, align 4 -@setStmt = common global i32 0, align 4 -@_ZN4llvm5TwineC1Ei = common global i32 0, align 4 -@_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4 -@_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4 +@ForceTopDown = common global i32 0, align 4, !dbg 0 !4 +@_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_ = common global i32 0, align 4, !dbg 0 !6 +@_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4, !dbg 0 !7 +@_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4, !dbg 0 !8 +@_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4, !dbg 0 !9 +@_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4, !dbg 0 !10 +@k1 = common global i32 0, align 4, !dbg 0 !11 +@is = common global i32 0, align 4, !dbg 0 !12 +@setStmt = common global i32 0, align 4, !dbg 0 !13 +@_ZN4llvm5TwineC1Ei = common global i32 0, align 4, !dbg 0 !14 +@_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4, !dbg 0 !15 +@_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4, !dbg 0 !16 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!17, !18, !19} @@ -73,19 +73,19 @@ !1 = !DIFile(filename: "hash-collisions.c", directory: "/tmp") !2 = !{} !3 = !{!4, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16} -!4 = !DIGlobalVariable(name: "ForceTopDown", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32* @ForceTopDown) +!4 = !DIGlobalVariable(name: "ForceTopDown", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true) !5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !DIGlobalVariable(name: "_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_) -!7 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE) -!8 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !0, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv) -!9 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE) -!10 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE) -!11 = !DIGlobalVariable(name: "k1", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, variable: i32* @k1) -!12 = !DIGlobalVariable(name: "is", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, variable: i32* @is) -!13 = !DIGlobalVariable(name: "setStmt", scope: !0, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, variable: i32* @setStmt) -!14 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !0, file: !1, line: 10, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm5TwineC1Ei) -!15 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !0, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE) -!16 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !0, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm22MachineModuleInfoMachOD2Ev) +!6 = !DIGlobalVariable(name: "_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true) +!7 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true) +!8 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !0, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true) +!9 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true) +!10 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true) +!11 = !DIGlobalVariable(name: "k1", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true) +!12 = !DIGlobalVariable(name: "is", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true) +!13 = !DIGlobalVariable(name: "setStmt", scope: !0, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true) +!14 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !0, file: !1, line: 10, type: !5, isLocal: false, isDefinition: true) +!15 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !0, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true) +!16 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !0, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true) !17 = !{i32 2, !"Dwarf Version", i32 2} !18 = !{i32 2, !"Debug Info Version", i32 3} !19 = !{i32 1, !"PIC Level", i32 2} Index: test/DebugInfo/Generic/array.ll =================================================================== --- test/DebugInfo/Generic/array.ll +++ test/DebugInfo/Generic/array.ll @@ -1,7 +1,7 @@ ; RUN: %llc_dwarf -O0 < %s | FileCheck %s ; Do not emit AT_upper_bound for an unbounded array. ; radar 9241695 -define i32 @main() nounwind ssp !dbg !0 { +define i32 @main() nounwind ssp !dbg 0 !0 { entry: %retval = alloca i32, align 4 %a = alloca [0 x i32], align 4 Index: test/DebugInfo/Generic/block-asan.ll =================================================================== --- test/DebugInfo/Generic/block-asan.ll +++ test/DebugInfo/Generic/block-asan.ll @@ -20,7 +20,7 @@ %struct.__block_byref_x = type { i8*, %struct.__block_byref_x*, i32, i32, i32 } ; Function Attrs: nounwind ssp uwtable -define void @foo() #0 !dbg !4 { +define void @foo() #0 !dbg 0 !4 { entry: %x = alloca %struct.__block_byref_x, align 8 call void @llvm.dbg.declare(metadata %struct.__block_byref_x* %x, metadata !12, metadata !22), !dbg !23 Index: test/DebugInfo/Generic/constant-pointers.ll =================================================================== --- test/DebugInfo/Generic/constant-pointers.ll +++ test/DebugInfo/Generic/constant-pointers.ll @@ -19,7 +19,7 @@ ; CHECK: DW_AT_const_value [DW_FORM_udata] (0) ; Function Attrs: nounwind uwtable -define weak_odr void @_Z4funcILPv0ELPFvvE0ELi42EEvv() #0 !dbg !4 { +define weak_odr void @_Z4funcILPv0ELPFvvE0ELi42EEvv() #0 !dbg 0 !4 { entry: ret void, !dbg !18 } 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 @@ -3,7 +3,7 @@ ; CHECK: t{{[0-9]+}}: i32 = Constant<-1>test.c:4:5 -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval 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 @@ -3,7 +3,7 @@ ; CHECK: t{{[0-9]+}}: f64 = ConstantFP<1.500000e+00>test.c:3:5 -define double @f() !dbg !4 { +define double @f() !dbg 0 !4 { entry: ret double 1.500000e+00, !dbg !10 } Index: test/DebugInfo/Generic/cross-cu-inlining.ll =================================================================== --- test/DebugInfo/Generic/cross-cu-inlining.ll +++ test/DebugInfo/Generic/cross-cu-inlining.ll @@ -66,7 +66,7 @@ @i = external global i32 ; Function Attrs: uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %x.addr.i = alloca i32, align 4 %retval = alloca i32, align 4 @@ -84,7 +84,7 @@ } ; Function Attrs: alwaysinline nounwind uwtable -define i32 @_Z4funci(i32 %x) #1 !dbg !12 { +define i32 @_Z4funci(i32 %x) #1 !dbg 0 !12 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 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 @@ -37,11 +37,11 @@ ; CHECK: DW_AT_name {{.*}}"a.cpp" ; CHECK: DW_AT_name {{.*}} "func" -@x = global i32 (i32)* @_Z4funci, align 8 -@y = global i32 (i32)* @_Z4funci, align 8 +@x = global i32 (i32)* @_Z4funci, align 8, !dbg 0 !10 +@y = global i32 (i32)* @_Z4funci, align 8, !dbg 0 !18 ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 { +define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg 0 !4 { %1 = alloca i32, align 4 store i32 %i, i32* %1, align 4 call void @llvm.dbg.declare(metadata i32* %1, metadata !22, metadata !DIExpression()), !dbg !23 @@ -69,14 +69,14 @@ !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !{!10} -!10 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !11, variable: i32 (i32)** @x) +!10 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !11) !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, globals: !17, imports: !2) !13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") !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) +!18 = !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !11) !19 = !{i32 2, !"Dwarf Version", i32 4} !20 = !{i32 1, !"Debug Info Version", i32 3} !21 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/Generic/cross-cu-linkonce.ll =================================================================== --- test/DebugInfo/Generic/cross-cu-linkonce.ll +++ test/DebugInfo/Generic/cross-cu-linkonce.ll @@ -25,11 +25,11 @@ ; CHECK: DW_TAG_compile_unit ; CHECK-NOT: DW_TAG_subprogram -@x = global i32 (i32)* @_Z4funci, align 8 -@y = global i32 (i32)* @_Z4funci, align 8 +@x = global i32 (i32)* @_Z4funci, align 8, !dbg 0 !11 +@y = global i32 (i32)* @_Z4funci, align 8, !dbg 0 !16 ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 { +define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg 0 !4 { %1 = alloca i32, align 4 store i32 %i, i32* %1, align 4 call void @llvm.dbg.declare(metadata i32* %1, metadata !20, metadata !DIExpression()), !dbg !21 @@ -58,12 +58,12 @@ !8 = !{!9, !9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !{!11} -!11 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12, variable: i32 (i32)** @x) +!11 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12) !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, 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) +!16 = !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12) !17 = !{i32 2, !"Dwarf Version", i32 4} !18 = !{i32 1, !"Debug Info Version", i32 3} !19 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/Generic/cu-range-hole.ll =================================================================== --- test/DebugInfo/Generic/cu-range-hole.ll +++ test/DebugInfo/Generic/cu-range-hole.ll @@ -14,7 +14,7 @@ ; CHECK: DW_TAG_subprogram ; Function Attrs: nounwind uwtable -define i32 @b(i32 %c) #0 !dbg !5 { +define i32 @b(i32 %c) #0 !dbg 0 !5 { entry: %c.addr = alloca i32, align 4 store i32 %c, i32* %c.addr, align 4 @@ -38,7 +38,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @d(i32 %e) #0 !dbg !10 { +define i32 @d(i32 %e) #0 !dbg 0 !10 { entry: %e.addr = alloca i32, align 4 store i32 %e, i32* %e.addr, align 4 Index: test/DebugInfo/Generic/cu-ranges.ll =================================================================== --- test/DebugInfo/Generic/cu-ranges.ll +++ test/DebugInfo/Generic/cu-ranges.ll @@ -18,7 +18,7 @@ ; CHECK: 00000000 ; Function Attrs: nounwind uwtable -define i32 @foo(i32 %a) #0 section "__TEXT,__foo" !dbg !4 { +define i32 @foo(i32 %a) #0 section "__TEXT,__foo" !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 @@ -32,7 +32,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @bar(i32 %a) #0 !dbg !9 { +define i32 @bar(i32 %a) #0 !dbg 0 !9 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 Index: test/DebugInfo/Generic/dbg-at-specficiation.ll =================================================================== --- test/DebugInfo/Generic/dbg-at-specficiation.ll +++ test/DebugInfo/Generic/dbg-at-specficiation.ll @@ -3,7 +3,7 @@ ; Do not unnecessarily use AT_specification DIE. ; CHECK-NOT: AT_specification -@a = common global [10 x i32] zeroinitializer, align 16 +@a = common global [10 x i32] zeroinitializer, align 16, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} @@ -11,7 +11,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "x.c", directory: "/private/tmp") !7 = !DICompositeType(tag: DW_TAG_array_type, size: 320, align: 32, baseType: !8, elements: !9) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/dead-argument-order.ll =================================================================== --- test/DebugInfo/Generic/dead-argument-order.ll +++ test/DebugInfo/Generic/dead-argument-order.ll @@ -36,7 +36,7 @@ %struct.S = type { i32 } ; Function Attrs: nounwind readnone uwtable -define i32 @_Z8function1Si(i32 %s.coerce, i32 %i) #0 !dbg !9 { +define i32 @_Z8function1Si(i32 %s.coerce, i32 %i) #0 !dbg 0 !9 { entry: tail call void @llvm.dbg.declare(metadata %struct.S* undef, metadata !14, metadata !DIExpression()), !dbg !20 tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !15, metadata !DIExpression()), !dbg !20 Index: test/DebugInfo/Generic/debug-info-qualifiers.ll =================================================================== --- test/DebugInfo/Generic/debug-info-qualifiers.ll +++ test/DebugInfo/Generic/debug-info-qualifiers.ll @@ -35,7 +35,7 @@ %class.A = type { i8 } ; Function Attrs: nounwind -define void @_Z1gv() #0 !dbg !17 { +define void @_Z1gv() #0 !dbg 0 !17 { %a = alloca %class.A, align 1 %pl = alloca { i64, i64 }, align 8 %pr = alloca { i64, i64 }, align 8 Index: test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll =================================================================== --- test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll +++ test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll @@ -21,7 +21,7 @@ %struct.Y = type { %struct.X* } %struct.X = type opaque -@y = common global %struct.Y zeroinitializer, align 8 +@y = common global %struct.Y zeroinitializer, align 8, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!10, !11} @@ -31,7 +31,7 @@ !1 = !DIFile(filename: "minimal.c", directory: "/tmp") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, variable: %struct.Y* @y) +!4 = !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true) !5 = !DICompositeType(tag: DW_TAG_structure_type, name: "Y", file: !1, line: 3, size: 64, align: 64, elements: !6) !6 = !{!7} !7 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !5, file: !1, line: 4, baseType: !8, size: 64, align: 64) Index: test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll =================================================================== --- test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll +++ test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll @@ -11,11 +11,11 @@ ;CHECK: Subprogram: f from /tmp/test1.c:1 ;CHECK: Subprogram: g from /tmp/test2.c:1 -define void @f() !dbg !4 { +define void @f() !dbg 0 !4 { ret void, !dbg !14 } -define void @g() !dbg !11 { +define void @g() !dbg 0 !11 { ret void, !dbg !15 } Index: test/DebugInfo/Generic/def-line.ll =================================================================== --- test/DebugInfo/Generic/def-line.ll +++ test/DebugInfo/Generic/def-line.ll @@ -43,20 +43,20 @@ ; CHECK: DW_AT_specification {{.*}}f3 ; Function Attrs: uwtable -define void @_ZN3foo2f2Ev() #0 align 2 !dbg !12 { +define void @_ZN3foo2f2Ev() #0 align 2 !dbg 0 !12 { entry: call void @_ZN3foo2f1Ev(), !dbg !19 ret void, !dbg !20 } ; Function Attrs: nounwind uwtable -define linkonce_odr void @_ZN3foo2f1Ev() #1 align 2 !dbg !15 { +define linkonce_odr void @_ZN3foo2f1Ev() #1 align 2 !dbg 0 !15 { entry: ret void, !dbg !21 } ; Function Attrs: nounwind uwtable -define void @_ZN3foo2f3Ev() #1 align 2 !dbg !13 { +define void @_ZN3foo2f3Ev() #1 align 2 !dbg 0 !13 { entry: ret void, !dbg !22 } Index: test/DebugInfo/Generic/discriminator.ll =================================================================== --- test/DebugInfo/Generic/discriminator.ll +++ test/DebugInfo/Generic/discriminator.ll @@ -18,7 +18,7 @@ ;CHECK: DW_AT_GNU_discriminator{{.*}}0x01 ; Function Attrs: uwtable -define void @_Z3foov() #0 !dbg !4 { +define void @_Z3foov() #0 !dbg 0 !4 { tail call void @_Z3xyzv(), !dbg !11 tail call void @_Z3xyzv(), !dbg !13 ret void, !dbg !16 Index: test/DebugInfo/Generic/dwarf-public-names.ll =================================================================== --- test/DebugInfo/Generic/dwarf-public-names.ll +++ test/DebugInfo/Generic/dwarf-public-names.ll @@ -51,11 +51,11 @@ %struct.C = type { i8 } -@_ZN1C22static_member_variableE = global i32 0, align 4 -@global_variable = global %struct.C zeroinitializer, align 1 -@_ZN2ns25global_namespace_variableE = global i32 1, align 4 +@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg 0 !25 +@global_variable = global %struct.C zeroinitializer, align 1, !dbg 0 !26 +@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg 0 !27 -define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg !3 { +define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg 0 !3 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 @@ -67,18 +67,18 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg !18 { +define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg 0 !18 { entry: %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !33 ret i32 %0, !dbg !33 } -define i32 @_Z15global_functionv() nounwind uwtable !dbg !19 { +define i32 @_Z15global_functionv() nounwind uwtable !dbg 0 !19 { entry: ret i32 -1, !dbg !34 } -define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg !20 { +define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg 0 !20 { entry: call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !35 ret void, !dbg !36 @@ -114,9 +114,9 @@ !22 = !DISubroutineType(types: !23) !23 = !{null} !24 = !{!25, !26, !27} -!25 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, variable: i32* @_ZN1C22static_member_variableE, declaration: !10) -!26 = !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8, variable: %struct.C* @global_variable) -!27 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11, variable: i32* @_ZN2ns25global_namespace_variableE) +!25 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, declaration: !10) +!26 = !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8) +!27 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11) !28 = !DILocalVariable(name: "this", line: 9, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !3, file: !4, type: !29) !29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) !30 = !DILocation(line: 9, scope: !3) Index: test/DebugInfo/Generic/enum-types.ll =================================================================== --- test/DebugInfo/Generic/enum-types.ll +++ test/DebugInfo/Generic/enum-types.ll @@ -21,7 +21,7 @@ ; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ENUM]] ; Function Attrs: nounwind ssp uwtable -define void @_Z4topA2EA(i32 %sa) #0 !dbg !7 { +define void @_Z4topA2EA(i32 %sa) #0 !dbg 0 !7 { entry: %sa.addr = alloca i32, align 4 store i32 %sa, i32* %sa.addr, align 4 @@ -33,7 +33,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define void @_Z4topB2EA(i32 %sa) #0 !dbg !17 { +define void @_Z4topB2EA(i32 %sa) #0 !dbg 0 !17 { entry: %sa.addr = alloca i32, align 4 store i32 %sa, i32* %sa.addr, align 4 Index: test/DebugInfo/Generic/enum.ll =================================================================== --- test/DebugInfo/Generic/enum.ll +++ test/DebugInfo/Generic/enum.ll @@ -33,10 +33,10 @@ ; CHECK: DW_TAG_enumerator ; CHECK-NEXT: DW_AT_name{{.*}} = "X" -@a = global i64 0, align 8 +@a = global i64 0, align 8, !dbg 0 !18 ; Function Attrs: nounwind uwtable -define void @_Z4funcv() #0 !dbg !13 { +define void @_Z4funcv() #0 !dbg 0 !13 { entry: %b = alloca i32, align 4 call void @llvm.dbg.declare(metadata i32* %b, metadata !20, metadata !DIExpression()), !dbg !22 @@ -70,7 +70,7 @@ !15 = !DISubroutineType(types: !16) !16 = !{null} !17 = !{!18} -!18 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !3, variable: i64* @a) +!18 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !3) !19 = !{i32 2, !"Dwarf Version", i32 3} !20 = !DILocalVariable(name: "b", line: 4, scope: !13, file: !14, type: !21) !21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) Index: test/DebugInfo/Generic/global.ll =================================================================== --- test/DebugInfo/Generic/global.ll +++ test/DebugInfo/Generic/global.ll @@ -16,7 +16,7 @@ ; CHECK: DW_TAG_variable ; Function Attrs: nounwind readnone uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: ret i32 0, !dbg !12 } Index: test/DebugInfo/Generic/gvn.ll =================================================================== --- test/DebugInfo/Generic/gvn.ll +++ test/DebugInfo/Generic/gvn.ll @@ -16,11 +16,11 @@ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" target triple = "arm64-apple-ios" -@a = common global i32 0, align 4 -@b = common global i32 0, align 4 +@a = common global i32 0, align 4, !dbg 0 !16 +@b = common global i32 0, align 4, !dbg 0 !17 ; Function Attrs: nounwind -define void @f3() #0 !dbg !12 { +define void @f3() #0 !dbg 0 !12 { entry: ; Verify that the call still has a debug location after GVN. ; CHECK: %call = tail call i32 @f2(i32 1) #{{[0-9]}}, !dbg @@ -81,8 +81,8 @@ !13 = !DISubroutineType(types: !14) !14 = !{null} !15 = !{!16, !17} -!16 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true, variable: i32* @a) -!17 = !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true, variable: i32* @b) +!16 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true) +!17 = !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true) !18 = !{i32 2, !"Dwarf Version", i32 2} !19 = !{i32 2, !"Debug Info Version", i32 3} !20 = !{!"clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)"} Index: test/DebugInfo/Generic/incorrect-variable-debugloc.ll =================================================================== --- test/DebugInfo/Generic/incorrect-variable-debugloc.ll +++ test/DebugInfo/Generic/incorrect-variable-debugloc.ll @@ -58,7 +58,7 @@ @__asan_gen_1 = private unnamed_addr constant [13 x i8] c"1 32 1 3 tmp\00", align 1 ; Function Attrs: noreturn sanitize_address -define i32 @_Z3fn1v() #0 !dbg !22 { +define i32 @_Z3fn1v() #0 !dbg 0 !22 { entry: %MyAlloca = alloca [64 x i8], align 32, !dbg !39 %0 = ptrtoint [64 x i8]* %MyAlloca to i64, !dbg !39 @@ -116,7 +116,7 @@ } ; Function Attrs: sanitize_address -define void @_ZN1C5m_fn3Ev(%struct.C* nocapture %this) #1 align 2 !dbg !28 { +define void @_ZN1C5m_fn3Ev(%struct.C* nocapture %this) #1 align 2 !dbg 0 !28 { entry: %MyAlloca = alloca [64 x i8], align 32, !dbg !48 %0 = ptrtoint [64 x i8]* %MyAlloca to i64, !dbg !48 Index: test/DebugInfo/Generic/incorrect-variable-debugloc1.ll =================================================================== --- test/DebugInfo/Generic/incorrect-variable-debugloc1.ll +++ test/DebugInfo/Generic/incorrect-variable-debugloc1.ll @@ -27,7 +27,7 @@ ; DWARF4: Location description: 10 0d 9f ; Function Attrs: uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %c = alloca i32, align 4 tail call void @llvm.dbg.value(metadata i32 13, i64 0, metadata !10, metadata !16), !dbg !17 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 @@ -21,7 +21,7 @@ @global_var = external global i32 ; copy of above function with multiple returns -define i32 @_Z4testi(i32 %k) !dbg !4 { +define i32 @_Z4testi(i32 %k) !dbg 0 !4 { entry: %retval = alloca i32, align 4 %k.addr = alloca i32, align 4 @@ -57,7 +57,7 @@ declare i32 @_Z8test_exti(i32) -define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !10 { +define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !10 { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 Index: test/DebugInfo/Generic/inline-debug-info.ll =================================================================== --- test/DebugInfo/Generic/inline-debug-info.ll +++ test/DebugInfo/Generic/inline-debug-info.ll @@ -41,7 +41,7 @@ @_ZTIi = external constant i8* @global_var = external global i32 -define i32 @_Z4testi(i32 %k) !dbg !4 { +define i32 @_Z4testi(i32 %k) !dbg 0 !4 { entry: %retval = alloca i32, align 4 %k.addr = alloca i32, align 4 @@ -75,7 +75,7 @@ declare i32 @_Z8test_exti(i32) -define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !10 { +define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !10 { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 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 @@ -43,7 +43,7 @@ } ; Function Attrs: nounwind uwtable -define void @caller() #0 !dbg !4 { +define void @caller() #0 !dbg 0 !4 { entry: tail call void @callee(), !dbg !12 ret void, !dbg !12 Index: test/DebugInfo/Generic/inline-scopes.ll =================================================================== --- test/DebugInfo/Generic/inline-scopes.ll +++ test/DebugInfo/Generic/inline-scopes.ll @@ -37,7 +37,7 @@ ; CHECK: DW_AT_abstract_origin ; Function Attrs: uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval.i2 = alloca i32, align 4 %b.i3 = alloca i8, align 1 Index: test/DebugInfo/Generic/inlined-arguments.ll =================================================================== --- test/DebugInfo/Generic/inlined-arguments.ll +++ test/DebugInfo/Generic/inlined-arguments.ll @@ -23,7 +23,7 @@ ; CHECK: DW_AT_name{{.*}}"y" ; Function Attrs: uwtable -define void @_Z2f2v() #0 !dbg !4 { +define void @_Z2f2v() #0 !dbg 0 !4 { tail call void @llvm.dbg.value(metadata i32 undef, i64 0, metadata !16, metadata !DIExpression()), !dbg !18 tail call void @llvm.dbg.value(metadata i32 2, i64 0, metadata !20, metadata !DIExpression()), !dbg !18 tail call void @_Z2f3i(i32 2), !dbg !21 @@ -31,7 +31,7 @@ } ; Function Attrs: uwtable -define void @_Z2f1ii(i32 %x, i32 %y) #0 !dbg !8 { +define void @_Z2f1ii(i32 %x, i32 %y) #0 !dbg 0 !8 { tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !13, metadata !DIExpression()), !dbg !23 tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !14, metadata !DIExpression()), !dbg !23 tail call void @_Z2f3i(i32 %y), !dbg !24 Index: test/DebugInfo/Generic/inlined-vars.ll =================================================================== --- test/DebugInfo/Generic/inlined-vars.ll +++ test/DebugInfo/Generic/inlined-vars.ll @@ -2,7 +2,7 @@ ; RUN: %llc_dwarf -O0 < %s | FileCheck %s -check-prefix VARIABLE ; PR 13202 -define i32 @main() uwtable !dbg !5 { +define i32 @main() uwtable !dbg 0 !5 { entry: tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !18, metadata !DIExpression()), !dbg !21 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !22, metadata !DIExpression()), !dbg !23 Index: test/DebugInfo/Generic/linkage-name-abstract.ll =================================================================== --- test/DebugInfo/Generic/linkage-name-abstract.ll +++ test/DebugInfo/Generic/linkage-name-abstract.ll @@ -34,7 +34,7 @@ ; REF: DW_AT_abstract_origin {{.*}} {[[FOO]]} ; Function Attrs: alwaysinline uwtable -define void @_Z2f2v() #0 !dbg !4 { +define void @_Z2f2v() #0 !dbg 0 !4 { entry: call void @_Z2f1v(), !dbg !11 ret void, !dbg !12 @@ -43,7 +43,7 @@ declare void @_Z2f1v() ; Function Attrs: uwtable -define void @_Z2f3v() #2 !dbg !7 { +define void @_Z2f3v() #2 !dbg 0 !7 { entry: call void @_Z2f1v(), !dbg !13 ret void, !dbg !15 Index: test/DebugInfo/Generic/location-verifier.ll =================================================================== --- test/DebugInfo/Generic/location-verifier.ll +++ test/DebugInfo/Generic/location-verifier.ll @@ -4,7 +4,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind ssp uwtable -define i32 @foo() #0 !dbg !4 { +define i32 @foo() #0 !dbg 0 !4 { entry: ret i32 42, !dbg !13 } Index: test/DebugInfo/Generic/lto-comp-dir.ll =================================================================== --- test/DebugInfo/Generic/lto-comp-dir.ll +++ test/DebugInfo/Generic/lto-comp-dir.ll @@ -40,13 +40,13 @@ ; } ; Function Attrs: nounwind uwtable -define void @_Z4funcv() #0 !dbg !4 { +define void @_Z4funcv() #0 !dbg 0 !4 { entry: ret void, !dbg !19 } ; Function Attrs: uwtable -define i32 @main() #1 !dbg !11 { +define i32 @main() #1 !dbg 0 !11 { entry: call void @_Z4funcv(), !dbg !20 ret i32 0, !dbg !21 Index: test/DebugInfo/Generic/member-order.ll =================================================================== --- test/DebugInfo/Generic/member-order.ll +++ test/DebugInfo/Generic/member-order.ll @@ -25,7 +25,7 @@ %struct.foo = type { i8 } ; Function Attrs: nounwind uwtable -define void @_ZN3foo2f1Ev(%struct.foo* %this) #0 align 2 !dbg !14 { +define void @_ZN3foo2f1Ev(%struct.foo* %this) #0 align 2 !dbg 0 !14 { entry: %this.addr = alloca %struct.foo*, align 8 store %struct.foo* %this, %struct.foo** %this.addr, align 8 Index: test/DebugInfo/Generic/member-pointers.ll =================================================================== --- test/DebugInfo/Generic/member-pointers.ll +++ test/DebugInfo/Generic/member-pointers.ll @@ -17,8 +17,8 @@ ; int S::*x = 0; ; void (S::*y)(int) = 0; -@x = global i64 -1, align 8 -@y = global { i64, i64 } zeroinitializer, align 8 +@x = global i64 -1, align 8, !dbg 0 !5 +@y = global { i64, i64 } zeroinitializer, align 8, !dbg 0 !10 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!16} @@ -26,12 +26,12 @@ !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) +!5 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") !7 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !8, extraData: !9) !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: 1, size: 8, align: 8, file: !15, elements: !1) -!10 = !DIGlobalVariable(name: "y", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11, variable: { i64, i64 }* @y) +!10 = !DIGlobalVariable(name: "y", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11) !11 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !12, extraData: !9) !12 = !DISubroutineType(types: !13) !13 = !{null, !14, !8} Index: test/DebugInfo/Generic/missing-abstract-variable.ll =================================================================== --- test/DebugInfo/Generic/missing-abstract-variable.ll +++ test/DebugInfo/Generic/missing-abstract-variable.ll @@ -97,7 +97,7 @@ @t = external global i32 ; Function Attrs: uwtable -define void @_Z1bv() #0 !dbg !4 { +define void @_Z1bv() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i1 false, i64 0, metadata !25, metadata !DIExpression()), !dbg !27 tail call void @_Z1fi(i32 0), !dbg !28 @@ -105,7 +105,7 @@ } ; Function Attrs: uwtable -define void @_Z1ab(i1 zeroext %u) #0 !dbg !8 { +define void @_Z1ab(i1 zeroext %u) #0 !dbg 0 !8 { entry: tail call void @llvm.dbg.value(metadata i1 %u, i64 0, metadata !13, metadata !DIExpression()), !dbg !30 tail call void @llvm.dbg.value(metadata i1 %u, i64 0, metadata !31, metadata !DIExpression()), !dbg !33 Index: test/DebugInfo/Generic/multiline.ll =================================================================== --- test/DebugInfo/Generic/multiline.ll +++ test/DebugInfo/Generic/multiline.ll @@ -41,7 +41,7 @@ ; Function Attrs: nounwind uwtable -define void @f2() #0 !dbg !4 { +define void @f2() #0 !dbg 0 !4 { entry: call void (...) @f1(), !dbg !11 call void (...) @f1(), !dbg !12 Index: test/DebugInfo/Generic/namespace.ll =================================================================== --- test/DebugInfo/Generic/namespace.ll +++ test/DebugInfo/Generic/namespace.ll @@ -200,18 +200,18 @@ ; } ; void B::func_fwd() {} -@_ZN1A1B1iE = global i32 0, align 4 -@_ZN1A1B7var_fwdE = global i32 0, align 4 +@_ZN1A1B1iE = global i32 0, align 4, !dbg 0 !31 +@_ZN1A1B7var_fwdE = global i32 0, align 4, !dbg 0 !32 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, i8* null }] ; Function Attrs: nounwind ssp uwtable -define i32 @_ZN1A1B2f1Ev() #0 !dbg !10 { +define i32 @_ZN1A1B2f1Ev() #0 !dbg 0 !10 { entry: ret i32 0, !dbg !60 } ; Function Attrs: nounwind ssp uwtable -define void @_ZN1A1B2f1Ei(i32) #0 !dbg !14 { +define void @_ZN1A1B2f1Ei(i32) #0 !dbg 0 !14 { entry: %.addr = alloca i32, align 4 store i32 %0, i32* %.addr, align 4 @@ -222,7 +222,7 @@ ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !17 { +define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg 0 !17 { entry: %call = call i32 @_ZN1A1B2f1Ev(), !dbg !65 store i32 %call, i32* @_ZN1A1B1iE, align 4, !dbg !65 @@ -230,7 +230,7 @@ } ; Function Attrs: nounwind ssp uwtable -define i32 @_Z4funcb(i1 zeroext %b) #0 !dbg !21 { +define i32 @_Z4funcb(i1 zeroext %b) #0 !dbg 0 !21 { entry: %retval = alloca i32, align 4 %b.addr = alloca i8, align 1 @@ -260,7 +260,7 @@ ret i32 %5, !dbg !71 } -define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !25 { +define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg 0 !25 { entry: %0 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !72 store i32 %0, i32* @_ZN1A1B7var_fwdE, align 4, !dbg !72 @@ -268,7 +268,7 @@ } ; Function Attrs: nounwind ssp uwtable -define void @_ZN1A1B8func_fwdEv() #0 !dbg !26 { +define void @_ZN1A1B8func_fwdEv() #0 !dbg 0 !26 { entry: ret void, !dbg !73 } @@ -317,8 +317,8 @@ !28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp") !29 = !DISubroutineType(types: !2) !30 = !{!31, !32} -!31 = !DIGlobalVariable(name: "i", linkageName: "_ZN1A1B1iE", line: 20, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13, variable: i32* @_ZN1A1B1iE) -!32 = !DIGlobalVariable(name: "var_fwd", linkageName: "_ZN1A1B7var_fwdE", line: 44, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13, variable: i32* @_ZN1A1B7var_fwdE) +!31 = !DIGlobalVariable(name: "i", linkageName: "_ZN1A1B1iE", line: 20, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13) +!32 = !DIGlobalVariable(name: "var_fwd", linkageName: "_ZN1A1B7var_fwdE", line: 44, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13) !33 = !{!34, !35, !36, !37, !40, !41, !42, !43, !44, !45, !47, !48, !49, !51, !54, !55, !56} !34 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 15, scope: !7, entity: !6) !35 = !DIImportedEntity(tag: DW_TAG_imported_module, line: 18, scope: !0, entity: !7) Index: test/DebugInfo/Generic/namespace_function_definition.ll =================================================================== --- test/DebugInfo/Generic/namespace_function_definition.ll +++ test/DebugInfo/Generic/namespace_function_definition.ll @@ -19,7 +19,7 @@ ; CHECK: NULL ; Function Attrs: nounwind uwtable -define void @_ZN2ns4funcEv() #0 !dbg !4 { +define void @_ZN2ns4funcEv() #0 !dbg 0 !4 { entry: ret void, !dbg !11 } 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 @@ -35,7 +35,7 @@ @x = external global i32 ; Function Attrs: uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %i.addr.i = alloca i32, align 4 %retval = alloca i32, align 4 @@ -49,7 +49,7 @@ } ; Function Attrs: alwaysinline nounwind uwtable -define i32 @_ZN2ns4funcEi(i32 %i) #1 !dbg !9 { +define i32 @_ZN2ns4funcEi(i32 %i) #1 !dbg 0 !9 { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 Index: test/DebugInfo/Generic/piece-verifier.ll =================================================================== --- test/DebugInfo/Generic/piece-verifier.ll +++ test/DebugInfo/Generic/piece-verifier.ll @@ -3,7 +3,7 @@ target triple = "x86_64-apple-macosx10.9.0" ; Function Attrs: nounwind ssp uwtable -define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 !dbg !4 { +define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 !dbg 0 !4 { entry: call void @llvm.dbg.value(metadata i64 %s.coerce0, i64 0, metadata !20, metadata !24), !dbg !21 call void @llvm.dbg.value(metadata i32 %s.coerce1, i64 0, metadata !22, metadata !27), !dbg !21 Index: test/DebugInfo/Generic/ptrsize.ll =================================================================== --- test/DebugInfo/Generic/ptrsize.ll +++ test/DebugInfo/Generic/ptrsize.ll @@ -15,12 +15,12 @@ ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] ; CHECK-NOT: DW_AT_byte_size -define i32 @foo() !dbg !4 { +define i32 @foo() !dbg 0 !4 { entry: ret i32 0, !dbg !13 } -define i32 @bar() !dbg !5 { +define i32 @bar() !dbg 0 !5 { entry: ret i32 0, !dbg !16 } Index: test/DebugInfo/Generic/recursive_inlining.ll =================================================================== --- test/DebugInfo/Generic/recursive_inlining.ll +++ test/DebugInfo/Generic/recursive_inlining.ll @@ -88,10 +88,10 @@ %struct.C = type { i32 } -@x = global %struct.C* null, align 8 +@x = global %struct.C* null, align 8, !dbg 0 !27 ; Function Attrs: nounwind -define void @_Z3fn6v() #0 !dbg !14 { +define void @_Z3fn6v() #0 !dbg 0 !14 { entry: tail call void @_Z3fn8v() #3, !dbg !31 %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !32, !tbaa !33 @@ -114,7 +114,7 @@ declare void @_Z3fn8v() #1 ; Function Attrs: nounwind -define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 !dbg !22 { +define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 !dbg 0 !22 { entry: tail call void @llvm.dbg.value(metadata %struct.C* %this, i64 0, metadata !24, metadata !DIExpression()), !dbg !49 tail call void @_Z3fn8v() #3, !dbg !50 @@ -147,7 +147,7 @@ } ; Function Attrs: nounwind -define void @_Z3fn3v() #0 !dbg !18 { +define void @_Z3fn3v() #0 !dbg 0 !18 { entry: br label %tailrecurse @@ -170,7 +170,7 @@ } ; Function Attrs: nounwind -define void @_Z3fn4v() #0 !dbg !19 { +define void @_Z3fn4v() #0 !dbg 0 !19 { entry: %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !72, !tbaa !33 tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !72 @@ -178,7 +178,7 @@ } ; Function Attrs: nounwind -define void @_Z3fn5v() #0 !dbg !20 { +define void @_Z3fn5v() #0 !dbg 0 !20 { entry: %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !73, !tbaa !33 tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !73 @@ -225,7 +225,7 @@ !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: !4) !26 = !{!27} -!27 = !DIGlobalVariable(name: "x", line: 13, isLocal: false, isDefinition: true, scope: null, file: !15, type: !25, variable: %struct.C** @x) +!27 = !DIGlobalVariable(name: "x", line: 13, isLocal: false, isDefinition: true, scope: null, file: !15, type: !25) !28 = !{i32 2, !"Dwarf Version", i32 4} !29 = !{i32 2, !"Debug Info Version", i32 3} !30 = !{!"clang version 3.6.0 "} Index: test/DebugInfo/Generic/restrict.ll =================================================================== --- test/DebugInfo/Generic/restrict.ll +++ test/DebugInfo/Generic/restrict.ll @@ -17,7 +17,7 @@ ; Function Attrs: nounwind uwtable -define void @_Z3fooPv(i8* noalias %dst) #0 !dbg !4 { +define void @_Z3fooPv(i8* noalias %dst) #0 !dbg 0 !4 { entry: %dst.addr = alloca i8*, align 8 store i8* %dst, i8** %dst.addr, align 8 Index: test/DebugInfo/Generic/sugared-constants.ll =================================================================== --- test/DebugInfo/Generic/sugared-constants.ll +++ test/DebugInfo/Generic/sugared-constants.ll @@ -22,7 +22,7 @@ ; CHECK: DW_AT_const_value [DW_FORM_udata] (7) ; Function Attrs: uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !10, metadata !DIExpression()), !dbg !21 tail call void @_Z4funci(i32 42), !dbg !22 Index: test/DebugInfo/Generic/template-recursive-void.ll =================================================================== --- test/DebugInfo/Generic/template-recursive-void.ll +++ test/DebugInfo/Generic/template-recursive-void.ll @@ -20,7 +20,7 @@ %class.bar = type { i8 } -@filters = global %class.bar zeroinitializer, align 1 +@filters = global %class.bar zeroinitializer, align 1, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!36, !37} @@ -29,7 +29,7 @@ !1 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "filters", line: 10, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: %class.bar* @filters) +!4 = !DIGlobalVariable(name: "filters", line: 10, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") !6 = !DICompositeType(tag: DW_TAG_class_type, name: "bar", line: 9, size: 8, align: 8, file: !1, elements: !7) !7 = !{!8, !31} Index: test/DebugInfo/Generic/tu-composite.ll =================================================================== --- test/DebugInfo/Generic/tu-composite.ll +++ test/DebugInfo/Generic/tu-composite.ll @@ -87,7 +87,7 @@ @_ZTI1C = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1C, i32 0, i32 0) } ; Function Attrs: nounwind ssp uwtable -define void @_ZN1C3fooEv(%struct.C* %this) unnamed_addr #0 align 2 !dbg !31 { +define void @_ZN1C3fooEv(%struct.C* %this) unnamed_addr #0 align 2 !dbg 0 !31 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 @@ -100,7 +100,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define void @_Z4testv() #0 !dbg !32 { +define void @_Z4testv() #0 !dbg 0 !32 { entry: %B = alloca %struct.bar, align 1 %A = alloca [3 x %struct.bar], align 1 Index: test/DebugInfo/Generic/tu-member-pointer.ll =================================================================== --- test/DebugInfo/Generic/tu-member-pointer.ll +++ test/DebugInfo/Generic/tu-member-pointer.ll @@ -11,7 +11,7 @@ ; }; ; int Foo:*x = 0; -@x = global i64 -1, align 8 +@x = global i64 -1, align 8, !dbg 0 !6 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!10, !11} @@ -22,7 +22,7 @@ !3 = !{!4} !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS3Foo") !5 = !{!6} -!6 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !7, type: !8, variable: i64* @x) +!6 = !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !7, type: !8) !7 = !DIFile(filename: "foo.cpp", directory: ".") !8 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !9, extraData: !4) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 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 @@ -13,7 +13,7 @@ @str = private unnamed_addr constant [4 x i8] c"FOO\00" @str1 = private unnamed_addr constant [6 x i8] c"Main!\00" -define void @foo() nounwind !dbg !5 { +define void @foo() nounwind !dbg 0 !5 { entry: %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0)), !dbg !23 ret void, !dbg !25 @@ -21,7 +21,7 @@ declare i32 @puts(i8* nocapture) nounwind -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind !dbg !12 { +define i32 @main(i32 %argc, i8** nocapture %argv) nounwind !dbg 0 !12 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !21, metadata !DIExpression()), !dbg !26 ; Avoid talking about the pointer size in debug info because that's target dependent Index: test/DebugInfo/Generic/typedef.ll =================================================================== --- test/DebugInfo/Generic/typedef.ll +++ test/DebugInfo/Generic/typedef.ll @@ -12,7 +12,7 @@ ; CHECK-NOT: DW_AT_type ; CHECK: {{DW_TAG|NULL}} -@y = global i8* null, align 8 +@y = global i8* null, align 8, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!8, !9} @@ -22,7 +22,7 @@ !1 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "y", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i8** @y) +!4 = !DIGlobalVariable(name: "y", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") !6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7) !7 = !DIDerivedType(tag: DW_TAG_typedef, name: "x", line: 1, file: !1, baseType: null) Index: test/DebugInfo/Generic/unconditional-branch.ll =================================================================== --- test/DebugInfo/Generic/unconditional-branch.ll +++ test/DebugInfo/Generic/unconditional-branch.ll @@ -18,7 +18,7 @@ ;} ; Function Attrs: nounwind -define void @foo(i32 %i) #0 !dbg !4 { +define void @foo(i32 %i) #0 !dbg 0 !4 { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 Index: test/DebugInfo/Generic/varargs.ll =================================================================== --- test/DebugInfo/Generic/varargs.ll +++ test/DebugInfo/Generic/varargs.ll @@ -50,7 +50,7 @@ %struct.A = type { i8 } ; Function Attrs: nounwind ssp uwtable -define void @_Z1biz(i32 %c, ...) #0 !dbg !14 { +define void @_Z1biz(i32 %c, ...) #0 !dbg 0 !14 { %1 = alloca i32, align 4 %a = alloca %struct.A, align 1 %fptr = alloca void (i32, ...)*, align 8 Index: test/DebugInfo/Generic/version.ll =================================================================== --- test/DebugInfo/Generic/version.ll +++ test/DebugInfo/Generic/version.ll @@ -6,7 +6,7 @@ ; Make sure we are generating DWARF version 3 when module flag says so. ; CHECK: Compile Unit: length = {{.*}} version = 0x0003 -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/Generic/virtual-index.ll =================================================================== --- test/DebugInfo/Generic/virtual-index.ll +++ test/DebugInfo/Generic/virtual-index.ll @@ -26,11 +26,11 @@ @_ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (void (%struct.A*)* @_ZN1A1fEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1gEv to i8*)], align 8 -define void @_ZN1A1fEv(%struct.A* %this) unnamed_addr !dbg !18 { +define void @_ZN1A1fEv(%struct.A* %this) unnamed_addr !dbg 0 !18 { ret void } -define void @_ZN1A1gEv(%struct.A* %this) unnamed_addr !dbg !19 { +define void @_ZN1A1gEv(%struct.A* %this) unnamed_addr !dbg 0 !19 { ret void } Index: test/DebugInfo/Inputs/gmlt.ll =================================================================== --- test/DebugInfo/Inputs/gmlt.ll +++ test/DebugInfo/Inputs/gmlt.ll @@ -98,26 +98,26 @@ ; CHECK: .apple{{.*}} contents: ; Function Attrs: nounwind uwtable -define void @_Z2f1v() #0 !dbg !4 { +define void @_Z2f1v() #0 !dbg 0 !4 { entry: ret void, !dbg !13 } ; Function Attrs: nounwind uwtable -define void @_Z2f2v() #0 section "__TEXT,__bar" !dbg !7 { +define void @_Z2f2v() #0 section "__TEXT,__bar" !dbg 0 !7 { entry: ret void, !dbg !14 } ; Function Attrs: alwaysinline nounwind uwtable -define void @_Z2f3v() #1 !dbg !8 { +define void @_Z2f3v() #1 !dbg 0 !8 { entry: call void @_Z2f1v(), !dbg !15 ret void, !dbg !16 } ; Function Attrs: nounwind uwtable -define void @_Z2f4v() #0 !dbg !9 { +define void @_Z2f4v() #0 !dbg 0 !9 { entry: call void @_Z2f1v() #2, !dbg !17 ret void, !dbg !19 Index: test/DebugInfo/Inputs/line.ll =================================================================== --- test/DebugInfo/Inputs/line.ll +++ test/DebugInfo/Inputs/line.ll @@ -12,7 +12,7 @@ ; CHECK: cmp ; Function Attrs: nounwind uwtable -define i32 @_Z1fii(i32 %a, i32 %b) #0 !dbg !4 { +define i32 @_Z1fii(i32 %a, i32 %b) #0 !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 %b.addr = alloca i32, align 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 @@ -38,7 +38,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: norecurse nounwind readnone uwtable - define i32 @add(i32 %x, i32 %y, i32 %z, i32 %a) #0 !dbg !4 { + define i32 @add(i32 %x, i32 %y, i32 %z, i32 %a) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !17), !dbg !18 tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !10, metadata !17), !dbg !19 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 @@ -41,11 +41,11 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" - @m = common global i32 0, align 4 + @m = common global i32 0, align 4, !dbg 0 !16 @.str = private unnamed_addr constant [13 x i8] c"m(main): %d\0A\00", align 1 ; Function Attrs: nounwind uwtable - define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg !4 { + define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !12, metadata !20), !dbg !21 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !13, metadata !20), !dbg !22 @@ -121,7 +121,7 @@ !13 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 6, type: !8) !14 = !DILocalVariable(name: "n", scope: !4, file: !1, line: 7, type: !7) !15 = !{!16} - !16 = !DIGlobalVariable(name: "m", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: i32* @m) + !16 = !DIGlobalVariable(name: "m", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !17 = !{i32 2, !"Dwarf Version", i32 4} !18 = !{i32 2, !"Debug Info Version", i32 3} !19 = !{!"clang version 3.8.0 (trunk 253049)"} Index: test/DebugInfo/Mips/InlinedFnLocalVar.ll =================================================================== --- test/DebugInfo/Mips/InlinedFnLocalVar.ll +++ test/DebugInfo/Mips/InlinedFnLocalVar.ll @@ -6,13 +6,13 @@ ; CHECK-NEXT: info_string -@i = common global i32 0 ; [#uses=2] +@i = common global i32 0, !dbg 0 !16 ; [#uses=2] declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @bar() nounwind ssp !dbg !6 { +define i32 @bar() nounwind ssp !dbg 0 !6 { entry: %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2] tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !59, metadata !DIExpression()), !dbg !19 @@ -45,7 +45,7 @@ !13 = !{!14, !15} !14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 10, size: 32, align: 32, file: !27, scope: !12, baseType: !5) !15 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 10, size: 32, align: 32, offset: 32, file: !27, scope: !12, baseType: !5) -!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5, variable: i32* @i) +!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5) !17 = !DILocation(line: 15, scope: !18) !18 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !6) !19 = !DILocation(line: 9, scope: !0, inlinedAt: !17) Index: test/DebugInfo/Mips/delay-slot.ll =================================================================== --- test/DebugInfo/Mips/delay-slot.ll +++ test/DebugInfo/Mips/delay-slot.ll @@ -26,7 +26,7 @@ target triple = "mips--linux-gnu" ; Function Attrs: nounwind -define i32 @foo(i32 %x) #0 !dbg !4 { +define i32 @foo(i32 %x) #0 !dbg 0 !4 { entry: call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !12, metadata !DIExpression()), !dbg !13 %tobool = icmp ne i32 %x, 0, !dbg !14 Index: test/DebugInfo/Mips/dsr-fixed-objects.ll =================================================================== --- test/DebugInfo/Mips/dsr-fixed-objects.ll +++ test/DebugInfo/Mips/dsr-fixed-objects.ll @@ -32,7 +32,7 @@ ; F0: Ending address offset: 0x0000000000000030 ; F0: Location description: 51 -define i32 @f0(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !4 { +define i32 @f0(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg 0 !4 { entry: %x = alloca i32, align 4 tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !9, metadata !DIExpression()), !dbg !27 @@ -68,7 +68,7 @@ ; F1: Ending address offset: 0x0000000000000088 ; F1: Location description: 51 -define i32 @f1(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg !15 { +define i32 @f1(i32 signext %a, i32 signext %b, i32 signext %c, i32 signext %d, i32 signext %e) !dbg 0 !15 { entry: %x = alloca i32, align 16 tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !17, metadata !DIExpression()), !dbg !46 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 @@ -27,7 +27,7 @@ ; F2: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") ; Function Attrs: nounwind -define i32 @f2(i32 signext %a, i32 signext %b) !dbg !4 { +define i32 @f2(i32 signext %a, i32 signext %b) !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 %b.addr = alloca i32, align 4 @@ -50,7 +50,7 @@ ; F3: DW_AT_location [DW_FORM_exprloc] (<0x2> 87 10 ) ; F3: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] = "c") -define i32* @f3(i32 signext %a, i32 signext %b) !dbg !8 { +define i32* @f3(i32 signext %a, i32 signext %b) !dbg 0 !8 { entry: %a.addr = alloca i32, align 4 %b.addr = alloca i32, align 4 Index: test/DebugInfo/Mips/fn-call-line.ll =================================================================== --- test/DebugInfo/Mips/fn-call-line.ll +++ test/DebugInfo/Mips/fn-call-line.ll @@ -52,7 +52,7 @@ ; Function Attrs: nounwind uwtable -define void @f2() #0 !dbg !4 { +define void @f2() #0 !dbg 0 !4 { entry: call void (...) @f1(), !dbg !11 call void (...) @f1(), !dbg !12 Index: test/DebugInfo/Mips/prologue_end.ll =================================================================== --- test/DebugInfo/Mips/prologue_end.ll +++ test/DebugInfo/Mips/prologue_end.ll @@ -12,7 +12,7 @@ @.str = private unnamed_addr constant [15 x i8] c"Hello, World!\0A\00", align 1 -define void @hello_world() #0 !dbg !4 { +define void @hello_world() #0 !dbg 0 !4 { entry: ; STATIC: addiu $sp, $sp, -{{[0-9]+}} ; STATIC: sw $ra, {{[0-9]+}}($sp) Index: test/DebugInfo/PowerPC/tls-fission.ll =================================================================== --- test/DebugInfo/PowerPC/tls-fission.ll +++ test/DebugInfo/PowerPC/tls-fission.ll @@ -17,7 +17,7 @@ ; CHECK-NEXT: .Laddr_sec: ; CHECK-NEXT: .quad tls@DTPREL+32768 -@tls = thread_local global i32 0, align 4 +@tls = thread_local global i32 0, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} @@ -26,7 +26,7 @@ !1 = !DIFile(filename: "tls.cpp", directory: "/tmp") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @tls) +!4 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "tls.cpp", directory: "/tmp") !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !{i32 2, !"Dwarf Version", i32 3} Index: test/DebugInfo/PowerPC/tls.ll =================================================================== --- test/DebugInfo/PowerPC/tls.ll +++ test/DebugInfo/PowerPC/tls.ll @@ -12,7 +12,7 @@ ; DW_OP_GNU_push_tls_address ; CHECK: .byte 224 -@tls = thread_local global i32 7, align 4 +@tls = thread_local global i32 7, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} @@ -21,7 +21,7 @@ !1 = !DIFile(filename: "tls.cpp", directory: "/tmp") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @tls) +!4 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "tls.cpp", directory: "/tmp") !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !{i32 2, !"Dwarf Version", i32 3} Index: test/DebugInfo/Sparc/gnu-window-save.ll =================================================================== --- test/DebugInfo/Sparc/gnu-window-save.ll +++ test/DebugInfo/Sparc/gnu-window-save.ll @@ -38,7 +38,7 @@ @.str = private unnamed_addr constant [14 x i8] c"hello, world\0A\00", align 1 ; Function Attrs: nounwind -define signext i32 @main() #0 !dbg !4 { +define signext i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/Sparc/prologue_end.ll =================================================================== --- test/DebugInfo/Sparc/prologue_end.ll +++ test/DebugInfo/Sparc/prologue_end.ll @@ -6,7 +6,7 @@ ; func(); ; } -define void @prologue_end_test() nounwind uwtable !dbg !4 { +define void @prologue_end_test() nounwind uwtable !dbg 0 !4 { ; CHECK: prologue_end_test: ; CHECK: .cfi_startproc ; CHECK: save %sp Index: test/DebugInfo/SystemZ/prologue_end.ll =================================================================== --- test/DebugInfo/SystemZ/prologue_end.ll +++ test/DebugInfo/SystemZ/prologue_end.ll @@ -6,7 +6,7 @@ ; func(); ; } -define void @prologue_end_test() nounwind uwtable !dbg !4 { +define void @prologue_end_test() nounwind uwtable !dbg 0 !4 { ; CHECK: prologue_end_test: ; CHECK: .cfi_startproc ; CHECK: aghi Index: test/DebugInfo/SystemZ/variable-loc.ll =================================================================== --- test/DebugInfo/SystemZ/variable-loc.ll +++ test/DebugInfo/SystemZ/variable-loc.ll @@ -29,7 +29,7 @@ declare i32 @sum_array(i32*, i32) nounwind -define i32 @main() nounwind !dbg !14 { +define i32 @main() nounwind !dbg 0 !14 { entry: %retval = alloca i32, align 4 %main_arr = alloca [100 x i32], align 4 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 @@ -5,7 +5,7 @@ %struct.X = type opaque %struct.Y = type { i32 } -define i32 @foo(%struct.X* %x, %struct.Y* %y) nounwind ssp !dbg !1 { +define i32 @foo(%struct.X* %x, %struct.Y* %y) nounwind ssp !dbg 0 !1 { entry: %x_addr = alloca %struct.X* ; <%struct.X**> [#uses=1] %y_addr = alloca %struct.Y* ; <%struct.Y**> [#uses=1] 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 @@ -3,9 +3,9 @@ ; ModuleID = 'test.c' -@GLB = common global i32 0, align 4 +@GLB = common global i32 0, align 4, !dbg 0 !14 -define i32 @f() nounwind !dbg !5 { +define i32 @f() nounwind !dbg 0 !5 { %LOC = alloca i32, align 4 call void @llvm.dbg.declare(metadata i32* %LOC, metadata !15, metadata !DIExpression()), !dbg !17 %1 = load i32, i32* @GLB, align 4, !dbg !18 @@ -27,7 +27,7 @@ !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !12 = !{!14} -!14 = !DIGlobalVariable(name: "GLB", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, variable: i32* @GLB) +!14 = !DIGlobalVariable(name: "GLB", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9) !15 = !DILocalVariable(name: "LOC", line: 4, scope: !16, file: !6, type: !9) !16 = distinct !DILexicalBlock(line: 3, column: 9, file: !20, scope: !5) !17 = !DILocation(line: 4, column: 9, scope: !16) 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 @@ -7,7 +7,7 @@ %struct.bar = type { %struct.baz, %struct.baz* } %struct.baz = type { i32 } -define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg !29 { +define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg 0 !29 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 @@ -25,7 +25,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN3barC1Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !37 { +define linkonce_odr void @_ZN3barC1Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg 0 !37 { entry: %this.addr = alloca %struct.bar*, align 8 %x.addr = alloca i32, align 4 @@ -39,7 +39,7 @@ ret void, !dbg !62 } -define linkonce_odr void @_ZN3barC2Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !40 { +define linkonce_odr void @_ZN3barC2Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg 0 !40 { entry: %this.addr = alloca %struct.bar*, align 8 %x.addr = alloca i32, align 4 @@ -57,7 +57,7 @@ ret void, !dbg !68 } -define linkonce_odr void @_ZN3bazC1Ei(%struct.baz* %this, i32 %a) unnamed_addr uwtable ssp align 2 !dbg !43 { +define linkonce_odr void @_ZN3bazC1Ei(%struct.baz* %this, i32 %a) unnamed_addr uwtable ssp align 2 !dbg 0 !43 { entry: %this.addr = alloca %struct.baz*, align 8 %a.addr = alloca i32, align 4 @@ -71,7 +71,7 @@ ret void, !dbg !74 } -define linkonce_odr void @_ZN3bazC2Ei(%struct.baz* %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 !dbg !46 { +define linkonce_odr void @_ZN3bazC2Ei(%struct.baz* %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 !dbg 0 !46 { entry: %this.addr = alloca %struct.baz*, align 8 %a.addr = alloca i32, align 4 Index: test/DebugInfo/X86/DIModuleContext.ll =================================================================== --- test/DebugInfo/X86/DIModuleContext.ll +++ test/DebugInfo/X86/DIModuleContext.ll @@ -11,7 +11,7 @@ %struct.s = type opaque -@i = common global %struct.s* null, align 8 +@i = common global %struct.s* null, align 8, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} @@ -20,7 +20,7 @@ !1 = !DIFile(filename: "test.c", directory: "/") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, variable: %struct.s** @i) +!4 = !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true) !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64) !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !9, file: !1, line: 1, flags: DIFlagFwdDecl) !7 = !{i32 2, !"Dwarf Version", i32 2} 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 @@ -10,7 +10,7 @@ %struct.A = type { i32 } -define i32 @_Z3fooP1A(%struct.A* %a) nounwind uwtable ssp !dbg !5 { +define i32 @_Z3fooP1A(%struct.A* %a) nounwind uwtable ssp !dbg 0 !5 { entry: %a.addr = alloca %struct.A*, align 8 store %struct.A* %a, %struct.A** %a.addr, align 8 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 @@ -34,7 +34,7 @@ %struct.A = type { i8 } ; Function Attrs: nounwind ssp uwtable -define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg !17 { +define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg 0 !17 { entry: %this.addr = alloca %struct.A*, align 8 store %struct.A* %this, %struct.A** %this.addr, align 8 @@ -47,7 +47,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define void @_ZN1AD1Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg !18 { +define void @_ZN1AD1Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg 0 !18 { entry: %this.addr = alloca %struct.A*, align 8 store %struct.A* %this, %struct.A** %this.addr, align 8 @@ -58,7 +58,7 @@ } ; Function Attrs: ssp uwtable -define void @_Z3foov() #2 !dbg !19 { +define void @_Z3foov() #2 !dbg 0 !19 { entry: %a = alloca %struct.A, align 1 call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !34, metadata !DIExpression()), !dbg !35 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 @@ -60,7 +60,7 @@ @a = external global i32 -define void @f() nounwind !dbg !0 { +define void @f() nounwind !dbg 0 !0 { entry: %call = tail call i32 @g(i32 0, i32 0) nounwind, !dbg !8 store i32 %call, i32* @a, align 4, !dbg !8 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 @@ -12,7 +12,7 @@ %class.A = type { i32 } -define i32 @_Z3fooi(i32) nounwind uwtable ssp !dbg !5 { +define i32 @_Z3fooi(i32) nounwind uwtable ssp !dbg 0 !5 { entry: %.addr = alloca i32, align 4 %a = alloca %class.A, align 4 @@ -27,7 +27,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 !dbg !10 { +define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 !dbg 0 !10 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -37,7 +37,7 @@ ret void, !dbg !29 } -define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 !dbg !20 { +define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr nounwind uwtable ssp align 2 !dbg 0 !20 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 Index: test/DebugInfo/X86/DW_AT_specification.ll =================================================================== --- test/DebugInfo/X86/DW_AT_specification.ll +++ test/DebugInfo/X86/DW_AT_specification.ll @@ -10,9 +10,9 @@ ; CHECK: DW_AT_specification {{.*}} "_ZN3foo3barEv" -@_ZZN3foo3barEvE1x = constant i32 0, align 4 +@_ZZN3foo3barEvE1x = constant i32 0, align 4, !dbg 0 !20 -define void @_ZN3foo3barEv() !dbg !5 { +define void @_ZN3foo3barEv() !dbg 0 !5 { entry: ret void, !dbg !25 } @@ -32,7 +32,7 @@ !12 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", line: 1, size: 8, align: 8, file: !27, elements: !13) !13 = !{!11} !18 = !{!20} -!20 = !DIGlobalVariable(name: "x", line: 5, isLocal: true, isDefinition: true, scope: !5, file: !6, type: !21, variable: i32* @_ZZN3foo3barEvE1x) +!20 = !DIGlobalVariable(name: "x", line: 5, isLocal: true, isDefinition: true, scope: !5, file: !6, type: !21) !21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22) !22 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !25 = !DILocation(line: 6, column: 1, scope: !26) 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 @@ -18,7 +18,7 @@ target triple = "i686-pc-win32" ; Function Attrs: nounwind -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/X86/DW_TAG_friend.ll =================================================================== --- test/DebugInfo/X86/DW_TAG_friend.ll +++ test/DebugInfo/X86/DW_TAG_friend.ll @@ -12,8 +12,8 @@ %class.A = type { i32 } %class.B = type { i32 } -@a = global %class.A zeroinitializer, align 4 -@b = global %class.B zeroinitializer, align 4 +@a = global %class.A zeroinitializer, align 4, !dbg 0 !5 +@b = global %class.B zeroinitializer, align 4, !dbg 0 !17 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!29} @@ -21,7 +21,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 10, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp") !7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !28, elements: !8) !8 = !{!9, !11} @@ -31,7 +31,7 @@ !12 = !DISubroutineType(types: !13) !13 = !{null, !14} !14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !7) -!17 = !DIGlobalVariable(name: "b", line: 11, isLocal: false, isDefinition: true, scope: null, file: !6, type: !18, variable: %class.B* @b) +!17 = !DIGlobalVariable(name: "b", line: 11, isLocal: false, isDefinition: true, scope: null, file: !6, type: !18) !18 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 5, size: 32, align: 32, file: !28, elements: !19) !19 = !{!20, !21, !27} !20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 7, size: 32, align: 32, flags: DIFlagPrivate, file: !28, scope: !18, baseType: !10) Index: test/DebugInfo/X86/InlinedFnLocalVar.ll =================================================================== --- test/DebugInfo/X86/InlinedFnLocalVar.ll +++ test/DebugInfo/X86/InlinedFnLocalVar.ll @@ -6,13 +6,13 @@ ; CHECK-NEXT: info_string -@i = common global i32 0 ; [#uses=2] +@i = common global i32 0, !dbg 0 !16 ; [#uses=2] declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @bar() nounwind ssp !dbg !6 { +define i32 @bar() nounwind ssp !dbg 0 !6 { entry: %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2] tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !109, metadata !DIExpression()), !dbg !19 @@ -45,7 +45,7 @@ !13 = !{!14, !15} !14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 10, size: 32, align: 32, file: !27, scope: !12, baseType: !5) !15 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 10, size: 32, align: 32, offset: 32, file: !27, scope: !12, baseType: !5) -!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5, variable: i32* @i) +!16 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5) !17 = !DILocation(line: 15, scope: !18) !18 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !6) !19 = !DILocation(line: 9, scope: !0, inlinedAt: !17) Index: test/DebugInfo/X86/PR26148.ll =================================================================== --- test/DebugInfo/X86/PR26148.ll +++ test/DebugInfo/X86/PR26148.ll @@ -31,7 +31,7 @@ %struct.S0 = type { i16, i32 } -@a = common global %struct.S0 zeroinitializer, align 4 +@a = common global %struct.S0 zeroinitializer, align 4, !dbg 0 !21 declare void @llvm.dbg.declare(metadata, metadata, metadata) declare void @llvm.dbg.value(metadata, i64, metadata, metadata) @@ -40,7 +40,7 @@ ; the function, which has special interpretation in DWARF. The fact that this happens ; at all is probably an LLVM bug. attributes #0 = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" } -define void @fn1(i16 signext %p1) #0 !dbg !4 { +define void @fn1(i16 signext %p1) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i16 %p1, i64 0, metadata !9, metadata !26), !dbg !27 tail call void @llvm.dbg.declare(metadata %struct.S0* undef, metadata !10, metadata !26), !dbg !28 @@ -55,7 +55,7 @@ ret void, !dbg !34 } -define i32 @main() !dbg !17 { +define i32 @main() !dbg 0 !17 { entry: ret i32 0, !dbg !35 } @@ -84,7 +84,7 @@ !18 = !DISubroutineType(types: !19) !19 = !{!15} !20 = !{!21} -!21 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 4, type: !11, isLocal: false, isDefinition: true, variable: %struct.S0* @a) +!21 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 4, type: !11, isLocal: false, isDefinition: true) !22 = !{i32 2, !"Dwarf Version", i32 2} !23 = !{i32 2, !"Debug Info Version", i32 3} !24 = !{i32 1, !"PIC Level", i32 2} Index: test/DebugInfo/X86/abstract_origin.ll =================================================================== --- test/DebugInfo/X86/abstract_origin.ll +++ test/DebugInfo/X86/abstract_origin.ll @@ -16,7 +16,7 @@ target triple = "x86_64-apple-macosx10.11.0" ; Function Attrs: alwaysinline nounwind ssp uwtable -define void @g() #0 !dbg !7 { +define void @g() #0 !dbg 0 !7 { entry: tail call void (...) @f() #3, !dbg !10 ret void, !dbg !11 @@ -25,7 +25,7 @@ declare void @f(...) ; Function Attrs: nounwind ssp uwtable -define void @h() #2 !dbg !12 { +define void @h() #2 !dbg 0 !12 { entry: tail call void (...) @f() #3, !dbg !13 ret void, !dbg !15 Index: test/DebugInfo/X86/aligned_stack_var.ll =================================================================== --- test/DebugInfo/X86/aligned_stack_var.ll +++ test/DebugInfo/X86/aligned_stack_var.ll @@ -15,7 +15,7 @@ ; CHECK-NOT: {{DW_AT_location.*DW_FORM_block1.*0x.*91}} ; CHECK: NULL -define void @_Z3runv() nounwind uwtable !dbg !5 { +define void @_Z3runv() nounwind uwtable !dbg 0 !5 { entry: %x = alloca i32, align 32 call void @llvm.dbg.declare(metadata i32* %x, metadata !9, metadata !DIExpression()), !dbg !12 Index: test/DebugInfo/X86/arange-and-stub.ll =================================================================== --- test/DebugInfo/X86/arange-and-stub.ll +++ test/DebugInfo/X86/arange-and-stub.ll @@ -10,13 +10,13 @@ target triple = "x86_64-linux-gnu" @_ZTId = external constant i8* -@zed = global [1 x void ()*] [void ()* @bar] +@zed = global [1 x void ()*] [void ()* @bar], !dbg 0 !11 -define void @foo() !dbg !4 { +define void @foo() !dbg 0 !4 { ret void } -define void @bar() personality i8* bitcast (void ()* @foo to i8*) !dbg !9 { +define void @bar() personality i8* bitcast (void ()* @foo to i8*) !dbg 0 !9 { invoke void @foo() to label %invoke.cont unwind label %lpad, !dbg !19 @@ -42,7 +42,7 @@ !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, 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) +!11 = !DIGlobalVariable(name: "zed", scope: !0, file: !5, line: 6, type: !12, isLocal: false, isDefinition: true) !12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 64, align: 64, elements: !15) !13 = !DIDerivedType(tag: DW_TAG_typedef, name: "vifunc", file: !5, line: 5, baseType: !14) !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64) Index: test/DebugInfo/X86/arange.ll =================================================================== --- test/DebugInfo/X86/arange.ll +++ test/DebugInfo/X86/arange.ll @@ -22,7 +22,7 @@ %struct.foo = type { i8 } -@f = global %struct.foo zeroinitializer, align 1 +@f = global %struct.foo zeroinitializer, align 1, !dbg 0 !10 @i = external global i32 !llvm.dbg.cu = !{!0} @@ -39,7 +39,7 @@ !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 = !{!10} -!10 = !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4, variable: %struct.foo* @f) +!10 = !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4) !11 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo") !12 = !{i32 2, !"Dwarf Version", i32 4} !13 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/arguments.ll =================================================================== --- test/DebugInfo/X86/arguments.ll +++ test/DebugInfo/X86/arguments.ll @@ -29,7 +29,7 @@ %struct.foo = type { i32 } ; Function Attrs: nounwind uwtable -define void @_Z4func3fooS_(%struct.foo* %f, %struct.foo* %g) #0 !dbg !4 { +define void @_Z4func3fooS_(%struct.foo* %f, %struct.foo* %g) #0 !dbg 0 !4 { entry: call void @llvm.dbg.declare(metadata %struct.foo* %f, metadata !19, metadata !DIExpression()), !dbg !20 call void @llvm.dbg.declare(metadata %struct.foo* %g, metadata !21, metadata !DIExpression()), !dbg !20 Index: test/DebugInfo/X86/array.ll =================================================================== --- test/DebugInfo/X86/array.ll +++ test/DebugInfo/X86/array.ll @@ -26,14 +26,14 @@ @main.array = private unnamed_addr constant [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16 ; Function Attrs: nounwind ssp uwtable -define void @f(i32* nocapture %p) #0 !dbg !4 { +define void @f(i32* nocapture %p) #0 !dbg 0 !4 { tail call void @llvm.dbg.value(metadata i32* %p, i64 0, metadata !11, metadata !DIExpression()), !dbg !28 store i32 42, i32* %p, align 4, !dbg !29, !tbaa !30 ret void, !dbg !34 } ; Function Attrs: nounwind ssp uwtable -define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg !12 { +define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg 0 !12 { %array = alloca [4 x i32], align 16 tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !19, metadata !DIExpression()), !dbg !35 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !20, metadata !DIExpression()), !dbg !35 Index: test/DebugInfo/X86/array2.ll =================================================================== --- test/DebugInfo/X86/array2.ll +++ test/DebugInfo/X86/array2.ll @@ -25,7 +25,7 @@ @main.array = private unnamed_addr constant [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16 ; Function Attrs: nounwind ssp uwtable -define void @f(i32* %p) #0 !dbg !4 { +define void @f(i32* %p) #0 !dbg 0 !4 { entry: %p.addr = alloca i32*, align 8 store i32* %p, i32** %p.addr, align 8 @@ -40,7 +40,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define i32 @main(i32 %argc, i8** %argv) #0 !dbg !10 { +define i32 @main(i32 %argc, i8** %argv) #0 !dbg 0 !10 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 Index: test/DebugInfo/X86/bbjoin.ll =================================================================== --- test/DebugInfo/X86/bbjoin.ll +++ test/DebugInfo/X86/bbjoin.ll @@ -23,7 +23,7 @@ target triple = "x86_64-apple-macosx10.11.0" ; Function Attrs: nounwind ssp uwtable -define i32 @f() #0 !dbg !4 { +define i32 @f() #0 !dbg 0 !4 { entry: %x = alloca i32, align 4 %0 = bitcast i32* %x to i8*, !dbg !14 Index: test/DebugInfo/X86/bitfields-dwarf4.ll =================================================================== --- test/DebugInfo/X86/bitfields-dwarf4.ll +++ test/DebugInfo/X86/bitfields-dwarf4.ll @@ -18,7 +18,7 @@ %struct.PackedBits = type <{ i8, i32 }> -@s = common global %struct.PackedBits zeroinitializer, align 1 +@s = common global %struct.PackedBits zeroinitializer, align 1, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14, !15, !16} @@ -28,7 +28,7 @@ !1 = !DIFile(filename: "bitfield.c", directory: "/Volumes/Data/llvm") !2 = !{} !3 = !{!4} -!4 = distinct !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, variable: %struct.PackedBits* @s) +!4 = distinct !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true) !5 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "PackedBits", file: !1, line: 3, size: 40, align: 8, elements: !6) !6 = !{!7, !9, !13} Index: test/DebugInfo/X86/bitfields.ll =================================================================== --- test/DebugInfo/X86/bitfields.ll +++ test/DebugInfo/X86/bitfields.ll @@ -48,7 +48,7 @@ %struct.bitfield = type <{ i8, [3 x i8], i64 }> -@b = common global %struct.bitfield zeroinitializer, align 4 +@b = common global %struct.bitfield zeroinitializer, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !14, !15} @@ -58,7 +58,7 @@ !1 = !DIFile(filename: "bitfields.c", directory: "/") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "b", scope: !0, file: !5, line: 8, type: !6, isLocal: false, isDefinition: true, variable: %struct.bitfield* @b) +!4 = !DIGlobalVariable(name: "b", scope: !0, file: !5, line: 8, type: !6, isLocal: false, isDefinition: true) !5 = !DIFile(filename: "bitfields.c", directory: "/") !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "bitfield", file: !5, line: 1, size: 96, align: 32, elements: !7) !7 = !{!8, !10, !11, !12} Index: test/DebugInfo/X86/block-capture.ll =================================================================== --- test/DebugInfo/X86/block-capture.ll +++ test/DebugInfo/X86/block-capture.ll @@ -27,7 +27,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: ssp uwtable -define internal void @__foo_block_invoke(i8* %.block_descriptor) #2 !dbg !8 { +define internal void @__foo_block_invoke(i8* %.block_descriptor) #2 !dbg 0 !8 { entry: %.block_descriptor.addr = alloca i8*, align 8 %block.addr = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, void (...)* }>*, align 8 Index: test/DebugInfo/X86/byvalstruct.ll =================================================================== --- test/DebugInfo/X86/byvalstruct.ll +++ test/DebugInfo/X86/byvalstruct.ll @@ -58,7 +58,7 @@ @llvm.used = appending global [5 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @"\01L_OBJC_METH_VAR_TYPE_", i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._objc_method] }* @"\01l_OBJC_$_INSTANCE_METHODS_Bitmap" to i8*), i8* bitcast ([1 x i8*]* @"\01L_OBJC_LABEL_CLASS_$" to i8*)], section "llvm.metadata" ; Function Attrs: ssp uwtable -define internal i8* @"\01-[Bitmap initWithCopy:andInfo:andLength:]"(%0* %self, i8* %_cmd, %0* %otherBitmap, %struct.ImageInfo* byval align 8 %info, i64 %length) #0 !dbg !7 { +define internal i8* @"\01-[Bitmap initWithCopy:andInfo:andLength:]"(%0* %self, i8* %_cmd, %0* %otherBitmap, %struct.ImageInfo* byval align 8 %info, i64 %length) #0 !dbg 0 !7 { entry: %retval = alloca i8*, align 8 %self.addr = alloca %0*, align 8 Index: test/DebugInfo/X86/c-type-units.ll =================================================================== --- test/DebugInfo/X86/c-type-units.ll +++ test/DebugInfo/X86/c-type-units.ll @@ -11,7 +11,7 @@ %struct.foo = type {} -@f = common global %struct.foo zeroinitializer, align 1 +@f = common global %struct.foo zeroinitializer, align 1, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!7, !8} @@ -21,7 +21,7 @@ !1 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: %struct.foo* @f) +!4 = !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !5 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo") !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, align: 8, file: !1, elements: !2) !7 = !{i32 2, !"Dwarf Version", i32 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 @@ -19,7 +19,7 @@ ; return 0; ; } -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/X86/coff_relative_names.ll =================================================================== --- test/DebugInfo/X86/coff_relative_names.ll +++ test/DebugInfo/X86/coff_relative_names.ll @@ -11,7 +11,7 @@ ; } ; Function Attrs: nounwind -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval 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 @@ -60,14 +60,14 @@ ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev" -define i32 @_ZN17nsAutoRefCnt7ReleaseEv() !dbg !5 { +define i32 @_ZN17nsAutoRefCnt7ReleaseEv() !dbg 0 !5 { entry: store i32 1, i32* null, align 4, !dbg !50 tail call void @_Z8moz_freePv(i8* null) nounwind, !dbg !54 ret i32 0 } -define void @_ZN17nsAutoRefCntD1Ev() !dbg !23 { +define void @_ZN17nsAutoRefCntD1Ev() !dbg 0 !23 { entry: tail call void @_Z8moz_freePv(i8* null) nounwind, !dbg !57 ret void @@ -118,7 +118,7 @@ !45 = !DILocalVariable(name: "this", line: 4, arg: 1, flags: DIFlagArtificial, scope: !31, file: !6, type: !34) !46 = !DILocalVariable(name: "aValue", line: 4, arg: 2, scope: !31, file: !6, type: !9) !47 = !{!49} -!49 = !DIGlobalVariable(name: "mRefCnt", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !37, variable: i32* null) +!49 = !DIGlobalVariable(name: "mRefCnt", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !37) !50 = !DILocation(line: 5, column: 5, scope: !51, inlinedAt: !52) !51 = distinct !DILexicalBlock(line: 4, column: 29, file: !6, scope: !31) !52 = !DILocation(line: 15, scope: !53) Index: test/DebugInfo/X86/constant-aggregate.ll =================================================================== --- test/DebugInfo/X86/constant-aggregate.ll +++ test/DebugInfo/X86/constant-aggregate.ll @@ -40,7 +40,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind readnone ssp uwtable -define i32 @_Z3foo1S(i32 %s.coerce) #0 !dbg !12 { +define i32 @_Z3foo1S(i32 %s.coerce) #0 !dbg 0 !12 { entry: tail call void @llvm.dbg.value(metadata i32 %s.coerce, i64 0, metadata !18, metadata !37), !dbg !38 tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !37), !dbg !38 @@ -48,7 +48,7 @@ } ; Function Attrs: nounwind readnone ssp uwtable -define i32 @_Z3foo1C(i32 %c.coerce) #0 !dbg !19 { +define i32 @_Z3foo1C(i32 %c.coerce) #0 !dbg 0 !19 { entry: tail call void @llvm.dbg.value(metadata i32 %c.coerce, i64 0, metadata !23, metadata !37), !dbg !40 tail call void @llvm.dbg.value(metadata i32 2, i64 0, metadata !23, metadata !37), !dbg !40 @@ -56,7 +56,7 @@ } ; Function Attrs: nounwind readnone ssp uwtable -define i32 @_Z3barv() #0 !dbg !24 { +define i32 @_Z3barv() #0 !dbg 0 !24 { entry: tail call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !28, metadata !37), !dbg !42 ret i32 3, !dbg !43 Index: test/DebugInfo/X86/cu-ranges-odr.ll =================================================================== --- test/DebugInfo/X86/cu-ranges-odr.ll +++ test/DebugInfo/X86/cu-ranges-odr.ll @@ -20,17 +20,17 @@ %class.A = type { i32 } -@a = global %class.A zeroinitializer, align 4 +@a = global %class.A zeroinitializer, align 4, !dbg 0 !22 @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }] -define internal void @__cxx_global_var_init() section ".text.startup" !dbg !14 { +define internal void @__cxx_global_var_init() section ".text.startup" !dbg 0 !14 { entry: call void @_ZN1AC2Ei(%class.A* @a, i32 0), !dbg !26 ret void, !dbg !26 } ; Function Attrs: nounwind uwtable -define linkonce_odr void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg !18 { +define linkonce_odr void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg 0 !18 { entry: %this.addr = alloca %class.A*, align 8 %i.addr = alloca i32, align 4 @@ -48,7 +48,7 @@ ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !19 { +define internal void @_GLOBAL__I_a() section ".text.startup" !dbg 0 !19 { entry: call void @__cxx_global_var_init(), !dbg !32 ret void, !dbg !32 @@ -81,7 +81,7 @@ !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) +!22 = !DIGlobalVariable(name: "a", line: 8, isLocal: false, isDefinition: true, scope: null, file: !15, type: !4) !23 = !{i32 2, !"Dwarf Version", i32 4} !24 = !{i32 1, !"Debug Info Version", i32 3} !25 = !{!"clang version 3.5 (trunk 199923) (llvm/trunk 199940)"} Index: test/DebugInfo/X86/cu-ranges.ll =================================================================== --- test/DebugInfo/X86/cu-ranges.ll +++ test/DebugInfo/X86/cu-ranges.ll @@ -25,7 +25,7 @@ ; NO-FUNCTION-SECTIONS-NOT: DW_AT_ranges ; Function Attrs: nounwind uwtable -define i32 @foo(i32 %a) #0 !dbg !4 { +define i32 @foo(i32 %a) #0 !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 @@ -39,7 +39,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @bar(i32 %b) #0 !dbg !9 { +define i32 @bar(i32 %b) #0 !dbg 0 !9 { entry: %b.addr = alloca i32, align 4 store i32 %b, i32* %b.addr, align 4 Index: test/DebugInfo/X86/data_member_location.ll =================================================================== --- test/DebugInfo/X86/data_member_location.ll +++ test/DebugInfo/X86/data_member_location.ll @@ -28,7 +28,7 @@ %struct.foo = type { i8, i32 } -@f = global %struct.foo zeroinitializer, align 4 +@f = global %struct.foo zeroinitializer, align 4, !dbg 0 !11 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !15} @@ -45,7 +45,7 @@ !8 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 3, size: 32, align: 32, offset: 32, file: !1, scope: !4, baseType: !9) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !{!11} -!11 = !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !12, type: !4, variable: %struct.foo* @f) +!11 = !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !12, type: !4) !12 = !DIFile(filename: "data_member_location.cpp", directory: "/tmp/dbginfo") !13 = !{i32 2, !"Dwarf Version", i32 4} !14 = !{!"clang version 3.4 "} Index: test/DebugInfo/X86/dbg-byval-parameter.ll =================================================================== --- test/DebugInfo/X86/dbg-byval-parameter.ll +++ test/DebugInfo/X86/dbg-byval-parameter.ll @@ -4,7 +4,7 @@ %struct.Pt = type { double, double } %struct.Rect = type { %struct.Pt, %struct.Pt } -define double @foo(%struct.Rect* byval %my_r0) nounwind ssp !dbg !1 { +define double @foo(%struct.Rect* byval %my_r0) nounwind ssp !dbg 0 !1 { entry: %retval = alloca double ; [#uses=2] %0 = alloca double ; [#uses=2] Index: test/DebugInfo/X86/dbg-const-int.ll =================================================================== --- test/DebugInfo/X86/dbg-const-int.ll +++ test/DebugInfo/X86/dbg-const-int.ll @@ -10,7 +10,7 @@ ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "i" -define i32 @foo() nounwind uwtable readnone optsize ssp !dbg !1 { +define i32 @foo() nounwind uwtable readnone optsize ssp !dbg 0 !1 { entry: tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !6, metadata !DIExpression()), !dbg !9 ret i32 42, !dbg !10 Index: test/DebugInfo/X86/dbg-const.ll =================================================================== --- test/DebugInfo/X86/dbg-const.ll +++ test/DebugInfo/X86/dbg-const.ll @@ -15,7 +15,7 @@ ;CHECK: ## DW_OP_consts ;CHECK-NEXT: .byte 42 -define i32 @foobar() nounwind readonly noinline ssp !dbg !0 { +define i32 @foobar() nounwind readonly noinline ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !6, metadata !DIExpression()), !dbg !9 %call = tail call i32 @bar(), !dbg !11 Index: test/DebugInfo/X86/dbg-declare-arg.ll =================================================================== --- test/DebugInfo/X86/dbg-declare-arg.ll +++ test/DebugInfo/X86/dbg-declare-arg.ll @@ -7,7 +7,7 @@ %class.A = type { i32, i32, i32, i32 } -define void @_Z3fooi(%class.A* sret %agg.result, i32 %i) ssp !dbg !19 { +define void @_Z3fooi(%class.A* sret %agg.result, i32 %i) ssp !dbg 0 !19 { entry: %i.addr = alloca i32, align 4 %j = alloca i32, align 4 @@ -48,7 +48,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN1AD1Ev(%class.A* %this) unnamed_addr ssp align 2 !dbg !22 { +define linkonce_odr void @_ZN1AD1Ev(%class.A* %this) unnamed_addr ssp align 2 !dbg 0 !22 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -58,7 +58,7 @@ ret void, !dbg !45 } -define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr nounwind ssp align 2 !dbg !25 { +define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr nounwind ssp align 2 !dbg 0 !25 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 Index: test/DebugInfo/X86/dbg-declare.ll =================================================================== --- test/DebugInfo/X86/dbg-declare.ll +++ test/DebugInfo/X86/dbg-declare.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -O0 -mtriple x86_64-apple-darwin ; -define i32 @foo(i32* %x) nounwind uwtable ssp !dbg !5 { +define i32 @foo(i32* %x) nounwind uwtable ssp !dbg 0 !5 { entry: %x.addr = alloca i32*, align 8 %saved_stack = alloca i8* Index: test/DebugInfo/X86/dbg-file-name.ll =================================================================== --- test/DebugInfo/X86/dbg-file-name.ll +++ test/DebugInfo/X86/dbg-file-name.ll @@ -6,7 +6,7 @@ declare i32 @printf(i8*, ...) nounwind -define i32 @main() nounwind !dbg !6 { +define i32 @main() nounwind !dbg 0 !6 { ret i32 0 } Index: test/DebugInfo/X86/dbg-i128-const.ll =================================================================== --- test/DebugInfo/X86/dbg-i128-const.ll +++ test/DebugInfo/X86/dbg-i128-const.ll @@ -4,7 +4,7 @@ ; CHECK: DW_AT_const_value ; CHECK-NEXT: 42 -define i128 @__foo(i128 %a, i128 %b) nounwind !dbg !3 { +define i128 @__foo(i128 %a, i128 %b) nounwind !dbg 0 !3 { entry: tail call void @llvm.dbg.value(metadata i128 42 , i64 0, metadata !1, metadata !DIExpression()), !dbg !11 %add = add i128 %a, %b, !dbg !11 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 @@ -12,7 +12,7 @@ @__clz_tab = external constant [256 x i8] -define hidden i128 @__divti3(i128 %u, i128 %v) nounwind readnone !dbg !9 { +define hidden i128 @__divti3(i128 %u, i128 %v) nounwind readnone !dbg 0 !9 { entry: tail call void @llvm.dbg.value(metadata i128 %u, i64 0, metadata !14, metadata !DIExpression()), !dbg !15 tail call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !21 Index: test/DebugInfo/X86/dbg-prolog-end.ll =================================================================== --- test/DebugInfo/X86/dbg-prolog-end.ll +++ test/DebugInfo/X86/dbg-prolog-end.ll @@ -3,7 +3,7 @@ target triple = "x86_64-apple-macosx10.6.7" ;CHECK: .loc 1 2 11 prologue_end -define i32 @foo(i32 %i) nounwind ssp !dbg !1 { +define i32 @foo(i32 %i) nounwind ssp !dbg 0 !1 { entry: %i.addr = alloca i32, align 4 %j = alloca i32, align 4 @@ -24,7 +24,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @main() nounwind ssp !dbg !6 { +define i32 @main() nounwind ssp !dbg 0 !6 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/X86/dbg-subrange.ll =================================================================== --- test/DebugInfo/X86/dbg-subrange.ll +++ test/DebugInfo/X86/dbg-subrange.ll @@ -3,10 +3,10 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.7.2" -@s = common global [4294967296 x i8] zeroinitializer, align 16 +@s = common global [4294967296 x i8] zeroinitializer, align 16, !dbg 0 !13 ; CHECK: .quad 4294967296 ## DW_AT_count -define void @bar() nounwind uwtable ssp !dbg !5 { +define void @bar() nounwind uwtable ssp !dbg 0 !5 { entry: store i8 97, i8* getelementptr inbounds ([4294967296 x i8], [4294967296 x i8]* @s, i32 0, i64 0), align 1, !dbg !18 ret void, !dbg !20 @@ -22,7 +22,7 @@ !7 = !DISubroutineType(types: !8) !8 = !{null} !11 = !{!13} -!13 = !DIGlobalVariable(name: "s", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14, variable: [4294967296 x i8]* @s) +!13 = !DIGlobalVariable(name: "s", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14) !14 = !DICompositeType(tag: DW_TAG_array_type, size: 34359738368, align: 8, baseType: !15, elements: !16) !15 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !16 = !{!17} 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 @@ -47,7 +47,7 @@ target triple = "x86_64-apple-macosx10.9.0" ; Function Attrs: nounwind ssp uwtable -define i32 @foo() #0 !dbg !4 { +define i32 @foo() #0 !dbg 0 !4 { entry: %i = alloca i32, align 4 call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !10, metadata !DIExpression()), !dbg !15 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 @@ -6,7 +6,7 @@ declare <4 x i32> @__amdil_get_global_id_int() declare void @llvm.dbg.value(metadata, i64, metadata, metadata) -define void @__OpenCL_test_kernel(i32 addrspace(1)* %ip) nounwind !dbg !0 { +define void @__OpenCL_test_kernel(i32 addrspace(1)* %ip) nounwind !dbg 0 !0 { entry: call void @llvm.dbg.value(metadata i32 addrspace(1)* %ip, i64 0, metadata !7, metadata !DIExpression()), !dbg !8 %0 = call <4 x i32> @__amdil_get_global_id_int() nounwind 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 @@ -41,9 +41,9 @@ %struct.S1 = type { float*, i32 } -@p = common global %struct.S1 zeroinitializer, align 8 +@p = common global %struct.S1 zeroinitializer, align 8, !dbg 0 !19 -define i32 @foo(%struct.S1* nocapture %sp, i32 %nums) nounwind optsize ssp !dbg !0 { +define i32 @foo(%struct.S1* nocapture %sp, i32 %nums) nounwind optsize ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata %struct.S1* %sp, i64 0, metadata !9, metadata !DIExpression()), !dbg !20 tail call void @llvm.dbg.value(metadata i32 %nums, i64 0, metadata !18, metadata !DIExpression()), !dbg !21 @@ -59,7 +59,7 @@ declare float* @bar(i32) optsize -define void @foobar() nounwind optsize ssp !dbg !6 { +define void @foobar() nounwind optsize ssp !dbg 0 !6 { entry: tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !9, metadata !DIExpression()) nounwind, !dbg !31 tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !DIExpression()) nounwind, !dbg !35 @@ -93,7 +93,7 @@ !16 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) !17 = !DIDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5) !18 = !DILocalVariable(name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5) -!19 = !DIGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11, variable: %struct.S1* @p) +!19 = !DIGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11) !20 = !DILocation(line: 7, column: 13, scope: !0) !21 = !DILocation(line: 7, column: 21, scope: !0) !22 = !DILocation(line: 9, column: 3, scope: !23) Index: test/DebugInfo/X86/dbg-value-isel.ll =================================================================== --- test/DebugInfo/X86/dbg-value-isel.ll +++ test/DebugInfo/X86/dbg-value-isel.ll @@ -11,7 +11,7 @@ @lvgv = internal constant [0 x i8*] zeroinitializer @llvm.global.annotations = appending global [1 x %0] [%0 { i8* bitcast (void (i32 addrspace(1)*)* @__OpenCL_nbt02_kernel to i8*), i8* addrspacecast ([1 x i8] addrspace(2)* @sgv to i8*), i8* addrspacecast ([1 x i8] addrspace(2)* @fgv to i8*), i8* bitcast ([0 x i8*]* @lvgv to i8*), i32 0 }], section "llvm.metadata" -define void @__OpenCL_nbt02_kernel(i32 addrspace(1)* %ip) nounwind !dbg !0 { +define void @__OpenCL_nbt02_kernel(i32 addrspace(1)* %ip) nounwind !dbg 0 !0 { entry: call void @llvm.dbg.value(metadata i32 addrspace(1)* %ip, i64 0, metadata !8, metadata !DIExpression()), !dbg !9 %0 = call <4 x i32> @__amdil_get_local_id_int() nounwind Index: test/DebugInfo/X86/dbg-value-location.ll =================================================================== --- test/DebugInfo/X86/dbg-value-location.ll +++ test/DebugInfo/X86/dbg-value-location.ll @@ -16,7 +16,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @foo(i32 %dev, i64 %cmd, i8* %data, i32 %data2) nounwind optsize ssp !dbg !0 { +define i32 @foo(i32 %dev, i64 %cmd, i8* %data, i32 %data2) nounwind optsize ssp !dbg 0 !0 { entry: call void @llvm.dbg.value(metadata i32 %dev, i64 0, metadata !12, metadata !DIExpression()), !dbg !13 %tmp.i = load i32, i32* @dfm, align 4, !dbg !14 Index: test/DebugInfo/X86/dbg-value-range.ll =================================================================== --- test/DebugInfo/X86/dbg-value-range.ll +++ test/DebugInfo/X86/dbg-value-range.ll @@ -2,7 +2,7 @@ %struct.a = type { i32 } -define i32 @bar(%struct.a* nocapture %b) nounwind ssp !dbg !0 { +define i32 @bar(%struct.a* nocapture %b) nounwind ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata %struct.a* %b, i64 0, metadata !6, metadata !DIExpression()), !dbg !13 %tmp1 = getelementptr inbounds %struct.a, %struct.a* %b, i64 0, i32 0, !dbg !14 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 @@ -36,10 +36,10 @@ target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc18.0.0" -@x = common global i32 0, align 4 +@x = common global i32 0, align 4, !dbg 0 !15 ; Function Attrs: nounwind uwtable -define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg !4 { +define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !12, metadata !21), !dbg !22 tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !13, metadata !21), !dbg !23 @@ -89,7 +89,7 @@ !12 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 4, type: !8) !13 = !DILocalVariable(name: "argc", arg: 1, scope: !4, file: !1, line: 4, type: !7) !14 = !{!15} -!15 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !16, isLocal: false, isDefinition: true, variable: i32* @x) +!15 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !16, isLocal: false, isDefinition: true) !16 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) !17 = !{i32 2, !"Dwarf Version", i32 4} !18 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/dbg-value-terminator.ll =================================================================== --- test/DebugInfo/X86/dbg-value-terminator.ll +++ test/DebugInfo/X86/dbg-value-terminator.ll @@ -10,7 +10,7 @@ %a = type { i32, i32 } -define hidden fastcc %a* @test() #1 !dbg !1 { +define hidden fastcc %a* @test() #1 !dbg 0 !1 { entry: %0 = icmp eq %a* undef, null, !dbg !12 br i1 %0, label %"14", label %return, !dbg !12 Index: test/DebugInfo/X86/dbg_value_direct.ll =================================================================== --- test/DebugInfo/X86/dbg_value_direct.ll +++ test/DebugInfo/X86/dbg_value_direct.ll @@ -23,7 +23,7 @@ @__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 5 .addr \00", align 1 ; Function Attrs: sanitize_address uwtable -define void @_Z4funci(%struct.A* noalias sret %agg.result, i32) #0 "stack-protector-buffer-size"="1" !dbg !4 { +define void @_Z4funci(%struct.A* noalias sret %agg.result, i32) #0 "stack-protector-buffer-size"="1" !dbg 0 !4 { entry: %MyAlloca = alloca [96 x i8], align 32 %1 = ptrtoint [96 x i8]* %MyAlloca to i64 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 @@ -19,7 +19,7 @@ ; CHECK-NOT: DW_TAG_structure_type ; Function Attrs: nounwind readnone uwtable -define i32 @bar() #0 !dbg !4 { +define i32 @bar() #0 !dbg 0 !4 { entry: ret i32 1, !dbg !21 } Index: test/DebugInfo/X86/debug-info-access.ll =================================================================== --- test/DebugInfo/X86/debug-info-access.ll +++ test/DebugInfo/X86/debug-info-access.ll @@ -91,12 +91,12 @@ %class.B = type { i8 } %union.U = type { i32 } -@a = global %struct.A zeroinitializer, align 1 -@b = global %class.B zeroinitializer, align 1 -@u = global %union.U zeroinitializer, align 4 +@a = global %struct.A zeroinitializer, align 1, !dbg 0 !35 +@b = global %class.B zeroinitializer, align 1, !dbg 0 !36 +@u = global %union.U zeroinitializer, align 4, !dbg 0 !37 ; Function Attrs: nounwind ssp uwtable -define void @_Z4freev() #0 !dbg !30 { +define void @_Z4freev() #0 !dbg 0 !30 { ret void, !dbg !41 } @@ -140,9 +140,9 @@ !32 = !DISubroutineType(types: !33) !33 = !{null} !34 = !{!35, !36, !37} -!35 = !DIGlobalVariable(name: "a", line: 37, isLocal: false, isDefinition: true, scope: null, file: !31, type: !4, variable: %struct.A* @a) -!36 = !DIGlobalVariable(name: "b", line: 38, isLocal: false, isDefinition: true, scope: null, file: !31, type: !12, variable: %class.B* @b) -!37 = !DIGlobalVariable(name: "u", line: 39, isLocal: false, isDefinition: true, scope: null, file: !31, type: !22, variable: %union.U* @u) +!35 = !DIGlobalVariable(name: "a", line: 37, isLocal: false, isDefinition: true, scope: null, file: !31, type: !4) +!36 = !DIGlobalVariable(name: "b", line: 38, isLocal: false, isDefinition: true, scope: null, file: !31, type: !12) +!37 = !DIGlobalVariable(name: "u", line: 39, isLocal: false, isDefinition: true, scope: null, file: !31, type: !22) !38 = !{i32 2, !"Dwarf Version", i32 2} !39 = !{i32 2, !"Debug Info Version", i32 3} !40 = !{!"clang version 3.6.0 "} 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 @@ -64,14 +64,14 @@ %0 = type opaque %struct.__block_descriptor = type { i64, i64 } declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define internal void @"__24-[Main initWithContext:]_block_invoke"(i8* %.block_descriptor, i8* %obj) #0 !dbg !38 { +define internal void @"__24-[Main initWithContext:]_block_invoke"(i8* %.block_descriptor, i8* %obj) #0 !dbg 0 !38 { %block = bitcast i8* %.block_descriptor to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>*, !dbg !84 %block.captured-self = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %block, i32 0, i32 5, !dbg !84 call void @llvm.dbg.declare(metadata <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %block, metadata !86, metadata !110), !dbg !87 ret void, !dbg !87 } -define internal void @"__24-[Main initWithContext:]_block_invoke_2"(i8* %.block_descriptor, i8* %object) #0 !dbg !42 { +define internal void @"__24-[Main initWithContext:]_block_invoke_2"(i8* %.block_descriptor, i8* %object) #0 !dbg 0 !42 { %block = bitcast i8* %.block_descriptor to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>*, !dbg !103 %block.captured-self = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %block, i32 0, i32 5, !dbg !103 call void @llvm.dbg.declare(metadata <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>* %block, metadata !105, metadata !109), !dbg !106 Index: test/DebugInfo/X86/debug-info-blocks.ll =================================================================== --- test/DebugInfo/X86/debug-info-blocks.ll +++ test/DebugInfo/X86/debug-info-blocks.ll @@ -95,7 +95,7 @@ @"\01L_OBJC_LABEL_CLASS_$" = internal global [1 x i8*] [i8* bitcast (%struct._class_t* @"OBJC_CLASS_$_A" to i8*)], section "__DATA, __objc_classlist, regular, no_dead_strip", align 8 @llvm.used = appending global [14 x i8*] [i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_SUP_REFS_$_" to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_" to i8*), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @"\01L_OBJC_METH_VAR_NAME_1", i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @"\01L_OBJC_METH_VAR_NAME_2", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @"\01L_OBJC_METH_VAR_TYPE_", i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._objc_method] }* @"\01l_OBJC_$_INSTANCE_METHODS_A" to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01L_OBJC_METH_VAR_NAME_3", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @"\01L_OBJC_METH_VAR_TYPE_4", i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._ivar_t] }* @"\01l_OBJC_$_INSTANCE_VARIABLES_A" to i8*), i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_5" to i8*), i8* bitcast ([1 x i8*]* @"\01L_OBJC_LABEL_CLASS_$" to i8*)], section "llvm.metadata" -define internal i8* @"\01-[A init]"(%0* %self, i8* %_cmd) #0 !dbg !13 { +define internal i8* @"\01-[A init]"(%0* %self, i8* %_cmd) #0 !dbg 0 !13 { %1 = alloca %0*, align 8 %2 = alloca i8*, align 8 %3 = alloca %struct._objc_super @@ -147,7 +147,7 @@ declare i8* @objc_msgSendSuper2(%struct._objc_super*, i8*, ...) -define internal void @run(void ()* %block) #0 !dbg !39 { +define internal void @run(void ()* %block) #0 !dbg 0 !39 { %1 = alloca void ()*, align 8 store void ()* %block, void ()** %1, align 8 call void @llvm.dbg.declare(metadata void ()** %1, metadata !72, metadata !DIExpression()), !dbg !73 @@ -161,7 +161,7 @@ ret void, !dbg !75 } -define internal void @"__9-[A init]_block_invoke"(i8* %.block_descriptor) #0 !dbg !27 { +define internal void @"__9-[A init]_block_invoke"(i8* %.block_descriptor) #0 !dbg 0 !27 { %1 = alloca i8*, align 8 %2 = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, %0* }>*, align 8 %d = alloca %1*, align 8 @@ -206,7 +206,7 @@ declare i8* @objc_msgSend(i8*, i8*, ...) #2 -define internal void @__copy_helper_block_(i8*, i8*) !dbg !31 { +define internal void @__copy_helper_block_(i8*, i8*) !dbg 0 !31 { %3 = alloca i8*, align 8 %4 = alloca i8*, align 8 store i8* %0, i8** %3, align 8 @@ -228,7 +228,7 @@ declare void @_Block_object_assign(i8*, i8*, i32) -define internal void @__destroy_helper_block_(i8*) !dbg !35 { +define internal void @__destroy_helper_block_(i8*) !dbg 0 !35 { %2 = alloca i8*, align 8 store i8* %0, i8** %2, align 8 call void @llvm.dbg.declare(metadata i8** %2, metadata !105, metadata !DIExpression()), !dbg !106 @@ -243,7 +243,7 @@ declare void @_Block_object_dispose(i8*, i32) -define i32 @main() #0 !dbg !36 { +define i32 @main() #0 !dbg 0 !36 { %1 = alloca i32, align 4 %a = alloca %0*, align 8 store i32 0, i32* %1 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 @@ -139,10 +139,10 @@ ; CHECK: DW_AT_bit_offset {{.*}} (0x1f) ; CHECK: DW_AT_data_member_location {{.*}}0c -@l0 = common global %struct.layout0 zeroinitializer, align 8 -@l1 = common global %struct.layout1 zeroinitializer, align 4 -@l2 = common global %struct.layout2 zeroinitializer, align 1 -@l3 = common global %struct.layout3 zeroinitializer, align 4 +@l0 = common global %struct.layout0 zeroinitializer, align 8, !dbg 0 !4 +@l1 = common global %struct.layout1 zeroinitializer, align 4, !dbg 0 !18 +@l2 = common global %struct.layout2 zeroinitializer, align 1, !dbg 0 !25 +@l3 = common global %struct.layout3 zeroinitializer, align 4, !dbg 0 !35 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!45, !46} @@ -152,7 +152,7 @@ !1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/", directory: "/llvm/_build.ninja.release") !2 = !{} !3 = !{!4, !18, !25, !35} -!4 = !DIGlobalVariable(name: "l0", scope: !0, file: !5, line: 88, type: !6, isLocal: false, isDefinition: true, variable: %struct.layout0* @l0) +!4 = !DIGlobalVariable(name: "l0", scope: !0, file: !5, line: 88, type: !6, isLocal: false, isDefinition: true) !5 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c", directory: "/llvm/_build.ninja.release") !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout0", file: !5, line: 15, size: 192, align: 64, elements: !7) !7 = !{!8, !10, !17} @@ -166,14 +166,14 @@ !15 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !11, file: !5, line: 13, baseType: !16, size: 60, offset: 4) !16 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !17 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs16", scope: !6, file: !5, line: 18, baseType: !14, size: 1, align: 32, offset: 128) -!18 = !DIGlobalVariable(name: "l1", scope: !0, file: !5, line: 89, type: !19, isLocal: false, isDefinition: true, variable: %struct.layout1* @l1) +!18 = !DIGlobalVariable(name: "l1", scope: !0, file: !5, line: 89, type: !19, isLocal: false, isDefinition: true) !19 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout1", file: !5, line: 34, size: 96, align: 32, elements: !20) !20 = !{!21, !22, !24} !21 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs0", scope: !19, file: !5, line: 35, baseType: !9, size: 8, align: 8) !22 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs1", scope: !19, file: !5, line: 36, baseType: !23, size: 64, align: 8, offset: 8) !23 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_anon", file: !5, line: 30, size: 64, align: 8, elements: !2) !24 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs9", scope: !19, file: !5, line: 37, baseType: !14, size: 1, align: 32, offset: 72) -!25 = !DIGlobalVariable(name: "l2", scope: !0, file: !5, line: 90, type: !26, isLocal: false, isDefinition: true, variable: %struct.layout2* @l2) +!25 = !DIGlobalVariable(name: "l2", scope: !0, file: !5, line: 90, type: !26, isLocal: false, isDefinition: true) !26 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout2", file: !5, line: 54, size: 80, align: 8, elements: !27) !27 = !{!28, !29, !34} !28 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs0", scope: !26, file: !5, line: 55, baseType: !9, size: 8, align: 8) @@ -183,7 +183,7 @@ !32 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !30, file: !5, line: 51, baseType: !14, size: 4, align: 32) !33 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !30, file: !5, line: 52, baseType: !16, size: 60, offset: 4) !34 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs9", scope: !26, file: !5, line: 57, baseType: !14, size: 1, align: 32, offset: 72) -!35 = !DIGlobalVariable(name: "l3", scope: !0, file: !5, line: 91, type: !36, isLocal: false, isDefinition: true, variable: %struct.layout3* @l3) +!35 = !DIGlobalVariable(name: "l3", scope: !0, file: !5, line: 91, type: !36, isLocal: false, isDefinition: true) !36 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout3", file: !5, line: 76, size: 128, align: 32, elements: !37) !37 = !{!38, !39, !44} !38 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs0", scope: !36, file: !5, line: 77, baseType: !9, size: 8, align: 8) 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 @@ -38,11 +38,11 @@ %class.C = type { i32 } -@_ZN1C1aE = global i32 4, align 4 -@_ZN1C1bE = global i32 2, align 4 -@_ZN1C1cE = global i32 1, align 4 +@_ZN1C1aE = global i32 4, align 4, !dbg 0 !12 +@_ZN1C1bE = global i32 2, align 4, !dbg 0 !27 +@_ZN1C1cE = global i32 1, align 4, !dbg 0 !28 -define i32 @main() nounwind uwtable !dbg !5 { +define i32 @main() nounwind uwtable !dbg 0 !5 { entry: %retval = alloca i32, align 4 %instance_C = alloca %class.C, align 4 @@ -67,7 +67,7 @@ !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !{!12, !27, !28} -!12 = !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", line: 14, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, variable: i32* @_ZN1C1aE, declaration: !15) +!12 = !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", line: 14, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !15) !13 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 1, size: 32, align: 32, file: !33, elements: !14) !14 = !{!15, !16, !19, !20, !23, !24, !26} !15 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 3, flags: DIFlagPrivate | DIFlagStaticMember, file: !33, scope: !13, baseType: !9) @@ -82,8 +82,8 @@ !24 = !DIDerivedType(tag: DW_TAG_member, name: "const_c", line: 10, flags: DIFlagPublic | DIFlagStaticMember, file: !33, scope: !13, baseType: !25, extraData: i32 18) !25 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9) !26 = !DIDerivedType(tag: DW_TAG_member, name: "d", line: 11, size: 32, align: 32, flags: DIFlagPublic, file: !33, scope: !13, baseType: !9) -!27 = !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", line: 15, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, variable: i32* @_ZN1C1bE, declaration: !19) -!28 = !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", line: 16, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, variable: i32* @_ZN1C1cE, declaration: !23) +!27 = !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", line: 15, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !19) +!28 = !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", line: 16, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !23) !29 = !DILocalVariable(name: "instance_C", line: 20, scope: !5, file: !6, type: !13) !30 = !DILocation(line: 20, scope: !5) !31 = !DILocation(line: 21, scope: !5) Index: test/DebugInfo/X86/debug-loc-asan.ll =================================================================== --- test/DebugInfo/X86/debug-loc-asan.ll +++ test/DebugInfo/X86/debug-loc-asan.ll @@ -45,7 +45,7 @@ @__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 6 y.addr\00", align 1 ; Function Attrs: nounwind sanitize_address uwtable -define i32 @_Z3bari(i32 %y) #0 !dbg !4 { +define i32 @_Z3bari(i32 %y) #0 !dbg 0 !4 { entry: %MyAlloca = alloca [64 x i8], align 32 %0 = ptrtoint [64 x i8]* %MyAlloca to i64 Index: test/DebugInfo/X86/debug-loc-offset.ll =================================================================== --- test/DebugInfo/X86/debug-loc-offset.ll +++ test/DebugInfo/X86/debug-loc-offset.ll @@ -60,7 +60,7 @@ %struct.A = type { i32 (...)**, i32 } ; Function Attrs: nounwind -define i32 @_Z3bari(i32 %b) #0 !dbg !4 { +define i32 @_Z3bari(i32 %b) #0 !dbg 0 !4 { entry: %b.addr = alloca i32, align 4 store i32 %b, i32* %b.addr, align 4 @@ -73,7 +73,7 @@ ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define void @_Z3baz1A(%struct.A* %a) #2 !dbg !14 { +define void @_Z3baz1A(%struct.A* %a) #2 !dbg 0 !14 { entry: %z = alloca i32, align 4 call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !24, metadata !DIExpression(DW_OP_deref)), !dbg !25 Index: test/DebugInfo/X86/debug-ranges-offset.ll =================================================================== --- test/DebugInfo/X86/debug-ranges-offset.ll +++ test/DebugInfo/X86/debug-ranges-offset.ll @@ -19,7 +19,7 @@ @_end = external hidden global i32 ; Function Attrs: sanitize_memory uwtable -define void @_Z1fv() #0 !dbg !4 { +define void @_Z1fv() #0 !dbg 0 !4 { entry: %p = alloca i32*, align 8 %0 = ptrtoint i32** %p to i64, !dbg !19 @@ -82,7 +82,7 @@ declare i8* @_Znwm(i64) #1 ; Function Attrs: sanitize_memory uwtable -define i32 @main() #0 !dbg !13 { +define i32 @main() #0 !dbg 0 !13 { entry: %p.i = alloca i32*, align 8 %0 = ptrtoint i32** %p.i to i64, !dbg !30 Index: test/DebugInfo/X86/debug_frame.ll =================================================================== --- test/DebugInfo/X86/debug_frame.ll +++ test/DebugInfo/X86/debug_frame.ll @@ -4,7 +4,7 @@ ; CHECK: .cfi_sections .debug_frame -define void @f() nounwind !dbg !0 { +define void @f() nounwind !dbg 0 !0 { entry: ret void } Index: test/DebugInfo/X86/debugger-tune.ll =================================================================== --- test/DebugInfo/X86/debugger-tune.ll +++ test/DebugInfo/X86/debugger-tune.ll @@ -27,7 +27,7 @@ ; SCE-NOT: apple_names -@globalvar = global i32 0, align 4 +@globalvar = global i32 0, align 4, !dbg 0 !4 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!6, !7} @@ -37,7 +37,7 @@ !1 = !DIFile(filename: "debugger-tune.cpp", directory: "/home/probinson/projects/scratch") !2 = !{} !3 = !{!4} -!4 = !DIGlobalVariable(name: "globalvar", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32* @globalvar) +!4 = !DIGlobalVariable(name: "globalvar", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true) !5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/decl-derived-member.ll =================================================================== --- test/DebugInfo/X86/decl-derived-member.ll +++ test/DebugInfo/X86/decl-derived-member.ll @@ -28,12 +28,12 @@ $_ZN4baseC2Ev = comdat any -@f = global %struct.foo zeroinitializer, align 8 +@f = global %struct.foo zeroinitializer, align 8, !dbg 0 !29 @__dso_handle = external global i8 @_ZTV4base = external unnamed_addr constant [4 x i8*] @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_decl_derived_member.cpp, i8* null }] -define internal void @__cxx_global_var_init() section ".text.startup" !dbg !10 { +define internal void @__cxx_global_var_init() section ".text.startup" !dbg 0 !10 { entry: call void @_ZN3fooC2Ev(%struct.foo* @f) #2, !dbg !33 %0 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.foo*)* @_ZN3fooD2Ev to void (i8*)*), i8* bitcast (%struct.foo* @f to i8*), i8* @__dso_handle) #2, !dbg !33 @@ -41,7 +41,7 @@ } ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr void @_ZN3fooC2Ev(%struct.foo* %this) unnamed_addr #0 comdat align 2 !dbg !14 { +define linkonce_odr void @_ZN3fooC2Ev(%struct.foo* %this) unnamed_addr #0 comdat align 2 !dbg 0 !14 { entry: %this.addr = alloca %struct.foo*, align 8 store %struct.foo* %this, %struct.foo** %this.addr, align 8 @@ -53,7 +53,7 @@ } ; Function Attrs: inlinehint uwtable -define linkonce_odr void @_ZN3fooD2Ev(%struct.foo* %this) unnamed_addr #1 comdat align 2 !dbg !24 { +define linkonce_odr void @_ZN3fooD2Ev(%struct.foo* %this) unnamed_addr #1 comdat align 2 !dbg 0 !24 { entry: %this.addr = alloca %struct.foo*, align 8 store %struct.foo* %this, %struct.foo** %this.addr, align 8 @@ -71,7 +71,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #3 ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr void @_ZN4baseC2Ev(%struct.base* %this) unnamed_addr #0 comdat align 2 !dbg !19 { +define linkonce_odr void @_ZN4baseC2Ev(%struct.base* %this) unnamed_addr #0 comdat align 2 !dbg 0 !19 { entry: %this.addr = alloca %struct.base*, align 8 store %struct.base* %this, %struct.base** %this.addr, align 8 @@ -128,7 +128,7 @@ !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: !4, variable: %struct.foo* @f) +!29 = !DIGlobalVariable(name: "f", line: 8, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4) !30 = !{i32 2, !"Dwarf Version", i32 4} !31 = !{i32 2, !"Debug Info Version", i32 3} !32 = !{!"clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)"} Index: test/DebugInfo/X86/deleted-bit-piece.ll =================================================================== --- test/DebugInfo/X86/deleted-bit-piece.ll +++ test/DebugInfo/X86/deleted-bit-piece.ll @@ -9,7 +9,7 @@ ; CHECK: __Z3foov: ; CHECK: retq -define void @_Z3foov() !dbg !12 { +define void @_Z3foov() !dbg 0 !12 { entry: br i1 undef, label %exit, label %bb Index: test/DebugInfo/X86/discriminator.ll =================================================================== --- test/DebugInfo/X86/discriminator.ll +++ test/DebugInfo/X86/discriminator.ll @@ -11,7 +11,7 @@ ; Manually generated debug nodes !14 and !15 to incorporate an ; arbitrary discriminator with value 42. -define i32 @foo(i32 %i) #0 !dbg !4 { +define i32 @foo(i32 %i) #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 %i.addr = alloca i32, align 4 Index: test/DebugInfo/X86/discriminator2.ll =================================================================== --- test/DebugInfo/X86/discriminator2.ll +++ test/DebugInfo/X86/discriminator2.ll @@ -20,7 +20,7 @@ ; are both 1. ; Function Attrs: uwtable -define void @_Z3bazv() #0 !dbg !6 { +define void @_Z3bazv() #0 !dbg 0 !6 { %1 = call i32 @_Z3barv(), !dbg !9 %2 = call i32 @_Z3barv(), !dbg !10 call void @_Z3fooii(i32 %1, i32 %2), !dbg !11 Index: test/DebugInfo/X86/discriminator3.ll =================================================================== --- test/DebugInfo/X86/discriminator3.ll +++ test/DebugInfo/X86/discriminator3.ll @@ -12,7 +12,7 @@ ; the taken branch. ; Function Attrs: uwtable -define void @_Z3bazi(i32) #0 !dbg !6 { +define void @_Z3bazi(i32) #0 !dbg 0 !6 { %2 = alloca i32, align 4 store i32 %0, i32* %2, align 4 call void @llvm.dbg.declare(metadata i32* %2, metadata !10, metadata !11), !dbg !12 Index: test/DebugInfo/X86/dw_op_minus.ll =================================================================== --- test/DebugInfo/X86/dw_op_minus.ll +++ test/DebugInfo/X86/dw_op_minus.ll @@ -17,7 +17,7 @@ @__safestack_unsafe_stack_ptr = external thread_local(initialexec) global i8* -define void @f() !dbg !4 { +define void @f() !dbg 0 !4 { entry: %unsafe_stack_ptr = load i8*, i8** @__safestack_unsafe_stack_ptr %unsafe_stack_static_top = getelementptr i8, i8* %unsafe_stack_ptr, i32 -400 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 @@ -23,24 +23,24 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -@global = global i32 2, align 4 +@global = global i32 2, align 4, !dbg 0 !18 ; Function Attrs: nounwind readnone uwtable -define i32 @_Z3fooi(i32 %bar) #0 !dbg !4 { +define i32 @_Z3fooi(i32 %bar) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %bar, i64 0, metadata !10, metadata !DIExpression()), !dbg !20 ret i32 %bar, !dbg !20 } ; Function Attrs: nounwind readnone uwtable -define i32 @_Z4foo2i(i32 %bar2) #0 !dbg !11 { +define i32 @_Z4foo2i(i32 %bar2) #0 !dbg 0 !11 { entry: tail call void @llvm.dbg.value(metadata i32 %bar2, i64 0, metadata !13, metadata !DIExpression()), !dbg !21 ret i32 %bar2, !dbg !21 } ; Function Attrs: nounwind readonly uwtable -define i32 @main() #1 !dbg !14 { +define i32 @main() #1 !dbg 0 !14 { entry: %call = tail call i32 @_Z3fooi(i32 2), !dbg !22 %call1 = tail call i32 @_Z4foo2i(i32 1), !dbg !22 @@ -77,7 +77,7 @@ !15 = !DISubroutineType(types: !16) !16 = !{!8} !17 = !{!18} -!18 = !DIGlobalVariable(name: "global", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @global) +!18 = !DIGlobalVariable(name: "global", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) !19 = !{i32 2, !"Dwarf Version", i32 4} !20 = !DILocation(line: 2, scope: !4) !21 = !DILocation(line: 3, scope: !11) Index: test/DebugInfo/X86/dwarf-aranges.ll =================================================================== --- test/DebugInfo/X86/dwarf-aranges.ll +++ test/DebugInfo/X86/dwarf-aranges.ll @@ -44,11 +44,11 @@ target triple = "x86_64-unknown-linux-gnu" -@some_data = global i32 4, align 4 -@some_other = global i32 5, section "strange+section", align 4 -@some_bss = common global i32 0, align 4 +@some_data = global i32 4, align 4, !dbg 0 !9 +@some_other = global i32 5, section "strange+section", align 4, !dbg 0 !11 +@some_bss = common global i32 0, align 4, !dbg 0 !12 -define void @some_code() !dbg !4 { +define void @some_code() !dbg 0 !4 { entry: %0 = load i32, i32* @some_data, align 4, !dbg !14 %1 = load i32, i32* @some_other, align 4, !dbg !14 @@ -70,10 +70,10 @@ !6 = !DISubroutineType(types: !7) !7 = !{null} !8 = !{!9, !11, !12} -!9 = !DIGlobalVariable(name: "some_data", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10, variable: i32* @some_data) +!9 = !DIGlobalVariable(name: "some_data", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10) !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!11 = !DIGlobalVariable(name: "some_other", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10, variable: i32* @some_other) -!12 = !DIGlobalVariable(name: "some_bss", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10, variable: i32* @some_bss) +!11 = !DIGlobalVariable(name: "some_other", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10) +!12 = !DIGlobalVariable(name: "some_bss", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10) !13 = !{i32 2, !"Dwarf Version", i32 4} !14 = !DILocation(line: 7, scope: !4) !15 = !DILocation(line: 8, scope: !4) Index: test/DebugInfo/X86/dwarf-linkage-names.ll =================================================================== --- test/DebugInfo/X86/dwarf-linkage-names.ll +++ test/DebugInfo/X86/dwarf-linkage-names.ll @@ -38,10 +38,10 @@ ; NOLINKAGE-NOT: .asciz "_ZN4test10global_varE" ; NOLINKAGE-NOT: .asciz "_ZN4test3barEv" -@_ZN4test10global_varE = global i32 0, align 4 +@_ZN4test10global_varE = global i32 0, align 4, !dbg 0 !10 ; Function Attrs: nounwind uwtable -define i32 @_ZN4test3barEv() #0 !dbg !4 { +define i32 @_ZN4test3barEv() #0 !dbg 0 !4 { entry: %0 = load i32, i32* @_ZN4test10global_varE, align 4, !dbg !14 ret i32 %0, !dbg !15 @@ -62,7 +62,7 @@ !7 = !{!8} !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !9 = !{!10} -!10 = !DIGlobalVariable(name: "global_var", linkageName: "_ZN4test10global_varE", scope: !5, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, variable: i32* @_ZN4test10global_varE) +!10 = !DIGlobalVariable(name: "global_var", linkageName: "_ZN4test10global_varE", scope: !5, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true) !11 = !{i32 2, !"Dwarf Version", i32 4} !12 = !{i32 2, !"Debug Info Version", i32 3} !13 = !{!"clang version 3.8.0 (trunk 244662)"} Index: test/DebugInfo/X86/dwarf-public-names.ll =================================================================== --- test/DebugInfo/X86/dwarf-public-names.ll +++ test/DebugInfo/X86/dwarf-public-names.ll @@ -57,11 +57,11 @@ %struct.C = type { i8 } -@_ZN1C22static_member_variableE = global i32 0, align 4 -@global_variable = global %struct.C zeroinitializer, align 1 -@_ZN2ns25global_namespace_variableE = global i32 1, align 4 +@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg 0 !25 +@global_variable = global %struct.C zeroinitializer, align 1, !dbg 0 !26 +@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg 0 !27 -define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg !3 { +define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg 0 !3 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 @@ -73,18 +73,18 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg !18 { +define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg 0 !18 { entry: %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !33 ret i32 %0, !dbg !33 } -define i32 @_Z15global_functionv() nounwind uwtable !dbg !19 { +define i32 @_Z15global_functionv() nounwind uwtable !dbg 0 !19 { entry: ret i32 -1, !dbg !34 } -define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg !20 { +define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg 0 !20 { entry: call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !35 ret void, !dbg !36 @@ -120,9 +120,9 @@ !22 = !DISubroutineType(types: !23) !23 = !{null} !24 = !{!25, !26, !27} -!25 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, variable: i32* @_ZN1C22static_member_variableE, declaration: !10) -!26 = !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8, variable: %struct.C* @global_variable) -!27 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11, variable: i32* @_ZN2ns25global_namespace_variableE) +!25 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, declaration: !10) +!26 = !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8) +!27 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11) !28 = !DILocalVariable(name: "this", line: 9, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !3, file: !4, type: !29) !29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) !30 = !DILocation(line: 9, scope: !3) Index: test/DebugInfo/X86/dwarf-pubnames-split.ll =================================================================== --- test/DebugInfo/X86/dwarf-pubnames-split.ll +++ test/DebugInfo/X86/dwarf-pubnames-split.ll @@ -12,7 +12,7 @@ ; CHECK-NEXT: .long .Lcu_begin0 # Offset of Compilation Unit Info ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/X86/earlydup-crash.ll =================================================================== --- test/DebugInfo/X86/earlydup-crash.ll +++ test/DebugInfo/X86/earlydup-crash.ll @@ -6,7 +6,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define internal i8* @framework_construct_pathname(i8* %fname, %struct.cpp_dir* %dir) nounwind ssp !dbg !2 { +define internal i8* @framework_construct_pathname(i8* %fname, %struct.cpp_dir* %dir) nounwind ssp !dbg 0 !2 { entry: br i1 undef, label %bb33, label %bb Index: test/DebugInfo/X86/elf-names.ll =================================================================== --- test/DebugInfo/X86/elf-names.ll +++ test/DebugInfo/X86/elf-names.ll @@ -20,7 +20,7 @@ @_ZN1DC1Ev = alias void (%class.D*), void (%class.D*)* @_ZN1DC2Ev @_ZN1DC1ERKS_ = alias void (%class.D*, %class.D*), void (%class.D*, %class.D*)* @_ZN1DC2ERKS_ -define void @_ZN1DC2Ev(%class.D* nocapture %this) unnamed_addr nounwind uwtable align 2 !dbg !5 { +define void @_ZN1DC2Ev(%class.D* nocapture %this) unnamed_addr nounwind uwtable align 2 !dbg 0 !5 { entry: tail call void @llvm.dbg.value(metadata %class.D* %this, i64 0, metadata !29, metadata !DIExpression()), !dbg !36 %c1 = getelementptr inbounds %class.D, %class.D* %this, i64 0, i32 0, !dbg !37 @@ -34,7 +34,7 @@ ret void, !dbg !45 } -define void @_ZN1DC2ERKS_(%class.D* nocapture %this, %class.D* nocapture %d) unnamed_addr nounwind uwtable align 2 !dbg !31 { +define void @_ZN1DC2ERKS_(%class.D* nocapture %this, %class.D* nocapture %d) unnamed_addr nounwind uwtable align 2 !dbg 0 !31 { entry: tail call void @llvm.dbg.value(metadata %class.D* %this, i64 0, metadata !34, metadata !DIExpression()), !dbg !46 tail call void @llvm.dbg.value(metadata %class.D* %d, i64 0, metadata !35, metadata !DIExpression()), !dbg !46 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 @@ -5,7 +5,7 @@ %struct.foo = type { i32, [1 x i32] } %struct.bar = type { i32, [0 x i32] } -define i32 @func() nounwind uwtable ssp !dbg !5 { +define i32 @func() nounwind uwtable ssp !dbg 0 !5 { entry: %my_foo = alloca %struct.foo, align 4 %my_bar = alloca %struct.bar, align 4 Index: test/DebugInfo/X86/empty-array.ll =================================================================== --- test/DebugInfo/X86/empty-array.ll +++ test/DebugInfo/X86/empty-array.ll @@ -4,7 +4,7 @@ %class.A = type { [0 x i32] } -@a = global %class.A zeroinitializer, align 4 +@a = global %class.A zeroinitializer, align 4, !dbg 0 !5 ; CHECK: DW_TAG_class_type ; CHECK: DW_TAG_member @@ -30,7 +30,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm") !7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, align: 32, file: !20, elements: !8) !8 = !{!9, !14} Index: test/DebugInfo/X86/ending-run.ll =================================================================== --- test/DebugInfo/X86/ending-run.ll +++ test/DebugInfo/X86/ending-run.ll @@ -8,7 +8,7 @@ ; CHECK: 0x0000000000000000 7 0 1 0 ; CHECK: 0x0000000000000004 8 18 1 0 0 is_stmt prologue_end -define i32 @callee(i32 %x) nounwind uwtable ssp !dbg !5 { +define i32 @callee(i32 %x) nounwind uwtable ssp !dbg 0 !5 { entry: %x.addr = alloca i32, align 4 %y = alloca i32, align 4 Index: test/DebugInfo/X86/enum-class.ll =================================================================== --- test/DebugInfo/X86/enum-class.ll +++ test/DebugInfo/X86/enum-class.ll @@ -1,9 +1,9 @@ ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s -@a = global i32 0, align 4 -@b = global i64 0, align 8 -@c = global i32 0, align 4 +@a = global i32 0, align 4, !dbg 0 !19 +@b = global i64 0, align 8, !dbg 0 !20 +@c = global i32 0, align 4, !dbg 0 !21 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!23} @@ -24,9 +24,9 @@ !14 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ] !15 = !{} !17 = !{!19, !20, !21} -!19 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !4, type: !3, variable: i32* @a) -!20 = !DIGlobalVariable(name: "b", line: 5, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8, variable: i64* @b) -!21 = !DIGlobalVariable(name: "c", line: 6, isLocal: false, isDefinition: true, scope: null, file: !4, type: !12, variable: i32* @c) +!19 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !4, type: !3) +!20 = !DIGlobalVariable(name: "b", line: 5, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8) +!21 = !DIGlobalVariable(name: "c", line: 6, isLocal: false, isDefinition: true, scope: null, file: !4, type: !12) !22 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp") ; CHECK: DW_TAG_enumeration_type [{{.*}}] Index: test/DebugInfo/X86/enum-fwd-decl.ll =================================================================== --- test/DebugInfo/X86/enum-fwd-decl.ll +++ test/DebugInfo/X86/enum-fwd-decl.ll @@ -1,7 +1,7 @@ ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s -@e = global i16 0, align 2 +@e = global i16 0, align 2, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} @@ -9,7 +9,7 @@ !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) +!5 = !DIGlobalVariable(name: "e", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "foo.cpp", directory: "/tmp") !7 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", line: 1, size: 16, align: 16, flags: DIFlagFwdDecl, file: !8) !8 = !DIFile(filename: "foo.cpp", directory: "/tmp") Index: test/DebugInfo/X86/externaltyperef.ll =================================================================== --- test/DebugInfo/X86/externaltyperef.ll +++ test/DebugInfo/X86/externaltyperef.ll @@ -26,7 +26,7 @@ %class.A = type opaque -@a = global %class.A* null, align 8 +@a = global %class.A* null, align 8, !dbg 0 !6 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13, !14, !15} @@ -38,7 +38,7 @@ !3 = !{!4, !9} !4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1A") !5 = !{!6} -!6 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: %class.A** @a) +!6 = !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) !8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1B") !9 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTSN1N1BE") Index: test/DebugInfo/X86/fission-cu.ll =================================================================== --- test/DebugInfo/X86/fission-cu.ll +++ test/DebugInfo/X86/fission-cu.ll @@ -3,7 +3,7 @@ ; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=OBJ %s ; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s -@a = common global i32 0, align 4 +@a = common global i32 0, align 4, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} @@ -11,7 +11,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "baz.c", directory: "/usr/local/google/home/echristo/tmp") !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DIFile(filename: "baz.c", directory: "/usr/local/google/home/echristo/tmp") Index: test/DebugInfo/X86/fission-inline.ll =================================================================== --- test/DebugInfo/X86/fission-inline.ll +++ test/DebugInfo/X86/fission-inline.ll @@ -75,7 +75,7 @@ ; RELOCS-NOT: RELOCATION RECORDS FOR [.rela.debug_ranges] ; Function Attrs: uwtable -define void @_ZN3foo2f3Ez(...) #0 align 2 !dbg !10 { +define void @_ZN3foo2f3Ez(...) #0 align 2 !dbg 0 !10 { entry: call void @_Z2f1v(), !dbg !26 call void @_Z2f1v(), !dbg !25 Index: test/DebugInfo/X86/fission-ranges.ll =================================================================== --- test/DebugInfo/X86/fission-ranges.ll +++ test/DebugInfo/X86/fission-ranges.ll @@ -82,14 +82,14 @@ @c = external global i32 ; Function Attrs: nounwind uwtable -define void @bar() #0 !dbg !4 { +define void @bar() #0 !dbg 0 !4 { entry: tail call fastcc void @foo(), !dbg !27 ret void, !dbg !28 } ; Function Attrs: nounwind uwtable -define internal fastcc void @foo() #0 !dbg !8 { +define internal fastcc void @foo() #0 !dbg 0 !8 { entry: tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !13, metadata !DIExpression()), !dbg !30 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !14, metadata !DIExpression()), !dbg !31 Index: test/DebugInfo/X86/float_const.ll =================================================================== --- test/DebugInfo/X86/float_const.ll +++ test/DebugInfo/X86/float_const.ll @@ -8,7 +8,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind optsize readnone uwtable -define void @foo() #0 !dbg !7 { +define void @foo() #0 !dbg 0 !7 { entry: tail call void @llvm.dbg.declare(metadata float* undef, metadata !13, metadata !19), !dbg !20 tail call void @llvm.dbg.value(metadata i32 1078523331, i64 0, metadata !13, metadata !19), !dbg !20 Index: test/DebugInfo/X86/float_const_loclist.ll =================================================================== --- test/DebugInfo/X86/float_const_loclist.ll +++ test/DebugInfo/X86/float_const_loclist.ll @@ -40,7 +40,7 @@ target triple = "x86_64-apple-macosx10.11.0" ; Function Attrs: nounwind ssp uwtable -define void @foo() #0 !dbg !4 { +define void @foo() #0 !dbg 0 !4 { entry: tail call void (...) @barrier() #3, !dbg !16 tail call void @llvm.dbg.value(metadata float 0x40091EB860000000, i64 0, metadata !8, metadata !17), !dbg !18 Index: test/DebugInfo/X86/formal_parameter.ll =================================================================== --- test/DebugInfo/X86/formal_parameter.ll +++ test/DebugInfo/X86/formal_parameter.ll @@ -24,7 +24,7 @@ ; CHECK-NOT: DW_AT_name {{.*}}map ; Function Attrs: nounwind ssp uwtable -define void @foo(i32 %map) #0 !dbg !4 { +define void @foo(i32 %map) #0 !dbg 0 !4 { entry: %map.addr = alloca i32, align 4 store i32 %map, i32* %map.addr, align 4, !tbaa !15 Index: test/DebugInfo/X86/frame-register.ll =================================================================== --- test/DebugInfo/X86/frame-register.ll +++ test/DebugInfo/X86/frame-register.ll @@ -14,7 +14,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !9 { +define i32 @main() #0 !dbg 0 !9 { entry: %retval = alloca i32, align 4 %i = alloca i32, align 4 Index: test/DebugInfo/X86/generate-odr-hash.ll =================================================================== --- test/DebugInfo/X86/generate-odr-hash.ll +++ test/DebugInfo/X86/generate-odr-hash.ll @@ -173,14 +173,14 @@ %struct.anon = type { i32, i32 } %struct.baz = type { i8 } -@b = global %struct.bar zeroinitializer, align 1 -@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4 -@w = internal global %"struct.::walrus" zeroinitializer, align 1 -@wom = global %struct.wombat zeroinitializer, align 4 +@b = global %struct.bar zeroinitializer, align 1, !dbg 0 !39 +@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4, !dbg 0 !40 +@w = internal global %"struct.::walrus" zeroinitializer, align 1, !dbg 0 !41 +@wom = global %struct.wombat zeroinitializer, align 4, !dbg 0 !42 @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }] ; Function Attrs: nounwind uwtable -define void @_Z3foov() #0 !dbg !22 { +define void @_Z3foov() #0 !dbg 0 !22 { entry: %b = alloca %struct.baz, align 1 call void @llvm.dbg.declare(metadata %struct.baz* %b, metadata !46, metadata !DIExpression()), !dbg !48 @@ -190,14 +190,14 @@ ; Function Attrs: nounwind readnone declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define internal void @__cxx_global_var_init() section ".text.startup" !dbg !26 { +define internal void @__cxx_global_var_init() section ".text.startup" !dbg 0 !26 { entry: call void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.::walrus"* @w), !dbg !50 ret void, !dbg !50 } ; Function Attrs: nounwind uwtable -define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.::walrus"* %this) unnamed_addr #0 align 2 !dbg !27 { +define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.::walrus"* %this) unnamed_addr #0 align 2 !dbg 0 !27 { entry: %this.addr = alloca %"struct.::walrus"*, align 8 store %"struct.::walrus"* %this, %"struct.::walrus"** %this.addr, align 8 @@ -206,7 +206,7 @@ ret void, !dbg !54 } -define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !36 { +define internal void @_GLOBAL__I_a() section ".text.startup" !dbg 0 !36 { entry: call void @__cxx_global_var_init(), !dbg !55 ret void, !dbg !55 @@ -256,10 +256,10 @@ !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) -!40 = !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", line: 18, isLocal: false, isDefinition: true, scope: !7, file: !23, type: !6, variable: %"class.echidna::capybara::mongoose::fluffy"* @_ZN7echidna8capybara8mongoose6animalE) -!41 = !DIGlobalVariable(name: "w", line: 29, isLocal: true, isDefinition: true, scope: null, file: !23, type: !28, variable: %"struct.::walrus"* @w) -!42 = !DIGlobalVariable(name: "wom", line: 38, isLocal: false, isDefinition: true, scope: null, file: !23, type: !14, variable: %struct.wombat* @wom) +!39 = !DIGlobalVariable(name: "b", line: 3, isLocal: false, isDefinition: true, scope: null, file: !23, type: !4) +!40 = !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", line: 18, isLocal: false, isDefinition: true, scope: !7, file: !23, type: !6) +!41 = !DIGlobalVariable(name: "w", line: 29, isLocal: true, isDefinition: true, scope: null, file: !23, type: !28) +!42 = !DIGlobalVariable(name: "wom", line: 38, isLocal: false, isDefinition: true, scope: null, file: !23, type: !14) !43 = !{i32 2, !"Dwarf Version", i32 4} !44 = !{i32 1, !"Debug Info Version", i32 3} !45 = !{!"clang version 3.5 "} Index: test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll =================================================================== --- test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll +++ test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll @@ -29,7 +29,7 @@ ; when run with r221709 reverted, then it really doesn't test anything anymore. ; Function Attrs: nounwind ssp uwtable -define i32 @foo(i32 %a) #0 !dbg !8 { +define i32 @foo(i32 %a) #0 !dbg 0 !8 { entry: call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !16, metadata !17), !dbg !18 %conv = trunc i32 %a to i16, !dbg !19 Index: test/DebugInfo/X86/gnu-public-names.ll =================================================================== --- test/DebugInfo/X86/gnu-public-names.ll +++ test/DebugInfo/X86/gnu-public-names.ll @@ -230,17 +230,17 @@ %struct.C = type { i8 } %"struct.ns::D" = type { i32 } -@_ZN1C22static_member_variableE = global i32 0, align 4 -@global_variable = global %struct.C zeroinitializer, align 1 -@_ZN2ns25global_namespace_variableE = global i32 1, align 4 -@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4 -@_ZZ2f3vE1z = internal global i32 0, align 4 -@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4 -@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4 -@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4 +@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg 0 !32 +@global_variable = global %struct.C zeroinitializer, align 1, !dbg 0 !33 +@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg 0 !34 +@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4, !dbg 0 !35 +@_ZZ2f3vE1z = internal global i32 0, align 4, !dbg 0 !36 +@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4, !dbg 0 !37 +@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4, !dbg 0 !39 +@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4, !dbg 0 !41 ; Function Attrs: nounwind uwtable -define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !20 { +define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg 0 !20 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 @@ -254,33 +254,33 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !21 { +define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg 0 !21 { entry: %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !57 ret i32 %0, !dbg !57 } ; Function Attrs: nounwind uwtable -define i32 @_Z15global_functionv() #0 !dbg !22 { +define i32 @_Z15global_functionv() #0 !dbg 0 !22 { entry: ret i32 -1, !dbg !58 } ; Function Attrs: nounwind uwtable -define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !23 { +define void @_ZN2ns25global_namespace_functionEv() #0 !dbg 0 !23 { entry: call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !59 ret void, !dbg !60 } ; Function Attrs: nounwind uwtable -define i32* @_Z2f3v() #0 !dbg !26 { +define i32* @_Z2f3v() #0 !dbg 0 !26 { entry: ret i32* @_ZZ2f3vE1z, !dbg !61 } ; Function Attrs: nounwind uwtable -define i32 @_Z2f7v() #0 !dbg !30 { +define i32 @_Z2f7v() #0 !dbg 0 !30 { entry: %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !62 %call = call i32* @_Z2f3v(), !dbg !62 @@ -331,16 +331,16 @@ !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, 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: !4, isLocal: false, isDefinition: true, variable: %struct.C* @global_variable) -!34 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN2ns25global_namespace_variableE) -!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE) -!36 = !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZZ2f3vE1z) -!37 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_11iE) +!32 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, declaration: !6) +!33 = !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !4, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true) +!35 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true) +!36 = !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true) +!37 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true) !38 = !DINamespace(scope: null, file: !1, line: 36) -!39 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_15inner1bE) +!39 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true) !40 = !DINamespace(name: "inner", scope: !38, file: !1, line: 46) -!41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN5outer12_GLOBAL__N_11cE) +!41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true) !42 = !DINamespace(scope: !43, file: !1, line: 52) !43 = !DINamespace(name: "outer", scope: null, file: !1, line: 51) !44 = !{!45, !47} Index: test/DebugInfo/X86/header.ll =================================================================== --- test/DebugInfo/X86/header.ll +++ test/DebugInfo/X86/header.ll @@ -11,7 +11,7 @@ ; CHECK: .section .debug_str -define void @f() !dbg !4 { +define void @f() !dbg 0 !4 { ret void, !dbg !9 } !llvm.dbg.cu = !{!0} Index: test/DebugInfo/X86/inline-asm-locs.ll =================================================================== --- test/DebugInfo/X86/inline-asm-locs.ll +++ test/DebugInfo/X86/inline-asm-locs.ll @@ -38,7 +38,7 @@ module asm "\09ret" ; Function Attrs: nounwind ssp uwtable -define void @foo() !dbg !4 { +define void @foo() !dbg 0 !4 { entry: call void (...) @bar(), !dbg !11 ret void, !dbg !12 Index: test/DebugInfo/X86/inline-member-function.ll =================================================================== --- test/DebugInfo/X86/inline-member-function.ll +++ test/DebugInfo/X86/inline-member-function.ll @@ -34,10 +34,10 @@ %struct.foo = type { i8 } -@i = global i32 0, align 4 +@i = global i32 0, align 4, !dbg 0 !19 ; Function Attrs: uwtable -define i32 @main() #0 !dbg !13 { +define i32 @main() #0 !dbg 0 !13 { entry: %this.addr.i = alloca %struct.foo*, align 8 %x.addr.i = alloca i32, align 4 @@ -82,7 +82,7 @@ !16 = !{!9} !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: !4, 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) +!19 = !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: null, file: !14, type: !9) !20 = !{i32 2, !"Dwarf Version", i32 4} !21 = !{i32 1, !"Debug Info Version", i32 3} !22 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/X86/inline-seldag-test.ll =================================================================== --- test/DebugInfo/X86/inline-seldag-test.ll +++ test/DebugInfo/X86/inline-seldag-test.ll @@ -23,7 +23,7 @@ ; ASM: testl ; Function Attrs: nounwind uwtable -define void @func() #0 !dbg !4 { +define void @func() #0 !dbg 0 !4 { entry: %y.addr.i = alloca i32, align 4 %x = alloca i32, align 4 Index: test/DebugInfo/X86/inlined-formal-parameter.ll =================================================================== --- test/DebugInfo/X86/inlined-formal-parameter.ll +++ test/DebugInfo/X86/inlined-formal-parameter.ll @@ -25,7 +25,7 @@ target triple = "x86_64-apple-darwin" ; Function Attrs: nounwind ssp uwtable -define void @foo() #0 !dbg !4 { +define void @foo() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !12, metadata !17) #3, !dbg !18 tail call void @sink() #3, !dbg !20 Index: test/DebugInfo/X86/inlined-indirect-value.ll =================================================================== --- test/DebugInfo/X86/inlined-indirect-value.ll +++ test/DebugInfo/X86/inlined-indirect-value.ll @@ -19,10 +19,10 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -@x = common global i32 0, align 4 -@y = common global i32 0, align 4 +@x = common global i32 0, align 4, !dbg 0 !10 +@y = common global i32 0, align 4, !dbg 0 !12 -define i32 @main() !dbg !4 { +define i32 @main() !dbg 0 !4 { ; CHECK: .loc 1 {{[89]}} ; CHECK-NOT: .loc ; CHECK: movl $1 @@ -58,9 +58,9 @@ !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, 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) +!10 = !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !11, isLocal: false, isDefinition: true) !11 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7) -!12 = !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: i32* @y) +!12 = !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !13 = !{i32 2, !"Dwarf Version", i32 4} !14 = !{i32 2, !"Debug Info Version", i32 3} !16 = !DILocation(line: 4, column: 9, scope: !17, inlinedAt: !18) Index: test/DebugInfo/X86/instcombine-instrinsics.ll =================================================================== --- test/DebugInfo/X86/instcombine-instrinsics.ll +++ test/DebugInfo/X86/instcombine-instrinsics.ll @@ -28,7 +28,7 @@ %struct.i14 = type { i64 } ; Function Attrs: nounwind ssp uwtable -define void @init() #0 !dbg !4 { +define void @init() #0 !dbg 0 !4 { %p = alloca %struct.i14*, align 8 call void @llvm.dbg.declare(metadata %struct.i14** %p, metadata !11, metadata !DIExpression()), !dbg !18 store %struct.i14* null, %struct.i14** %p, align 8, !dbg !18 Index: test/DebugInfo/X86/isel-cse-line.ll =================================================================== --- test/DebugInfo/X86/isel-cse-line.ll +++ test/DebugInfo/X86/isel-cse-line.ll @@ -31,11 +31,11 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -@glb_start = global i64 17, align 8 -@glb_end = global i64 42, align 8 +@glb_start = global i64 17, align 8, !dbg 0 !7 +@glb_end = global i64 42, align 8, !dbg 0 !10 ; Function Attrs: norecurse nounwind uwtable -define i32 @main() !dbg !14 { +define i32 @main() !dbg 0 !14 { %1 = alloca i32, align 4 %2 = alloca i64, align 8 %3 = alloca i64, align 8 @@ -73,10 +73,10 @@ !4 = !DIDerivedType(tag: DW_TAG_typedef, name: "fp_t", file: !1, line: 1, baseType: !5) !5 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) !6 = !{!7, !10} -!7 = distinct !DIGlobalVariable(name: "glb_start", scope: !0, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true, variable: i64* @glb_start) +!7 = distinct !DIGlobalVariable(name: "glb_start", scope: !0, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true) !8 = !DIDerivedType(tag: DW_TAG_typedef, name: "int_t", file: !1, line: 2, baseType: !9) !9 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) -!10 = distinct !DIGlobalVariable(name: "glb_end", scope: !0, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true, variable: i64* @glb_end) +!10 = distinct !DIGlobalVariable(name: "glb_end", scope: !0, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true) !11 = !{i32 2, !"Dwarf Version", i32 4} !12 = !{i32 2, !"Debug Info Version", i32 3} !13 = !{!"clang version 3.9.0 (trunk 268246)"} Index: test/DebugInfo/X86/lexical-block-file-inline.ll =================================================================== --- test/DebugInfo/X86/lexical-block-file-inline.ll +++ test/DebugInfo/X86/lexical-block-file-inline.ll @@ -65,7 +65,7 @@ ; Function Attrs: alwaysinline nounwind -define i32 @_Z3barv() #0 !dbg !4 { +define i32 @_Z3barv() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 %y = alloca i32, align 4 @@ -94,7 +94,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind -define i32 @_Z3foov() #2 !dbg !8 { +define i32 @_Z3foov() #2 !dbg 0 !8 { entry: %retval.i = alloca i32, align 4 %y.i = alloca i32, align 4 Index: test/DebugInfo/X86/lexical_block.ll =================================================================== --- test/DebugInfo/X86/lexical_block.ll +++ test/DebugInfo/X86/lexical_block.ll @@ -22,7 +22,7 @@ ; } ; Function Attrs: nounwind uwtable -define void @_Z1bv() #0 !dbg !4 { +define void @_Z1bv() #0 !dbg 0 !4 { entry: %i = alloca i32, align 4 call void @llvm.dbg.declare(metadata i32* %i, metadata !11, metadata !DIExpression()), !dbg !14 Index: test/DebugInfo/X86/line-info.ll =================================================================== --- test/DebugInfo/X86/line-info.ll +++ test/DebugInfo/X86/line-info.ll @@ -14,7 +14,7 @@ ; int main() { ; } -define i32 @foo(i32 %x) #0 !dbg !4 { +define i32 @foo(i32 %x) #0 !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 store i32 %x, i32* %x.addr, align 4 @@ -27,7 +27,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define i32 @main() #0 !dbg !10 { +define i32 @main() #0 !dbg 0 !10 { entry: ret i32 0, !dbg !17 } Index: test/DebugInfo/X86/linkage-name.ll =================================================================== --- test/DebugInfo/X86/linkage-name.ll +++ test/DebugInfo/X86/linkage-name.ll @@ -7,9 +7,9 @@ %class.A = type { i8 } -@a = global %class.A zeroinitializer, align 1 +@a = global %class.A zeroinitializer, align 1, !dbg 0 !20 -define i32 @_ZN1A1aEi(%class.A* %this, i32 %b) nounwind uwtable ssp align 2 !dbg !5 { +define i32 @_ZN1A1aEi(%class.A* %this, i32 %b) nounwind uwtable ssp align 2 !dbg 0 !5 { entry: %this.addr = alloca %class.A*, align 8 %b.addr = alloca i32, align 4 @@ -39,7 +39,7 @@ !12 = !{!13} !13 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, file: !6, scope: !11, type: !7) !18 = !{!20} -!20 = !DIGlobalVariable(name: "a", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11, variable: %class.A* @a) +!20 = !DIGlobalVariable(name: "a", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11) !21 = !DILocalVariable(name: "this", line: 5, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !22) !22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11) !23 = !DILocation(line: 5, column: 8, scope: !5) Index: test/DebugInfo/X86/live-debug-values.ll =================================================================== --- test/DebugInfo/X86/live-debug-values.ll +++ test/DebugInfo/X86/live-debug-values.ll @@ -39,11 +39,11 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -@m = common global i32 0, align 4 +@m = common global i32 0, align 4, !dbg 0 !16 @.str = private unnamed_addr constant [13 x i8] c"m(main): %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg !4 { +define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !12, metadata !20), !dbg !21 tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !13, metadata !20), !dbg !22 @@ -119,7 +119,7 @@ !13 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 6, type: !8) !14 = !DILocalVariable(name: "n", scope: !4, file: !1, line: 7, type: !7) !15 = !{!16} -!16 = !DIGlobalVariable(name: "m", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: i32* @m) +!16 = !DIGlobalVariable(name: "m", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !17 = !{i32 2, !"Dwarf Version", i32 4} !18 = !{i32 2, !"Debug Info Version", i32 3} !19 = !{!"clang version 3.8.0 (trunk 253049) "} Index: test/DebugInfo/X86/low-pc-cu.ll =================================================================== --- test/DebugInfo/X86/low-pc-cu.ll +++ test/DebugInfo/X86/low-pc-cu.ll @@ -21,7 +21,7 @@ ; CHECK-V4: DW_AT_high_pc [DW_FORM_data4] ; Function Attrs: nounwind uwtable -define void @z() #0 !dbg !4 { +define void @z() #0 !dbg 0 !4 { entry: ret void, !dbg !11 } Index: test/DebugInfo/X86/memberfnptr.ll =================================================================== --- test/DebugInfo/X86/memberfnptr.ll +++ test/DebugInfo/X86/memberfnptr.ll @@ -16,7 +16,7 @@ %struct.A = type { i8 } -@p = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A3fooEv to i64), i64 0 }, align 8 +@p = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A3fooEv to i64), i64 0 }, align 8, !dbg 0 !11 declare void @_ZN1A3fooEv(%struct.A*) @@ -35,7 +35,7 @@ !8 = !{null, !9} !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4) !10 = !{!11} -!11 = !DIGlobalVariable(name: "p", line: 5, isLocal: false, isDefinition: true, scope: null, file: !12, type: !13, variable: { i64, i64 }* @p) +!11 = !DIGlobalVariable(name: "p", line: 5, isLocal: false, isDefinition: true, scope: null, file: !12, type: !13) !12 = !DIFile(filename: "memberfnptr.cpp", directory: "") !13 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, size: 64, baseType: !7, extraData: !4) !14 = !{i32 2, !"Dwarf Version", i32 2} Index: test/DebugInfo/X86/mi-print.ll =================================================================== --- test/DebugInfo/X86/mi-print.ll +++ test/DebugInfo/X86/mi-print.ll @@ -14,7 +14,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind readnone ssp uwtable -define i32 @bar(i32 %x) #0 !dbg !4 { +define i32 @bar(i32 %x) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !17), !dbg !18 tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !19, metadata !17), !dbg !21 Index: test/DebugInfo/X86/misched-dbg-value.ll =================================================================== --- test/DebugInfo/X86/misched-dbg-value.ll +++ test/DebugInfo/X86/misched-dbg-value.ll @@ -36,17 +36,17 @@ %struct.Record = type { %struct.Record*, i32, i32, i32, [31 x i8] } -@Version = global [4 x i8] c"1.1\00", align 1 -@IntGlob = common global i32 0, align 4 -@BoolGlob = common global i32 0, align 4 -@Char1Glob = common global i8 0, align 1 -@Char2Glob = common global i8 0, align 1 -@Array1Glob = common global [51 x i32] zeroinitializer, align 16 -@Array2Glob = common global [51 x [51 x i32]] zeroinitializer, align 16 -@PtrGlb = common global %struct.Record* null, align 8 -@PtrGlbNext = common global %struct.Record* null, align 8 +@Version = global [4 x i8] c"1.1\00", align 1, !dbg 0 !30 +@IntGlob = common global i32 0, align 4, !dbg 0 !35 +@BoolGlob = common global i32 0, align 4, !dbg 0 !36 +@Char1Glob = common global i8 0, align 1, !dbg 0 !38 +@Char2Glob = common global i8 0, align 1, !dbg 0 !39 +@Array1Glob = common global [51 x i32] zeroinitializer, align 16, !dbg 0 !40 +@Array2Glob = common global [51 x [51 x i32]] zeroinitializer, align 16, !dbg 0 !42 +@PtrGlb = common global %struct.Record* null, align 8, !dbg 0 !46 +@PtrGlbNext = common global %struct.Record* null, align 8, !dbg 0 !63 -define void @Proc8(i32* nocapture %Array1Par, [51 x i32]* nocapture %Array2Par, i32 %IntParI1, i32 %IntParI2) nounwind optsize !dbg !12 { +define void @Proc8(i32* nocapture %Array1Par, [51 x i32]* nocapture %Array2Par, i32 %IntParI1, i32 %IntParI2) nounwind optsize !dbg 0 !12 { entry: tail call void @llvm.dbg.value(metadata i32* %Array1Par, i64 0, metadata !23, metadata !DIExpression()), !dbg !64 tail call void @llvm.dbg.value(metadata [51 x i32]* %Array2Par, i64 0, metadata !24, metadata !DIExpression()), !dbg !65 @@ -132,23 +132,23 @@ !27 = !DILocalVariable(name: "IntLoc", line: 186, scope: !12, file: !3, type: !21) !28 = !DILocalVariable(name: "IntIndex", line: 187, scope: !12, file: !3, type: !21) !29 = !{!30, !35, !36, !38, !39, !40, !42, !46, !63} -!30 = !DIGlobalVariable(name: "Version", line: 111, isLocal: false, isDefinition: true, scope: null, file: !3, type: !31, variable: [4 x i8]* @Version) +!30 = !DIGlobalVariable(name: "Version", line: 111, isLocal: false, isDefinition: true, scope: null, file: !3, type: !31) !31 = !DICompositeType(tag: DW_TAG_array_type, size: 32, align: 8, baseType: !32, elements: !33) !32 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !33 = !{!34} !34 = !DISubrange(count: 4) -!35 = !DIGlobalVariable(name: "IntGlob", line: 171, isLocal: false, isDefinition: true, scope: null, file: !3, type: !16, variable: i32* @IntGlob) -!36 = !DIGlobalVariable(name: "BoolGlob", line: 172, isLocal: false, isDefinition: true, scope: null, file: !3, type: !37, variable: i32* @BoolGlob) +!35 = !DIGlobalVariable(name: "IntGlob", line: 171, isLocal: false, isDefinition: true, scope: null, file: !3, type: !16) +!36 = !DIGlobalVariable(name: "BoolGlob", line: 172, isLocal: false, isDefinition: true, scope: null, file: !3, type: !37) !37 = !DIDerivedType(tag: DW_TAG_typedef, name: "boolean", line: 149, file: !82, baseType: !16) -!38 = !DIGlobalVariable(name: "Char1Glob", line: 173, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32, variable: i8* @Char1Glob) -!39 = !DIGlobalVariable(name: "Char2Glob", line: 174, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32, variable: i8* @Char2Glob) -!40 = !DIGlobalVariable(name: "Array1Glob", line: 175, isLocal: false, isDefinition: true, scope: null, file: !3, type: !41, variable: [51 x i32]* @Array1Glob) +!38 = !DIGlobalVariable(name: "Char1Glob", line: 173, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32) +!39 = !DIGlobalVariable(name: "Char2Glob", line: 174, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32) +!40 = !DIGlobalVariable(name: "Array1Glob", line: 175, isLocal: false, isDefinition: true, scope: null, file: !3, type: !41) !41 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array1Dim", line: 135, file: !82, baseType: !18) -!42 = !DIGlobalVariable(name: "Array2Glob", line: 176, isLocal: false, isDefinition: true, scope: null, file: !3, type: !43, variable: [51 x [51 x i32]]* @Array2Glob) +!42 = !DIGlobalVariable(name: "Array2Glob", line: 176, isLocal: false, isDefinition: true, scope: null, file: !3, type: !43) !43 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array2Dim", line: 136, file: !82, baseType: !44) !44 = !DICompositeType(tag: DW_TAG_array_type, size: 83232, align: 32, baseType: !16, elements: !45) !45 = !{!20, !20} -!46 = !DIGlobalVariable(name: "PtrGlb", line: 177, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47, variable: %struct.Record** @PtrGlb) +!46 = !DIGlobalVariable(name: "PtrGlb", line: 177, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47) !47 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordPtr", line: 148, file: !82, baseType: !48) !48 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !49) !49 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordType", line: 147, file: !82, baseType: !50) @@ -165,7 +165,7 @@ !60 = !DICompositeType(tag: DW_TAG_array_type, size: 248, align: 8, baseType: !32, elements: !61) !61 = !{!62} !62 = !DISubrange(count: 31) -!63 = !DIGlobalVariable(name: "PtrGlbNext", line: 178, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47, variable: %struct.Record** @PtrGlbNext) +!63 = !DIGlobalVariable(name: "PtrGlbNext", line: 178, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47) !64 = !DILocation(line: 181, scope: !12) !65 = !DILocation(line: 182, scope: !12) !66 = !DILocation(line: 183, scope: !12) Index: test/DebugInfo/X86/missing-file-line.ll =================================================================== --- test/DebugInfo/X86/missing-file-line.ll +++ test/DebugInfo/X86/missing-file-line.ll @@ -11,7 +11,7 @@ %struct.S = type { %struct.S* } -define void @f() !dbg !4 { +define void @f() !dbg 0 !4 { %x = alloca %struct.S, align 8 ; CHECK: DW_TAG_typedef ; CHECK-NOT: DW_AT_decl_file Index: test/DebugInfo/X86/mixed-nodebug-cu.ll =================================================================== --- test/DebugInfo/X86/mixed-nodebug-cu.ll +++ test/DebugInfo/X86/mixed-nodebug-cu.ll @@ -14,13 +14,13 @@ target triple = "x86_64-apple-macosx10.11.0" ; Function Attrs: nounwind ssp uwtable -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: ret void, !dbg !15 } ; Function Attrs: nounwind ssp uwtable -define void @g() #0 !dbg !9 { +define void @g() #0 !dbg 0 !9 { entry: ret void, !dbg !16 } Index: test/DebugInfo/X86/multiple-aranges.ll =================================================================== --- test/DebugInfo/X86/multiple-aranges.ll +++ test/DebugInfo/X86/multiple-aranges.ll @@ -38,8 +38,8 @@ ; ModuleID = 'test.bc' target triple = "x86_64-unknown-linux-gnu" -@kittens = global i32 4, align 4 -@rainbows = global i32 5, align 4 +@kittens = global i32 4, align 4, !dbg 0 !4 +@rainbows = global i32 5, align 4, !dbg 0 !10 !llvm.dbg.cu = !{!0, !7} !llvm.module.flags = !{!12, !13} @@ -48,13 +48,13 @@ !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) +!4 = !DIGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6) !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, 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) +!10 = !DIGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6) !11 = !DIFile(filename: "test2.c", directory: "/home/kayamon") !12 = !{i32 2, !"Dwarf Version", i32 4} !13 = !{i32 1, !"Debug Info Version", i32 3} 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 @@ -19,7 +19,7 @@ @_ZSt4cout = external global %"class.std::basic_ostream" @.str = private unnamed_addr constant [6 x i8] c"c is \00", align 1 -define i32 @main() !dbg !960 { +define i32 @main() !dbg 0 !960 { entry: %call1.i = tail call %"class.std::basic_ostream"* @test(%"class.std::basic_ostream"* @_ZSt4cout, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5) ret i32 0 @@ -56,7 +56,7 @@ !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) +!1800 = !DIGlobalVariable(name: "badbit", linkageName: "badbit", line: 331, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !78, constantValue: i32 1, declaration: !77) !1801 = !DIFile(filename: "os_base.h", directory: "/privite/tmp") !1802 = !DIFile(filename: "student2.cpp", directory: "/privite/tmp") !1803 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/nondefault-subrange-array.ll =================================================================== --- test/DebugInfo/X86/nondefault-subrange-array.ll +++ test/DebugInfo/X86/nondefault-subrange-array.ll @@ -3,7 +3,7 @@ %class.A = type { [42 x i32] } -@a = global %class.A zeroinitializer, align 4 +@a = global %class.A zeroinitializer, align 4, !dbg 0 !5 ; Check that we can handle non-default array bounds. In this case, the array ; goes from [-3, 38]. @@ -33,7 +33,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm") !7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, align: 32, file: !20, elements: !8) !8 = !{!9, !14} Index: test/DebugInfo/X86/nophysreg.ll =================================================================== --- test/DebugInfo/X86/nophysreg.ll +++ test/DebugInfo/X86/nophysreg.ll @@ -53,7 +53,7 @@ %struct.A = type { i32*, i32 } ; Function Attrs: alwaysinline ssp uwtable -define void @_Z2f21A(i32* %p5.coerce0, i32 %p5.coerce1) #0 !dbg !11 { +define void @_Z2f21A(i32* %p5.coerce0, i32 %p5.coerce1) #0 !dbg 0 !11 { entry: tail call void @llvm.dbg.value(metadata i32* %p5.coerce0, i64 0, metadata !16, metadata !33), !dbg !34 tail call void @llvm.dbg.value(metadata i32 %p5.coerce1, i64 0, metadata !16, metadata !35), !dbg !34 @@ -68,7 +68,7 @@ declare void @_Z2f1Pii(i32*, i32) #2 ; Function Attrs: ssp uwtable -define void @_Z1fv() #3 !dbg !17 { +define void @_Z1fv() #3 !dbg 0 !17 { entry: %x = alloca i32, align 4 %ref.tmp = alloca i32, align 4 Index: test/DebugInfo/X86/objc-fwd-decl.ll =================================================================== --- test/DebugInfo/X86/objc-fwd-decl.ll +++ test/DebugInfo/X86/objc-fwd-decl.ll @@ -7,7 +7,7 @@ %0 = type opaque -@a = common global %0* null, align 8 +@a = common global %0* null, align 8, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9, !10, !11, !12, !14} @@ -15,7 +15,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "foo.m", directory: "/Users/echristo") !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "FooBarBaz", line: 1, flags: DIFlagFwdDecl, runtimeLang: DW_LANG_ObjC, file: !13) Index: test/DebugInfo/X86/objc-property-void.ll =================================================================== --- test/DebugInfo/X86/objc-property-void.ll +++ test/DebugInfo/X86/objc-property-void.ll @@ -51,7 +51,7 @@ @llvm.used = appending global [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_CLASS_NAME_", i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @"\01L_OBJC_METH_VAR_TYPE_", i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._objc_method] }* @"\01l_OBJC_$_INSTANCE_METHODS_Foo" to i8*), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_PROP_NAME_ATTR_", i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"\01L_OBJC_PROP_NAME_ATTR_1", i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._prop_t] }* @"\01l_OBJC_$_PROP_LIST_Foo" to i8*), i8* bitcast ([1 x i8*]* @"\01L_OBJC_LABEL_CLASS_$" to i8*)], section "llvm.metadata" ; Function Attrs: ssp uwtable -define internal void @"\01-[Foo foo]"(%0* %self, i8* %_cmd) #0 !dbg !10 { +define internal void @"\01-[Foo foo]"(%0* %self, i8* %_cmd) #0 !dbg 0 !10 { entry: %self.addr = alloca %0*, align 8 %_cmd.addr = alloca i8*, align 8 Index: test/DebugInfo/X86/op_deref.ll =================================================================== --- test/DebugInfo/X86/op_deref.ll +++ test/DebugInfo/X86/op_deref.ll @@ -26,7 +26,7 @@ ; RUN: llvm-as %s -o - | llvm-dis - | FileCheck %s --check-prefix=PRETTY-PRINT ; PRETTY-PRINT: DIExpression(DW_OP_deref) -define void @testVLAwithSize(i32 %s) nounwind uwtable ssp !dbg !5 { +define void @testVLAwithSize(i32 %s) nounwind uwtable ssp !dbg 0 !5 { entry: %s.addr = alloca i32, align 4 %saved_stack = alloca i8* Index: test/DebugInfo/X86/parameters.ll =================================================================== --- test/DebugInfo/X86/parameters.ll +++ test/DebugInfo/X86/parameters.ll @@ -44,7 +44,7 @@ %"struct.pr14763::foo" = type { i8 } ; Function Attrs: uwtable -define void @_ZN7pr147634funcENS_3fooE(%"struct.pr14763::foo"* noalias sret %agg.result, %"struct.pr14763::foo"* %f) #0 !dbg !4 { +define void @_ZN7pr147634funcENS_3fooE(%"struct.pr14763::foo"* noalias sret %agg.result, %"struct.pr14763::foo"* %f) #0 !dbg 0 !4 { entry: call void @llvm.dbg.declare(metadata %"struct.pr14763::foo"* %f, metadata !22, metadata !DIExpression(DW_OP_deref)), !dbg !24 call void @_ZN7pr147633fooC1ERKS0_(%"struct.pr14763::foo"* %agg.result, %"struct.pr14763::foo"* %f), !dbg !25 @@ -57,7 +57,7 @@ declare void @_ZN7pr147633fooC1ERKS0_(%"struct.pr14763::foo"*, %"struct.pr14763::foo"*) #2 ; Function Attrs: uwtable -define void @_ZN7pr147635func2EbNS_3fooE(i1 zeroext %b, %"struct.pr14763::foo"* %g) #0 !dbg !17 { +define void @_ZN7pr147635func2EbNS_3fooE(i1 zeroext %b, %"struct.pr14763::foo"* %g) #0 !dbg 0 !17 { entry: %b.addr = alloca i8, align 1 %frombool = zext i1 %b to i8 Index: test/DebugInfo/X86/pieces-1.ll =================================================================== --- test/DebugInfo/X86/pieces-1.ll +++ test/DebugInfo/X86/pieces-1.ll @@ -30,7 +30,7 @@ target triple = "x86_64-apple-macosx10.9.0" ; Function Attrs: nounwind ssp uwtable -define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 !dbg !4 { +define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 !dbg 0 !4 { entry: call void @llvm.dbg.value(metadata i64 %s.coerce0, i64 0, metadata !20, metadata !24), !dbg !21 call void @llvm.dbg.value(metadata i32 %s.coerce1, i64 0, metadata !22, metadata !27), !dbg !21 Index: test/DebugInfo/X86/pieces-2.ll =================================================================== --- test/DebugInfo/X86/pieces-2.ll +++ test/DebugInfo/X86/pieces-2.ll @@ -34,7 +34,7 @@ %struct.Inner = type { i32, i64 } ; Function Attrs: nounwind ssp uwtable -define i32 @foo(%struct.Outer* byval align 8 %outer) #0 !dbg !4 { +define i32 @foo(%struct.Outer* byval align 8 %outer) #0 !dbg 0 !4 { entry: call void @llvm.dbg.declare(metadata %struct.Outer* %outer, metadata !25, metadata !DIExpression()), !dbg !26 %i1.sroa.0.0..sroa_idx = getelementptr inbounds %struct.Outer, %struct.Outer* %outer, i64 0, i32 0, i64 1, i32 0, !dbg !27 Index: test/DebugInfo/X86/pieces-3.ll =================================================================== --- test/DebugInfo/X86/pieces-3.ll +++ test/DebugInfo/X86/pieces-3.ll @@ -43,7 +43,7 @@ target triple = "x86_64-apple-macosx10.9.0" ; Function Attrs: nounwind ssp uwtable -define i32 @foo(i64 %outer.coerce0, i64 %outer.coerce1) #0 !dbg !4 { +define i32 @foo(i64 %outer.coerce0, i64 %outer.coerce1) #0 !dbg 0 !4 { call void @llvm.dbg.value(metadata i64 %outer.coerce0, i64 0, metadata !24, metadata !25), !dbg !26 call void @llvm.dbg.declare(metadata !{null}, metadata !27, metadata !28), !dbg !26 call void @llvm.dbg.value(metadata i64 %outer.coerce1, i64 0, metadata !29, metadata !30), !dbg !26 Index: test/DebugInfo/X86/pointer-type-size.ll =================================================================== --- test/DebugInfo/X86/pointer-type-size.ll +++ test/DebugInfo/X86/pointer-type-size.ll @@ -6,7 +6,7 @@ %struct.crass = type { i8* } -@crass = common global %struct.crass zeroinitializer, align 8 +@crass = common global %struct.crass zeroinitializer, align 8, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!14} @@ -14,7 +14,7 @@ !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) +!5 = !DIGlobalVariable(name: "crass", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "foo.c", directory: "/Users/echristo/tmp") !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "crass", line: 1, size: 64, align: 64, file: !13, elements: !8) !8 = !{!9} Index: test/DebugInfo/X86/pr11300.ll =================================================================== --- test/DebugInfo/X86/pr11300.ll +++ test/DebugInfo/X86/pr11300.ll @@ -14,7 +14,7 @@ %struct.foo = type { i8 } -define void @_Z3zedP3foo(%struct.foo* %x) uwtable !dbg !5 { +define void @_Z3zedP3foo(%struct.foo* %x) uwtable !dbg 0 !5 { entry: %x.addr = alloca %struct.foo*, align 8 store %struct.foo* %x, %struct.foo** %x.addr, align 8 @@ -26,7 +26,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN3foo3barEv(%struct.foo* %this) nounwind uwtable align 2 !dbg !20 { +define linkonce_odr void @_ZN3foo3barEv(%struct.foo* %this) nounwind uwtable align 2 !dbg 0 !20 { entry: %this.addr = alloca %struct.foo*, align 8 store %struct.foo* %this, %struct.foo** %this.addr, align 8 Index: test/DebugInfo/X86/pr12831.ll =================================================================== --- test/DebugInfo/X86/pr12831.ll +++ test/DebugInfo/X86/pr12831.ll @@ -12,7 +12,7 @@ @"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_" = internal alias void (%class.function*), void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_" @"_ZN8functionIFvvEEC1IZN17BPLFunctionWriter9writeExprEvE3$_0EET_" = internal alias void (%class.function*), void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_" -define void @_ZN17BPLFunctionWriter9writeExprEv(%class.BPLFunctionWriter* %this) nounwind uwtable align 2 !dbg !5 { +define void @_ZN17BPLFunctionWriter9writeExprEv(%class.BPLFunctionWriter* %this) nounwind uwtable align 2 !dbg 0 !5 { entry: %this.addr = alloca %class.BPLFunctionWriter*, align 8 %agg.tmp = alloca %class.function, align 1 @@ -174,7 +174,7 @@ !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) +!130 = !DIGlobalVariable(name: "__stored_locally", linkageName: "__stored_locally", line: 2, isLocal: true, isDefinition: true, scope: !114, file: !6, type: !131, constantValue: i1 1) !131 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !132) !132 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean) !133 = !DILocalVariable(name: "this", line: 19, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !134) Index: test/DebugInfo/X86/pr13303.ll =================================================================== --- test/DebugInfo/X86/pr13303.ll +++ test/DebugInfo/X86/pr13303.ll @@ -5,7 +5,7 @@ ; Check that the prologue ends with is_stmt here. ; CHECK: 0x0000000000000000 {{.*}} is_stmt -define i32 @main() nounwind uwtable !dbg !5 { +define i32 @main() nounwind uwtable !dbg 0 !5 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/DebugInfo/X86/pr19307.ll =================================================================== --- test/DebugInfo/X86/pr19307.ll +++ test/DebugInfo/X86/pr19307.ll @@ -35,7 +35,7 @@ @.str = private unnamed_addr constant [7 x i8] c"items=\00", align 1 ; Function Attrs: uwtable -define void @_Z11parse_rangeRyS_Ss(i64* %offset, i64* %limit, %"class.std::basic_string"* %range) #0 !dbg !13 { +define void @_Z11parse_rangeRyS_Ss(i64* %offset, i64* %limit, %"class.std::basic_string"* %range) #0 !dbg 0 !13 { entry: %offset.addr = alloca i64*, align 8 %limit.addr = alloca i64*, align 8 Index: test/DebugInfo/X86/prologue-stack.ll =================================================================== --- test/DebugInfo/X86/prologue-stack.ll +++ test/DebugInfo/X86/prologue-stack.ll @@ -6,7 +6,7 @@ ; return 0; ; } -define i32 @isel_line_test2() nounwind uwtable !dbg !5 { +define i32 @isel_line_test2() nounwind uwtable !dbg 0 !5 { ; The stack adjustment should be part of the prologue. ; CHECK: isel_line_test2: ; CHECK: {{subq|leaq}} {{.*}}, %rsp Index: test/DebugInfo/X86/ref_addr_relocation.ll =================================================================== --- test/DebugInfo/X86/ref_addr_relocation.ll +++ test/DebugInfo/X86/ref_addr_relocation.ll @@ -52,8 +52,8 @@ %struct.foo = type { i8 } -@f = global %struct.foo zeroinitializer, align 1 -@g = global %struct.foo zeroinitializer, align 1 +@f = global %struct.foo zeroinitializer, align 1, !dbg 0 !7 +@g = global %struct.foo zeroinitializer, align 1, !dbg 0 !12 !llvm.dbg.cu = !{!0, !9} !llvm.module.flags = !{!14, !15} @@ -65,12 +65,12 @@ !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !5, elements: !2, identifier: "_ZTS3foo") !5 = !DIFile(filename: "./hdr.h", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr") !6 = !{!7} -!7 = !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !8, type: !4, variable: %struct.foo* @f) +!7 = !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !8, type: !4) !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, 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) +!12 = !DIGlobalVariable(name: "g", line: 2, isLocal: false, isDefinition: true, scope: null, file: !13, type: !4) !13 = !DIFile(filename: "tu2.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr") !14 = !{i32 2, !"Dwarf Version", i32 2} !15 = !{i32 1, !"Debug Info Version", i32 3} Index: test/DebugInfo/X86/reference-argument.ll =================================================================== --- test/DebugInfo/X86/reference-argument.ll +++ test/DebugInfo/X86/reference-argument.ll @@ -28,7 +28,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 declare i32 @main() ; Function Attrs: nounwind ssp uwtable -define linkonce_odr void @_ZN1A3fooE4SVal(%class.A* %this, %class.SVal* %v) nounwind ssp uwtable align 2 !dbg !35 { +define linkonce_odr void @_ZN1A3fooE4SVal(%class.A* %this, %class.SVal* %v) nounwind ssp uwtable align 2 !dbg 0 !35 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 Index: test/DebugInfo/X86/rvalue-ref.ll =================================================================== --- test/DebugInfo/X86/rvalue-ref.ll +++ test/DebugInfo/X86/rvalue-ref.ll @@ -5,7 +5,7 @@ @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -define void @_Z3fooOi(i32* %i) uwtable ssp !dbg !5 { +define void @_Z3fooOi(i32* %i) uwtable ssp !dbg 0 !5 { entry: %i.addr = alloca i32*, align 8 store i32* %i, i32** %i.addr, align 8 Index: test/DebugInfo/X86/safestack-byval.ll =================================================================== --- test/DebugInfo/X86/safestack-byval.ll +++ test/DebugInfo/X86/safestack-byval.ll @@ -22,7 +22,7 @@ @__safestack_unsafe_stack_ptr = external thread_local(initialexec) global i8* ; Function Attrs: norecurse nounwind readonly safestack uwtable -define i32 @_Z1f1Sm(%struct.S* byval nocapture readonly align 8 %zzz, i64 %len) #0 !dbg !12 { +define i32 @_Z1f1Sm(%struct.S* byval nocapture readonly align 8 %zzz, i64 %len) #0 !dbg 0 !12 { entry: %unsafe_stack_ptr = load i8*, i8** @__safestack_unsafe_stack_ptr, !dbg !22 %unsafe_stack_static_top = getelementptr i8, i8* %unsafe_stack_ptr, i32 -400, !dbg !22 Index: test/DebugInfo/X86/single-dbg_value.ll =================================================================== --- test/DebugInfo/X86/single-dbg_value.ll +++ test/DebugInfo/X86/single-dbg_value.ll @@ -25,7 +25,7 @@ target triple = "x86_64-apple-macosx" ; Function Attrs: nounwind ssp uwtable -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: tail call void @h(i32 0) #2, !dbg !14 %call = tail call i32 (...) @g() #2, !dbg !15 Index: test/DebugInfo/X86/sret.ll =================================================================== --- test/DebugInfo/X86/sret.ll +++ test/DebugInfo/X86/sret.ll @@ -18,7 +18,7 @@ @_ZN1AC1ERKS_ = alias void (%class.A*, %class.A*), void (%class.A*, %class.A*)* @_ZN1AC2ERKS_ ; Function Attrs: nounwind uwtable -define void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg !49 { +define void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg 0 !49 { entry: %this.addr = alloca %class.A*, align 8 %i.addr = alloca i32, align 4 @@ -39,7 +39,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define void @_ZN1AC2ERKS_(%class.A* %this, %class.A* %rhs) unnamed_addr #0 align 2 !dbg !50 { +define void @_ZN1AC2ERKS_(%class.A* %this, %class.A* %rhs) unnamed_addr #0 align 2 !dbg 0 !50 { entry: %this.addr = alloca %class.A*, align 8 %rhs.addr = alloca %class.A*, align 8 @@ -59,7 +59,7 @@ } ; Function Attrs: nounwind uwtable -define %class.A* @_ZN1AaSERKS_(%class.A* %this, %class.A* %rhs) #0 align 2 !dbg !51 { +define %class.A* @_ZN1AaSERKS_(%class.A* %this, %class.A* %rhs) #0 align 2 !dbg 0 !51 { entry: %this.addr = alloca %class.A*, align 8 %rhs.addr = alloca %class.A*, align 8 @@ -77,7 +77,7 @@ } ; Function Attrs: nounwind uwtable -define i32 @_ZN1A7get_intEv(%class.A* %this) #0 align 2 !dbg !52 { +define i32 @_ZN1A7get_intEv(%class.A* %this) #0 align 2 !dbg 0 !52 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -89,7 +89,7 @@ } ; Function Attrs: uwtable -define void @_ZN1B9AInstanceEv(%class.A* noalias sret %agg.result, %class.B* %this) #2 align 2 !dbg !53 { +define void @_ZN1B9AInstanceEv(%class.A* noalias sret %agg.result, %class.B* %this) #2 align 2 !dbg 0 !53 { entry: %this.addr = alloca %class.B*, align 8 %nrvo = alloca i1 @@ -114,7 +114,7 @@ } ; Function Attrs: nounwind uwtable -define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr #0 align 2 !dbg !63 { +define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr #0 align 2 !dbg 0 !63 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -124,7 +124,7 @@ } ; Function Attrs: uwtable -define i32 @main(i32 %argc, i8** %argv) #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !54 { +define i32 @main(i32 %argc, i8** %argv) #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !54 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 @@ -189,7 +189,7 @@ } ; Function Attrs: nounwind uwtable -define linkonce_odr void @_ZN1BC2Ev(%class.B* %this) unnamed_addr #0 align 2 !dbg !62 { +define linkonce_odr void @_ZN1BC2Ev(%class.B* %this) unnamed_addr #0 align 2 !dbg 0 !62 { entry: %this.addr = alloca %class.B*, align 8 store %class.B* %this, %class.B** %this.addr, align 8 @@ -212,7 +212,7 @@ declare void @_ZSt9terminatev() ; Function Attrs: uwtable -define linkonce_odr void @_ZN1AD0Ev(%class.A* %this) unnamed_addr #2 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !61 { +define linkonce_odr void @_ZN1AD0Ev(%class.A* %this) unnamed_addr #2 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg 0 !61 { entry: %this.addr = alloca %class.A*, align 8 %exn.slot = alloca i8* Index: test/DebugInfo/X86/sroasplit-1.ll =================================================================== --- test/DebugInfo/X86/sroasplit-1.ll +++ test/DebugInfo/X86/sroasplit-1.ll @@ -36,7 +36,7 @@ %struct.Inner = type { i32, i64 } ; Function Attrs: nounwind ssp uwtable -define i32 @foo(%struct.Outer* byval align 8 %outer) #0 !dbg !4 { +define i32 @foo(%struct.Outer* byval align 8 %outer) #0 !dbg 0 !4 { entry: %i1 = alloca %struct.Inner, align 8 call void @llvm.dbg.declare(metadata %struct.Outer* %outer, metadata !25, metadata !2), !dbg !26 Index: test/DebugInfo/X86/sroasplit-2.ll =================================================================== --- test/DebugInfo/X86/sroasplit-2.ll +++ test/DebugInfo/X86/sroasplit-2.ll @@ -37,7 +37,7 @@ %struct.Inner = type { i32, i32 } ; Function Attrs: nounwind ssp uwtable -define i32 @foo(i64 %outer.coerce0, i64 %outer.coerce1) #0 !dbg !4 { +define i32 @foo(i64 %outer.coerce0, i64 %outer.coerce1) #0 !dbg 0 !4 { %outer = alloca %struct.Outer, align 8 %i1 = alloca %struct.Inner, align 4 %1 = bitcast %struct.Outer* %outer to { i64, i64 }* Index: test/DebugInfo/X86/sroasplit-3.ll =================================================================== --- test/DebugInfo/X86/sroasplit-3.ll +++ test/DebugInfo/X86/sroasplit-3.ll @@ -20,7 +20,7 @@ %struct.S = type { float } ; Function Attrs: nounwind ssp uwtable -define float @foo(float %s.coerce) #0 !dbg !4 { +define float @foo(float %s.coerce) #0 !dbg 0 !4 { entry: %s = alloca %struct.S, align 4 %coerce.dive = getelementptr %struct.S, %struct.S* %s, i32 0, i32 0 Index: test/DebugInfo/X86/sroasplit-4.ll =================================================================== --- test/DebugInfo/X86/sroasplit-4.ll +++ test/DebugInfo/X86/sroasplit-4.ll @@ -45,7 +45,7 @@ @t = external global i64 ; Function Attrs: nounwind -define i32 @_Z4testv() #0 !dbg !17 { +define i32 @_Z4testv() #0 !dbg 0 !17 { entry: %retval = alloca i32, align 4 %y = alloca %struct.p, align 8 Index: test/DebugInfo/X86/sroasplit-5.ll =================================================================== --- test/DebugInfo/X86/sroasplit-5.ll +++ test/DebugInfo/X86/sroasplit-5.ll @@ -27,7 +27,7 @@ %struct.prog_src_register = type { i32, i24 } ; Function Attrs: nounwind -define i64 @src_reg_for_float() #0 !dbg !4 { +define i64 @src_reg_for_float() #0 !dbg 0 !4 { entry: %retval = alloca %struct.prog_src_register, align 4 %a = alloca %struct.prog_src_register, align 4 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 @@ -58,7 +58,7 @@ ; ASM-NOT: Lcu_begin ; ASM: Lset[[LT:[0-9]+]] = Lline_table_start0-Lsection_line ## DW_AT_stmt_list ; ASM-NEXT: .long Lset[[LT]] -define i32 @test(i32 %a) nounwind uwtable ssp !dbg !5 { +define i32 @test(i32 %a) nounwind uwtable ssp !dbg 0 !5 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 @@ -70,7 +70,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @fn(i32 %a) nounwind uwtable ssp !dbg !13 { +define i32 @fn(i32 %a) nounwind uwtable ssp !dbg 0 !13 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 Index: test/DebugInfo/X86/stmt-list.ll =================================================================== --- test/DebugInfo/X86/stmt-list.ll +++ test/DebugInfo/X86/stmt-list.ll @@ -5,7 +5,7 @@ ; CHECK: .section .debug_line,"",@progbits ; CHECK-NEXT: .Lline_table_start0: -define void @f() !dbg !0 { +define void @f() !dbg 0 !0 { entry: ret void } Index: test/DebugInfo/X86/stringpool.ll =================================================================== --- test/DebugInfo/X86/stringpool.ll +++ test/DebugInfo/X86/stringpool.ll @@ -1,7 +1,7 @@ ; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=LINUX ; RUN: llc -mtriple=x86_64-darwin < %s | FileCheck %s --check-prefix=DARWIN -@yyyy = common global i32 0, align 4 +@yyyy = common global i32 0, align 4, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!9} @@ -9,7 +9,7 @@ !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) +!5 = !DIGlobalVariable(name: "yyyy", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "z.c", directory: "/home/nicholas") !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DIFile(filename: "z.c", directory: "/home/nicholas") Index: test/DebugInfo/X86/struct-loc.ll =================================================================== --- test/DebugInfo/X86/struct-loc.ll +++ test/DebugInfo/X86/struct-loc.ll @@ -9,7 +9,7 @@ %struct.foo = type { i32 } -@f = common global %struct.foo zeroinitializer, align 4 +@f = common global %struct.foo zeroinitializer, align 4, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!12} @@ -17,7 +17,7 @@ !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) +!5 = !DIGlobalVariable(name: "f", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "struct_bug.c", directory: "/Users/echristo/tmp") !7 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 32, align: 32, file: !11, elements: !8) !8 = !{!9} Index: test/DebugInfo/X86/subrange-type.ll =================================================================== --- test/DebugInfo/X86/subrange-type.ll +++ test/DebugInfo/X86/subrange-type.ll @@ -7,7 +7,7 @@ ; CHECK: [[SUBTYPE]]: DW_TAG_base_type ; CHECK-NEXT: DW_AT_name -define i32 @main() nounwind uwtable !dbg !5 { +define i32 @main() nounwind uwtable !dbg 0 !5 { entry: %retval = alloca i32, align 4 %i = alloca [2 x i32], align 4 Index: test/DebugInfo/X86/subreg.ll =================================================================== --- test/DebugInfo/X86/subreg.ll +++ test/DebugInfo/X86/subreg.ll @@ -7,7 +7,7 @@ ; CHECK-NEXT: .byte 147 # DW_OP_piece ; CHECK-NEXT: .byte 2 # 2 -define i16 @f(i16 signext %zzz) nounwind !dbg !1 { +define i16 @f(i16 signext %zzz) nounwind !dbg 0 !1 { entry: call void @llvm.dbg.value(metadata i16 %zzz, i64 0, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) %conv = sext i16 %zzz to i32, !dbg !7 Index: test/DebugInfo/X86/subregisters.ll =================================================================== --- test/DebugInfo/X86/subregisters.ll +++ test/DebugInfo/X86/subregisters.ll @@ -43,7 +43,7 @@ @main.myBar = private unnamed_addr constant %struct.bar { i32 3, i32 4 }, align 4 ; Function Attrs: noinline nounwind ssp uwtable -define void @doSomething(%struct.bar* nocapture readonly %b) #0 !dbg !4 { +define void @doSomething(%struct.bar* nocapture readonly %b) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata %struct.bar* %b, i64 0, metadata !15, metadata !DIExpression()), !dbg !25 %a1 = getelementptr inbounds %struct.bar, %struct.bar* %b, i64 0, i32 0, !dbg !26 @@ -60,7 +60,7 @@ declare i32 @printf(i8* nocapture readonly, ...) #2 ; Function Attrs: nounwind ssp uwtable -define i32 @main() #3 !dbg !17 { +define i32 @main() #3 !dbg 0 !17 { entry: %myBar = alloca i64, align 8, !dbg !34 %tmpcast = bitcast i64* %myBar to %struct.bar*, !dbg !34 Index: test/DebugInfo/X86/template.ll =================================================================== --- test/DebugInfo/X86/template.ll +++ test/DebugInfo/X86/template.ll @@ -60,11 +60,11 @@ %"struct.y_impl::nested" = type { i8 } -@glbl = global i32 0, align 4 -@n = global %"struct.y_impl::nested" zeroinitializer, align 1 +@glbl = global i32 0, align 4, !dbg 0 !31 +@n = global %"struct.y_impl::nested" zeroinitializer, align 1, !dbg 0 !32 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_template.cpp, i8* null }] -define internal void @__cxx_global_var_init() section ".text.startup" !dbg !10 { +define internal void @__cxx_global_var_init() section ".text.startup" !dbg 0 !10 { entry: %call = call i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv(), !dbg !36 store i32 %call, i32* @glbl, align 4, !dbg !36 @@ -72,7 +72,7 @@ } ; Function Attrs: nounwind uwtable -define linkonce_odr i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv() #0 !dbg !14 { +define linkonce_odr i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv() #0 !dbg 0 !14 { entry: ret i32 3, !dbg !37 } @@ -119,8 +119,8 @@ !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) -!32 = !DIGlobalVariable(name: "n", line: 4, isLocal: false, isDefinition: true, scope: null, file: !11, type: !8, variable: %"struct.y_impl::nested"* @n) +!31 = !DIGlobalVariable(name: "glbl", line: 3, isLocal: false, isDefinition: true, scope: null, file: !11, type: !7) +!32 = !DIGlobalVariable(name: "n", line: 4, isLocal: false, isDefinition: true, scope: null, file: !11, type: !8) !33 = !{i32 2, !"Dwarf Version", i32 4} !34 = !{i32 2, !"Debug Info Version", i32 3} !35 = !{!"clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)"} Index: test/DebugInfo/X86/tls.ll =================================================================== --- test/DebugInfo/X86/tls.ll +++ test/DebugInfo/X86/tls.ll @@ -96,11 +96,11 @@ ; template int func<&glbl>(); // create a second reference to 'glbl' -@tls = thread_local global i32 0, align 4 -@glbl = global i32 0, align 4 +@tls = thread_local global i32 0, align 4, !dbg 0 !13 +@glbl = global i32 0, align 4, !dbg 0 !14 ; Function Attrs: nounwind uwtable -define weak_odr i32 @_Z4funcIXadL_Z4glblEEEiv() #0 !dbg !4 { +define weak_odr i32 @_Z4funcIXadL_Z4glblEEEiv() #0 !dbg 0 !4 { entry: ret i32 0, !dbg !18 } @@ -123,8 +123,8 @@ !10 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "I", type: !11, value: i32* @glbl) !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) !12 = !{!13, !14} -!13 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @tls) -!14 = !DIGlobalVariable(name: "glbl", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8, variable: i32* @glbl) +!13 = !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) +!14 = !DIGlobalVariable(name: "glbl", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8) !15 = !{i32 2, !"Dwarf Version", i32 4} !16 = !{i32 1, !"Debug Info Version", i32 3} !17 = !{!"clang version 3.5 "} 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 @@ -102,11 +102,11 @@ %struct.S4_1 = type { i8 } %struct.S4_2 = type { i8 } -@i = global i32 0, align 4 -@a = global %struct.S1 zeroinitializer, align 1 -@s2 = global %struct.S2 zeroinitializer, align 1 -@s3 = global %struct.S3 zeroinitializer, align 1 -@s4 = global %struct.S4 zeroinitializer, align 1 +@i = global i32 0, align 4, !dbg 0 !28 +@a = global %struct.S1 zeroinitializer, align 1, !dbg 0 !30 +@s2 = global %struct.S2 zeroinitializer, align 1, !dbg 0 !31 +@s3 = global %struct.S3 zeroinitializer, align 1, !dbg 0 !32 +@s4 = global %struct.S4 zeroinitializer, align 1, !dbg 0 !33 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!34, !35} @@ -140,12 +140,12 @@ !25 = !{!26} !26 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "T", type: !7, value: i32* @i) !27 = !{!28, !30, !31, !32, !33} -!28 = !DIGlobalVariable(name: "i", line: 1, isLocal: false, isDefinition: true, scope: null, file: !29, type: !8, variable: i32* @i) +!28 = !DIGlobalVariable(name: "i", line: 1, isLocal: false, isDefinition: true, scope: null, file: !29, type: !8) !29 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo") -!30 = !DIGlobalVariable(name: "a", line: 6, isLocal: false, isDefinition: true, scope: null, file: !29, type: !4, variable: %struct.S1* @a) -!31 = !DIGlobalVariable(name: "s2", line: 15, isLocal: false, isDefinition: true, scope: null, file: !29, type: !9, variable: %struct.S2* @s2) -!32 = !DIGlobalVariable(name: "s3", line: 27, isLocal: false, isDefinition: true, scope: null, file: !29, type: !13, variable: %struct.S3* @s3) -!33 = !DIGlobalVariable(name: "s4", line: 39, isLocal: false, isDefinition: true, scope: null, file: !29, type: !19, variable: %struct.S4* @s4) +!30 = !DIGlobalVariable(name: "a", line: 6, isLocal: false, isDefinition: true, scope: null, file: !29, type: !4) +!31 = !DIGlobalVariable(name: "s2", line: 15, isLocal: false, isDefinition: true, scope: null, file: !29, type: !9) +!32 = !DIGlobalVariable(name: "s3", line: 27, isLocal: false, isDefinition: true, scope: null, file: !29, type: !13) +!33 = !DIGlobalVariable(name: "s4", line: 39, isLocal: false, isDefinition: true, scope: null, file: !29, type: !19) !34 = !{i32 2, !"Dwarf Version", i32 4} !35 = !{i32 1, !"Debug Info Version", i32 3} !36 = !{!"clang version 3.5.0 "} Index: test/DebugInfo/X86/union-const.ll =================================================================== --- test/DebugInfo/X86/union-const.ll +++ test/DebugInfo/X86/union-const.ll @@ -20,7 +20,7 @@ %struct.anon = type { i32 } ; Function Attrs: nounwind readnone ssp uwtable -define i32 @mfi_aen_setup() #0 !dbg !4 { +define i32 @mfi_aen_setup() #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.declare(metadata %union.mfi_evt* undef, metadata !16, metadata !21), !dbg !22 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !16, metadata !21), !dbg !22 Index: test/DebugInfo/X86/union-template.ll =================================================================== --- test/DebugInfo/X86/union-template.ll +++ test/DebugInfo/X86/union-template.ll @@ -9,9 +9,9 @@ %"union.PR15637::Value" = type { i32 } -@_ZN7PR156371fE = global %"union.PR15637::Value" zeroinitializer, align 4 +@_ZN7PR156371fE = global %"union.PR15637::Value" zeroinitializer, align 4, !dbg 0 !10 -define void @_ZN7PR156371gEf(float %value) #0 !dbg !4 { +define void @_ZN7PR156371gEf(float %value) #0 !dbg 0 !4 { entry: %value.addr = alloca float, align 4 %tempValue = alloca %"union.PR15637::Value", align 4 @@ -38,7 +38,7 @@ !7 = !{null, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) !9 = !{!10} -!10 = !DIGlobalVariable(name: "f", linkageName: "_ZN7PR156371fE", line: 6, isLocal: false, isDefinition: true, scope: !5, file: !11, type: !12, variable: %"union.PR15637::Value"* @_ZN7PR156371fE) +!10 = !DIGlobalVariable(name: "f", linkageName: "_ZN7PR156371fE", line: 6, isLocal: false, isDefinition: true, scope: !5, file: !11, type: !12) !11 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp") !12 = !DICompositeType(tag: DW_TAG_union_type, name: "Value", line: 2, size: 32, align: 32, file: !1, scope: !5, elements: !13, templateParams: !21) !13 = !{!14, !16} Index: test/DebugInfo/X86/vector.ll =================================================================== --- test/DebugInfo/X86/vector.ll +++ test/DebugInfo/X86/vector.ll @@ -7,7 +7,7 @@ ; ; v4si a -@a = common global <4 x i32> zeroinitializer, align 16 +@a = common global <4 x i32> zeroinitializer, align 16, !dbg 0 !5 !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!13} @@ -15,7 +15,7 @@ !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) +!5 = !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7) !6 = !DIFile(filename: "foo.c", directory: "/Users/echristo") !7 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4si", line: 1, file: !12, baseType: !8) !8 = !DICompositeType(tag: DW_TAG_array_type, size: 128, align: 128, flags: DIFlagVector, baseType: !9, elements: !10) Index: test/DebugInfo/X86/vla.ll =================================================================== --- test/DebugInfo/X86/vla.ll +++ test/DebugInfo/X86/vla.ll @@ -21,7 +21,7 @@ target triple = "x86_64-apple-macosx10.8.0" ; Function Attrs: nounwind ssp uwtable -define i32 @vla(i32 %n) nounwind ssp uwtable !dbg !4 { +define i32 @vla(i32 %n) nounwind ssp uwtable !dbg 0 !4 { entry: %n.addr = alloca i32, align 4 %saved_stack = alloca i8* @@ -57,7 +57,7 @@ declare void @llvm.stackrestore(i8*) nounwind ; Function Attrs: nounwind ssp uwtable -define i32 @main(i32 %argc, i8** %argv) nounwind ssp uwtable !dbg !9 { +define i32 @main(i32 %argc, i8** %argv) nounwind ssp uwtable !dbg 0 !9 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 Index: test/Instrumentation/AddressSanitizer/debug_info.ll =================================================================== --- test/Instrumentation/AddressSanitizer/debug_info.ll +++ test/Instrumentation/AddressSanitizer/debug_info.ll @@ -6,7 +6,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -define i32 @_Z3zzzi(i32 %p) nounwind uwtable sanitize_address !dbg !5 { +define i32 @_Z3zzzi(i32 %p) nounwind uwtable sanitize_address !dbg 0 !5 { entry: %p.addr = alloca i32, align 4 %r = alloca i32, align 4 Index: test/Instrumentation/DataFlowSanitizer/debug.ll =================================================================== --- test/Instrumentation/DataFlowSanitizer/debug.ll +++ test/Instrumentation/DataFlowSanitizer/debug.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -dfsan -dfsan-abilist=%S/Inputs/debuglist.txt -S | FileCheck %s -; CHECK: define i32 @main() {{.*}} !dbg [[SP:![0-9]+]] +; CHECK: define i32 @main() {{.*}} !dbg 0 [[SP:![0-9]+]] ; CHECK: [[SP]] = distinct !DISubprogram(name: "main" ; Generated from a simple source file compiled with clang -g: @@ -11,7 +11,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: ret i32 0, !dbg !12 } Index: test/Instrumentation/MemorySanitizer/store-origin.ll =================================================================== --- test/Instrumentation/MemorySanitizer/store-origin.ll +++ test/Instrumentation/MemorySanitizer/store-origin.ll @@ -9,7 +9,7 @@ ; Check that debug info for origin propagation code is set correctly. ; Function Attrs: nounwind -define void @Store(i32* nocapture %p, i32 %x) #0 !dbg !4 { +define void @Store(i32* nocapture %p, i32 %x) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32* %p, i64 0, metadata !11, metadata !DIExpression()), !dbg !16 tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !12, metadata !DIExpression()), !dbg !16 Index: test/Instrumentation/SanitizerCoverage/coverage-dbg.ll =================================================================== --- test/Instrumentation/SanitizerCoverage/coverage-dbg.ll +++ test/Instrumentation/SanitizerCoverage/coverage-dbg.ll @@ -25,7 +25,7 @@ %struct.A = type { i32 } ; Function Attrs: nounwind readonly uwtable -define i32 @_ZN1A1fEv(%struct.A* nocapture readonly %this) #0 align 2 !dbg !13 { +define i32 @_ZN1A1fEv(%struct.A* nocapture readonly %this) #0 align 2 !dbg 0 !13 { entry: tail call void @llvm.dbg.value(metadata %struct.A* %this, i64 0, metadata !15, metadata !DIExpression()), !dbg !20 %x = getelementptr inbounds %struct.A, %struct.A* %this, i64 0, i32 0, !dbg !21 Index: test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll =================================================================== --- test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll +++ test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll @@ -23,7 +23,7 @@ ; CHECK: [[A]] = !DILocation(line: 1, scope: !{{.*}}) ; CHECK: [[B]] = !DILocation(line: 3, column: 5, scope: !{{.*}}) -define void @_Z3fooPi(i32* %a) #0 !dbg !4 { +define void @_Z3fooPi(i32* %a) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !11, metadata !DIExpression()), !dbg !15 %tobool = icmp eq i32* %a, null, !dbg !16 Index: test/JitListener/multiple.ll =================================================================== --- test/JitListener/multiple.ll +++ test/JitListener/multiple.ll @@ -50,7 +50,7 @@ ; ModuleID = 'multiple.c' ; Function Attrs: nounwind uwtable -define i32 @foo(i32 %a) #0 !dbg !4 { +define i32 @foo(i32 %a) #0 !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 @@ -63,7 +63,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable -define i32 @bar(i32 %a) #0 !dbg !9 { +define i32 @bar(i32 %a) #0 !dbg 0 !9 { entry: %retval = alloca i32, align 4 %a.addr = alloca i32, align 4 @@ -89,7 +89,7 @@ } ; Function Attrs: nounwind uwtable -define i32 @fubar(i32 %a) #0 !dbg !10 { +define i32 @fubar(i32 %a) #0 !dbg 0 !10 { entry: %retval = alloca i32, align 4 %a.addr = alloca i32, align 4 Index: test/JitListener/simple.ll =================================================================== --- test/JitListener/simple.ll +++ test/JitListener/simple.ll @@ -16,7 +16,7 @@ ; ModuleID = 'simple.c' ; Function Attrs: nounwind uwtable -define i32 @foo(i32 %a) #0 !dbg !4 { +define i32 @foo(i32 %a) #0 !dbg 0 !4 { entry: %a.addr = alloca i32, align 4 store i32 %a, i32* %a.addr, align 4 Index: test/Linker/2011-08-04-DebugLoc.ll =================================================================== --- test/Linker/2011-08-04-DebugLoc.ll +++ test/Linker/2011-08-04-DebugLoc.ll @@ -9,7 +9,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -define i32 @foo() nounwind ssp !dbg !1 { +define i32 @foo() nounwind ssp !dbg 0 !1 { ret i32 42, !dbg !6 } Index: test/Linker/2011-08-04-DebugLoc2.ll =================================================================== --- test/Linker/2011-08-04-DebugLoc2.ll +++ test/Linker/2011-08-04-DebugLoc2.ll @@ -6,7 +6,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -define i32 @bar() nounwind ssp !dbg !1 { +define i32 @bar() nounwind ssp !dbg 0 !1 { ret i32 21, !dbg !6 } Index: test/Linker/2011-08-04-Metadata.ll =================================================================== --- test/Linker/2011-08-04-Metadata.ll +++ test/Linker/2011-08-04-Metadata.ll @@ -2,18 +2,19 @@ ; RUN: llvm-dis < %t.bc | FileCheck %s ; Test if internal global variable's debug info is merged appropriately or not. -; CHECK: !DIGlobalVariable(name: "x", +; CHECK: @x = internal global i32 0, align 4, !dbg 0 [[DI1:![0-9]+]] +; CHECK: @x.1 = internal global i32 0, align 4, !dbg 0 [[DI2:![0-9]+]] + +; CHECK: [[DI1]] = !DIGlobalVariable(name: "x", ; CHECK-NOT: linkageName: -; CHECK-SAME: variable: i32* @x{{[,)]}} -; CHECK: !DIGlobalVariable(name: "x", +; CHECK: [[DI2]] = !DIGlobalVariable(name: "x", ; CHECK-NOT: linkageName: -; CHECK-SAME: variable: i32* @x.1{{[,)]}} target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -@x = internal global i32 0, align 4 +@x = internal global i32 0, align 4, !dbg 0 !5 -define void @foo() nounwind uwtable ssp !dbg !1 { +define void @foo() nounwind uwtable ssp !dbg 0 !1 { entry: store i32 1, i32* @x, align 4, !dbg !7 ret void, !dbg !7 @@ -27,7 +28,7 @@ !2 = !DIFile(filename: "/tmp/one.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} -!5 = !DIGlobalVariable(name: "x", line: 2, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6, variable: i32* @x) +!5 = !DIGlobalVariable(name: "x", line: 2, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6) !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 3, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 3, column: 12, file: !9, scope: !1) Index: test/Linker/2011-08-04-Metadata2.ll =================================================================== --- test/Linker/2011-08-04-Metadata2.ll +++ test/Linker/2011-08-04-Metadata2.ll @@ -6,9 +6,9 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -@x = internal global i32 0, align 4 +@x = internal global i32 0, align 4, !dbg 0 !5 -define void @bar() nounwind uwtable ssp !dbg !1 { +define void @bar() nounwind uwtable ssp !dbg 0 !1 { entry: store i32 1, i32* @x, align 4, !dbg !7 ret void, !dbg !7 @@ -22,7 +22,7 @@ !2 = !DIFile(filename: "/tmp/two.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} -!5 = !DIGlobalVariable(name: "x", line: 1, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6, variable: i32* @x) +!5 = !DIGlobalVariable(name: "x", line: 1, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6) !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 2, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 2, column: 12, file: !9, scope: !1) 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 @@ -8,7 +8,7 @@ %"class.N1::A" = type { i8 } -define void @_Z3fooN2N11AE() nounwind uwtable ssp !dbg !5 { +define void @_Z3fooN2N11AE() nounwind uwtable ssp !dbg 0 !5 { entry: %mya = alloca %"class.N1::A", align 1 call void @llvm.dbg.declare(metadata %"class.N1::A"* %mya, metadata !9, metadata !DIExpression()), !dbg !13 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 @@ -6,7 +6,7 @@ %"class.N1::A" = type { i8 } -define void @_Z3barN2N11AE() nounwind uwtable ssp !dbg !5 { +define void @_Z3barN2N11AE() nounwind uwtable ssp !dbg 0 !5 { entry: %youra = alloca %"class.N1::A", align 1 call void @llvm.dbg.declare(metadata %"class.N1::A"* %youra, metadata !9, metadata !DIExpression()), !dbg !13 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 @@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -define i32 @foo() nounwind uwtable ssp !dbg !5 { +define i32 @foo() nounwind uwtable ssp !dbg 0 !5 { entry: ret i32 1, !dbg !10 } 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 @@ -4,7 +4,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" -define i32 @bar() nounwind uwtable ssp !dbg !5 { +define i32 @bar() nounwind uwtable ssp !dbg 0 !5 { entry: ret i32 2, !dbg !10 } Index: test/Linker/DbgDeclare.ll =================================================================== --- test/Linker/DbgDeclare.ll +++ test/Linker/DbgDeclare.ll @@ -14,7 +14,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" -define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg !5 { +define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg 0 !5 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 Index: test/Linker/DbgDeclare2.ll =================================================================== --- test/Linker/DbgDeclare2.ll +++ test/Linker/DbgDeclare2.ll @@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" -define void @test(i32 %argc, i8** %argv) uwtable ssp !dbg !5 { +define void @test(i32 %argc, i8** %argv) uwtable ssp !dbg 0 !5 { entry: %argc.addr = alloca i32, align 4 %argv.addr = alloca i8**, align 8 Index: test/Linker/Inputs/mdlocation.ll =================================================================== --- test/Linker/Inputs/mdlocation.ll +++ test/Linker/Inputs/mdlocation.ll @@ -1,4 +1,4 @@ -define void @foo1() !dbg !0 { +define void @foo1() !dbg 0 !0 { ret void, !dbg !3 } Index: test/Linker/Inputs/metadata-function.ll =================================================================== --- test/Linker/Inputs/metadata-function.ll +++ test/Linker/Inputs/metadata-function.ll @@ -1,12 +1,12 @@ -define weak void @foo() !weak !0 { +define weak void @foo() !weak 0 !0 { unreachable } -define void @baz() !baz !0 { +define void @baz() !baz 0 !0 { unreachable } -define void @b() !b !0 { +define void @b() !b 0 !0 { unreachable } 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 @@ -2,7 +2,7 @@ declare i32 @foo() -define void @bar() !dbg !4 { +define void @bar() !dbg 0 !4 { load i32, i32* @X, !dbg !10 call i32 @foo(), !dbg !11 ret void, !dbg !12 Index: test/Linker/Inputs/pr26037.ll =================================================================== --- test/Linker/Inputs/pr26037.ll +++ test/Linker/Inputs/pr26037.ll @@ -1,4 +1,4 @@ -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval, align 4 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 @@ -1,6 +1,6 @@ %struct.Class = type { i8 } -define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg !4 { +define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg 0 !4 { entry: %this.addr = alloca %struct.Class*, align 8 store %struct.Class* %this, %struct.Class** %this.addr, align 8 Index: test/Linker/Inputs/subprogram-linkonce-weak.ll =================================================================== --- test/Linker/Inputs/subprogram-linkonce-weak.ll +++ test/Linker/Inputs/subprogram-linkonce-weak.ll @@ -1,4 +1,4 @@ -define weak i32 @foo(i32 %a, i32 %b) !dbg !3 { +define weak i32 @foo(i32 %a, i32 %b) !dbg 0 !3 { entry: %sum = call i32 @fastadd(i32 %a, i32 %b), !dbg !DILocation(line: 52, scope: !3) ret i32 %sum, !dbg !DILocation(line: 53, scope: !3) Index: test/Linker/Inputs/thinlto_funcimport_debug.ll =================================================================== --- test/Linker/Inputs/thinlto_funcimport_debug.ll +++ test/Linker/Inputs/thinlto_funcimport_debug.ll @@ -3,7 +3,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: %call = tail call i32 @func1(i32 10) #2, !dbg !11 %call1 = tail call i32 @func2(i32 10) #2, !dbg !12 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 @@ -47,7 +47,7 @@ %class.Base = type { i32 } ; Function Attrs: nounwind ssp uwtable -define void @_Z1fi(i32 %a) #0 !dbg !15 { +define void @_Z1fi(i32 %a) #0 !dbg 0 !15 { entry: %a.addr = alloca i32, align 4 %t = alloca %class.A, align 4 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 @@ -5,7 +5,7 @@ %class.Base = type { i32 } ; Function Attrs: nounwind ssp uwtable -define void @_Z1gi(i32 %a) #0 !dbg !20 { +define void @_Z1gi(i32 %a) #0 !dbg 0 !20 { entry: %a.addr = alloca i32, align 4 %t = alloca %class.B, align 8 @@ -19,7 +19,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: ssp uwtable -define i32 @main() #2 !dbg !24 { +define i32 @main() #2 !dbg 0 !24 { entry: %retval = alloca i32, align 4 %a = alloca %class.A, align 4 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 @@ -44,7 +44,7 @@ %struct.Base = type { i32, %struct.Base* } ; Function Attrs: nounwind ssp uwtable -define void @_Z1fi(i32 %a) #0 !dbg !12 { +define void @_Z1fi(i32 %a) #0 !dbg 0 !12 { entry: %a.addr = alloca i32, align 4 %t = alloca %struct.Base, align 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 @@ -3,7 +3,7 @@ %struct.Base = type { i32, %struct.Base* } ; Function Attrs: nounwind ssp uwtable -define void @_Z1gi(i32 %a) #0 !dbg !12 { +define void @_Z1gi(i32 %a) #0 !dbg 0 !12 { entry: %a.addr = alloca i32, align 4 %t = alloca %struct.Base, align 8 @@ -17,7 +17,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: ssp uwtable -define i32 @main() #2 !dbg !16 { +define i32 @main() #2 !dbg 0 !16 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/Linker/mdlocation.ll =================================================================== --- test/Linker/mdlocation.ll +++ test/Linker/mdlocation.ll @@ -2,7 +2,7 @@ ; Test that DILocations are remapped properly. -define void @foo() !dbg !0 { +define void @foo() !dbg 0 !0 { ret void, !dbg !3 } Index: test/Linker/metadata-function.ll =================================================================== --- test/Linker/metadata-function.ll +++ test/Linker/metadata-function.ll @@ -1,23 +1,23 @@ ; RUN: llvm-link %s %S/Inputs/metadata-function.ll -S | FileCheck %s ; RUN: llvm-link %S/Inputs/metadata-function.ll %s -S | FileCheck %s -; CHECK-DAG: define weak void @foo() !weak ![[B:[0-9]+]] { -define linkonce void @foo() !linkonce !0 { +; CHECK-DAG: define weak void @foo() !weak 0 ![[B:[0-9]+]] { +define linkonce void @foo() !linkonce 0 !0 { unreachable } -; CHECK-DAG: define void @bar() !bar ![[A:[0-9]+]] { -define void @bar() !bar !0 { +; CHECK-DAG: define void @bar() !bar 0 ![[A:[0-9]+]] { +define void @bar() !bar 0 !0 { call void @baz() unreachable } -; CHECK-DAG: define void @baz() !baz ![[B]] { +; CHECK-DAG: define void @baz() !baz 0 ![[B]] { declare void @baz() -; CHECK-DAG: define void @a() !a ![[A]] { -; CHECK-DAG: define void @b() !b ![[B]] { -define void @a() !a !0 { +; CHECK-DAG: define void @a() !a 0 ![[A]] { +; CHECK-DAG: define void @b() !b 0 ![[B]] { +define void @a() !a 0 !0 { unreachable } Index: test/Linker/only-needed-debug-metadata.ll =================================================================== --- test/Linker/only-needed-debug-metadata.ll +++ test/Linker/only-needed-debug-metadata.ll @@ -11,13 +11,13 @@ ; ONLYNEEDED: distinct !DISubprogram(name: "foo" ; ONLYNEEDED-NOT: distinct !DISubprogram(name: "unused" -@X = global i32 5 -@U = global i32 6 +@X = global i32 5, !dbg 0 !14 +@U = global i32 6, !dbg 0 !15 @U_linkonce = linkonce_odr hidden global i32 6 -define i32 @foo() !dbg !4 { +define i32 @foo() !dbg 0 !4 { ret i32 7, !dbg !20 } -define i32 @unused() !dbg !10 { +define i32 @unused() !dbg 0 !10 { ret i32 8, !dbg !21 } @@ -38,8 +38,8 @@ !11 = !DISubroutineType(types: !12) !12 = !{!7} !13 = !{!14, !15} -!14 = !DIGlobalVariable(name: "X", scope: !0, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, variable: i32* @X) -!15 = !DIGlobalVariable(name: "U", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, variable: i32* @U) +!14 = !DIGlobalVariable(name: "X", scope: !0, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true) +!15 = !DIGlobalVariable(name: "U", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !16 = !{i32 2, !"Dwarf Version", i32 4} !17 = !{i32 2, !"Debug Info Version", i32 3} !18 = !{!"clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)"} Index: test/Linker/pr26037.ll =================================================================== --- test/Linker/pr26037.ll +++ test/Linker/pr26037.ll @@ -11,22 +11,22 @@ ; CHECK: ![[LBD]] = distinct !DILexicalBlock(scope: ![[D:[0-9]+]] ; CHECK: ![[D]] = distinct !DISubprogram(name: "d" -define void @_ZN1A1aEv() #0 !dbg !4 { +define void @_ZN1A1aEv() #0 !dbg 0 !4 { entry: ret void, !dbg !14 } -define void @_ZN1A1bEv() #0 !dbg !8 { +define void @_ZN1A1bEv() #0 !dbg 0 !8 { entry: ret void, !dbg !15 } -define void @_ZN1A1cEv() #0 !dbg !18 { +define void @_ZN1A1cEv() #0 !dbg 0 !18 { entry: ret void, !dbg !21 } -define void @_ZN1A1dEv() #0 !dbg !20 { +define void @_ZN1A1dEv() #0 !dbg 0 !20 { entry: ret void, !dbg !22 } 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 @@ -15,18 +15,18 @@ %struct.Class = type { i8 } -; CHECK: define i32 @_Z3foov(){{.*}} !dbg ![[SP1:[0-9]+]] -define i32 @_Z3foov() !dbg !4 { +; CHECK: define i32 @_Z3foov(){{.*}} !dbg 0 ![[SP1:[0-9]+]] +define i32 @_Z3foov() !dbg 0 !4 { entry: %tmp = alloca %struct.Class, align 1 %call = call i32 @_ZN5ClassIiE3fooEv(%struct.Class* %tmp), !dbg !14 ret i32 %call, !dbg !14 } -; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this){{.*}} !dbg ![[SP2:[0-9]+]] { +; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this){{.*}} !dbg 0 ![[SP2:[0-9]+]] { ; CHECK-NOT: } ; CHECK: !dbg ![[LOC:[0-9]+]] -define linkonce_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg !7 { +define linkonce_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg 0 !7 { entry: %this.addr = alloca %struct.Class*, align 8 store %struct.Class* %this, %struct.Class** %this.addr, align 8 Index: test/Linker/subprogram-linkonce-weak.ll =================================================================== --- test/Linker/subprogram-linkonce-weak.ll +++ test/Linker/subprogram-linkonce-weak.ll @@ -17,29 +17,29 @@ ; The WL prefix means weak (the other file) first, then linkonce (this file). ; We'll see @bar before @foo if this file is first. -; LW: define i32 @bar({{.*}} !dbg ![[BARSP:[0-9]+]] +; LW: define i32 @bar({{.*}} !dbg 0 ![[BARSP:[0-9]+]] ; LW: %sum = add i32 %a, %b, !dbg ![[FOOINBAR:[0-9]+]] ; LW: ret i32 %sum, !dbg ![[BARRET:[0-9]+]] -; LW: define weak i32 @foo({{.*}} !dbg ![[WEAKFOOSP:[0-9]+]] +; LW: define weak i32 @foo({{.*}} !dbg 0 ![[WEAKFOOSP:[0-9]+]] ; LW: %sum = call i32 @fastadd(i32 %a, i32 %b), !dbg ![[FOOCALL:[0-9]+]] ; LW: ret i32 %sum, !dbg ![[FOORET:[0-9]+]] ; We'll see @foo before @bar if this file is second. -; WL: define weak i32 @foo({{.*}} !dbg ![[WEAKFOOSP:[0-9]+]] +; WL: define weak i32 @foo({{.*}} !dbg 0 ![[WEAKFOOSP:[0-9]+]] ; WL: %sum = call i32 @fastadd(i32 %a, i32 %b), !dbg ![[FOOCALL:[0-9]+]] ; WL: ret i32 %sum, !dbg ![[FOORET:[0-9]+]] -; WL: define i32 @bar({{.*}} !dbg ![[BARSP:[0-9]+]] +; WL: define i32 @bar({{.*}} !dbg 0 ![[BARSP:[0-9]+]] ; WL: %sum = add i32 %a, %b, !dbg ![[FOOINBAR:[0-9]+]] ; WL: ret i32 %sum, !dbg ![[BARRET:[0-9]+]] -define i32 @bar(i32 %a, i32 %b) !dbg !3 { +define i32 @bar(i32 %a, i32 %b) !dbg 0 !3 { entry: %sum = add i32 %a, %b, !dbg !DILocation(line: 2, scope: !4, inlinedAt: !DILocation(line: 12, scope: !3)) ret i32 %sum, !dbg !DILocation(line: 13, scope: !3) } -define linkonce i32 @foo(i32 %a, i32 %b) !dbg !4 { +define linkonce i32 @foo(i32 %a, i32 %b) !dbg 0 !4 { entry: %sum = add i32 %a, %b, !dbg !DILocation(line: 2, scope: !4) ret i32 %sum, !dbg !DILocation(line: 3, scope: !4) Index: test/Linker/thinlto_funcimport_debug.ll =================================================================== --- test/Linker/thinlto_funcimport_debug.ll +++ test/Linker/thinlto_funcimport_debug.ll @@ -25,7 +25,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind readnone uwtable -define i32 @func1(i32 %n) #0 !dbg !4 { +define i32 @func1(i32 %n) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %n, i64 0, metadata !9, metadata !17), !dbg !18 tail call void @llvm.dbg.value(metadata i32 5, i64 0, metadata !10, metadata !17), !dbg !19 @@ -36,7 +36,7 @@ } ; Function Attrs: nounwind readnone uwtable -define i32 @func2(i32 %n) #0 !dbg !11 { +define i32 @func2(i32 %n) #0 !dbg 0 !11 { entry: tail call void @llvm.dbg.value(metadata i32 %n, i64 0, metadata !13, metadata !17), !dbg !24 ret i32 %n, !dbg !25 Index: test/Linker/type-unique-odr-a.ll =================================================================== --- test/Linker/type-unique-odr-a.ll +++ test/Linker/type-unique-odr-a.ll @@ -59,14 +59,14 @@ %class.A = type { i32 } ; Function Attrs: nounwind -define void @_Z3bazv() #0 !dbg !15 { +define void @_Z3bazv() #0 !dbg 0 !15 { entry: call void @_ZL3barv(), !dbg !23 ret void, !dbg !23 } ; Function Attrs: nounwind -define internal void @_ZL3barv() #0 !dbg !19 { +define internal void @_ZL3barv() #0 !dbg 0 !19 { entry: %a = alloca %class.A, align 4 call void @llvm.dbg.declare(metadata %class.A* %a, metadata !24, metadata !DIExpression()), !dbg !25 Index: test/Linker/type-unique-odr-b.ll =================================================================== --- test/Linker/type-unique-odr-b.ll +++ test/Linker/type-unique-odr-b.ll @@ -22,7 +22,7 @@ %class.A = type { i32 } ; Function Attrs: nounwind -define void @_ZN1A6getFooEv(%class.A* %this) #0 align 2 !dbg !15 { +define void @_ZN1A6getFooEv(%class.A* %this) #0 align 2 !dbg 0 !15 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -35,14 +35,14 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind -define void @_Z1fv() #0 !dbg !16 { +define void @_Z1fv() #0 !dbg 0 !16 { entry: call void @_ZL3barv(), !dbg !28 ret void, !dbg !28 } ; Function Attrs: nounwind -define internal void @_ZL3barv() #0 !dbg !20 { +define internal void @_ZL3barv() #0 !dbg 0 !20 { entry: ret void, !dbg !29 } Index: test/Linker/type-unique-simple-a.ll =================================================================== --- test/Linker/type-unique-simple-a.ll +++ test/Linker/type-unique-simple-a.ll @@ -49,7 +49,7 @@ %struct.Base = type { i32 } ; Function Attrs: nounwind ssp uwtable -define void @_Z1fi(i32 %a) #0 !dbg !10 { +define void @_Z1fi(i32 %a) #0 !dbg 0 !10 { entry: %a.addr = alloca i32, align 4 %t = alloca %struct.Base, align 4 Index: test/Linker/type-unique-simple-b.ll =================================================================== --- test/Linker/type-unique-simple-b.ll +++ test/Linker/type-unique-simple-b.ll @@ -5,7 +5,7 @@ %struct.Base = type { i32 } ; Function Attrs: nounwind ssp uwtable -define void @_Z1gi(i32 %a) #0 !dbg !10 { +define void @_Z1gi(i32 %a) #0 !dbg 0 !10 { entry: %a.addr = alloca i32, align 4 %t = alloca %struct.Base, align 4 @@ -19,7 +19,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: ssp uwtable -define i32 @main() #2 !dbg !14 { +define i32 @main() #2 !dbg 0 !14 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval Index: test/Linker/type-unique-simple2-a.ll =================================================================== --- test/Linker/type-unique-simple2-a.ll +++ test/Linker/type-unique-simple2-a.ll @@ -31,7 +31,7 @@ @_ZTV1A = external unnamed_addr constant [4 x i8*] ; Function Attrs: nounwind -define i32 @_Z3barv() #0 !dbg !27 { +define i32 @_Z3barv() #0 !dbg 0 !27 { entry: %tmp = alloca %class.A, align 8 %0 = bitcast %class.A* %tmp to i8*, !dbg !38 @@ -45,7 +45,7 @@ declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1 ; Function Attrs: inlinehint nounwind -define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg !31 { +define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg 0 !31 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -61,7 +61,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #4 ; Function Attrs: inlinehint nounwind -define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg !34 { +define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg 0 !34 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 Index: test/Linker/type-unique-simple2-b.ll =================================================================== --- test/Linker/type-unique-simple2-b.ll +++ test/Linker/type-unique-simple2-b.ll @@ -18,7 +18,7 @@ @_ZTI1A = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) } ; Function Attrs: nounwind -define void @_ZN1A6setFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg !26 { +define void @_ZN1A6setFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg 0 !26 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 @@ -31,7 +31,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind -define i32 @_ZN1A6getFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg !28 { +define i32 @_ZN1A6getFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg 0 !28 { entry: %this.addr = alloca %class.A*, align 8 store %class.A* %this, %class.A** %this.addr, align 8 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 @@ -43,7 +43,7 @@ %struct.SA = type { i32 } ; Function Attrs: ssp uwtable -define void @_Z4topAP1A2SA(%class.A* %a, i32 %sa.coerce) #0 !dbg !15 { +define void @_Z4topAP1A2SA(%class.A* %a, i32 %sa.coerce) #0 !dbg 0 !15 { entry: %sa = alloca %struct.SA, align 4 %a.addr = alloca %class.A*, align 8 @@ -67,7 +67,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define linkonce_odr void @_ZN1A5testAE2SA(%class.A* %this, i32 %a.coerce) #2 align 2 !dbg !20 { +define linkonce_odr void @_ZN1A5testAE2SA(%class.A* %this, i32 %a.coerce) #2 align 2 !dbg 0 !20 { entry: %a = alloca %struct.SA, align 4 %this.addr = alloca %class.A*, align 8 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 @@ -22,7 +22,7 @@ %struct.SA = type { i32 } ; Function Attrs: ssp uwtable -define void @_Z4topBP1B2SA(%class.B* %b, i32 %sa.coerce) #0 !dbg !15 { +define void @_Z4topBP1B2SA(%class.B* %b, i32 %sa.coerce) #0 !dbg 0 !15 { entry: %sa = alloca %struct.SA, align 4 %b.addr = alloca %class.B*, align 8 @@ -46,7 +46,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define linkonce_odr void @_ZN1B5testBE2SA(%class.B* %this, i32 %sa.coerce) #2 align 2 !dbg !20 { +define linkonce_odr void @_ZN1B5testBE2SA(%class.B* %this, i32 %sa.coerce) #2 align 2 !dbg 0 !20 { entry: %sa = alloca %struct.SA, align 4 %this.addr = alloca %class.B*, align 8 Index: test/MC/ARM/coff-debugging-secrel.ll =================================================================== --- test/MC/ARM/coff-debugging-secrel.ll +++ test/MC/ARM/coff-debugging-secrel.ll @@ -9,7 +9,7 @@ target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7--windows-itanium" -define arm_aapcs_vfpcc void @function() !dbg !1 { +define arm_aapcs_vfpcc void @function() !dbg 0 !1 { entry: ret void, !dbg !0 } Index: test/MC/ELF/cfi-version.ll =================================================================== --- test/MC/ELF/cfi-version.ll +++ test/MC/ELF/cfi-version.ll @@ -8,7 +8,7 @@ ; REQUIRES: default_triple ; Function Attrs: nounwind -define i32 @foo() #0 !dbg !4 { +define i32 @foo() #0 !dbg 0 !4 { entry: %call = call i32 bitcast (i32 (...)* @bar to i32 ()*)(), !dbg !12 %add = add nsw i32 %call, 1, !dbg !12 Index: test/ThinLTO/X86/Inputs/drop-debug-info.ll =================================================================== --- test/ThinLTO/X86/Inputs/drop-debug-info.ll +++ test/ThinLTO/X86/Inputs/drop-debug-info.ll @@ -5,7 +5,7 @@ target triple = "x86_64-apple-macosx10.11.0" -@argc = global i8 0, align 1 +@argc = global i8 0, align 1, !dbg 0 !21 define void @globalfunc() { entry: @@ -40,7 +40,7 @@ !18 = !DILocalVariable(name: "c", line: 7, scope: !13, file: !14, type: !4) !19 = !DILocalVariable(name: "lc", line: 8, scope: !13, file: !14, type: !11) !20 = !{!21} -!21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11, variable: i8* @argc) +!21 = !DIGlobalVariable(name: "argc", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !11) !22 = !{i32 2, !"Dwarf Version", i32 4} !23 = !{i32 2, !"Debug Info Version", i32 0} !25 = !DILocation(line: 8, column: 3, scope: !13) Index: test/Transforms/ADCE/debug-info-intrinsic.ll =================================================================== --- test/Transforms/ADCE/debug-info-intrinsic.ll +++ test/Transforms/ADCE/debug-info-intrinsic.ll @@ -31,7 +31,7 @@ declare void @sink() ; CHECK-LABEL: define void @variable_in_unused_subscope( -define void @variable_in_unused_subscope() !dbg !4 { +define void @variable_in_unused_subscope() !dbg 0 !4 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @sink ; CHECK-NEXT: ret void @@ -42,7 +42,7 @@ } ; CHECK-LABEL: define void @variable_in_parent_scope( -define void @variable_in_parent_scope() !dbg !7 { +define void @variable_in_parent_scope() !dbg 0 !7 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @llvm.dbg.value ; CHECK-NEXT: call void @sink @@ -54,7 +54,7 @@ } ; CHECK-LABEL: define void @calls_empty_function_with_unused_variable_in_unused_subscope( -define void @calls_empty_function_with_unused_variable_in_unused_subscope() !dbg !8 { +define void @calls_empty_function_with_unused_variable_in_unused_subscope() !dbg 0 !8 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @sink ; CHECK-NEXT: ret void Index: test/Transforms/AddDiscriminators/basic.ll =================================================================== --- test/Transforms/AddDiscriminators/basic.ll +++ test/Transforms/AddDiscriminators/basic.ll @@ -11,7 +11,7 @@ ; if (i < 10) x = i; ; } -define void @foo(i32 %i) #0 !dbg !4 { +define void @foo(i32 %i) #0 !dbg 0 !4 { entry: %i.addr = alloca i32, align 4 %x = alloca i32, align 4 Index: test/Transforms/AddDiscriminators/call-nested.ll =================================================================== --- test/Transforms/AddDiscriminators/call-nested.ll +++ test/Transforms/AddDiscriminators/call-nested.ll @@ -9,7 +9,7 @@ ; #6 } ; Function Attrs: uwtable -define i32 @_Z3bazv() #0 !dbg !4 { +define i32 @_Z3bazv() #0 !dbg 0 !4 { %1 = call i32 @_Z3barv(), !dbg !11 ; CHECK: %1 = call i32 @_Z3barv(), !dbg ![[CALL0:[0-9]+]] %2 = call i32 @_Z3barv(), !dbg !12 Index: test/Transforms/AddDiscriminators/call.ll =================================================================== --- test/Transforms/AddDiscriminators/call.ll +++ test/Transforms/AddDiscriminators/call.ll @@ -8,7 +8,7 @@ ; #5 } ; Function Attrs: uwtable -define void @_Z3foov() #0 !dbg !4 { +define void @_Z3foov() #0 !dbg 0 !4 { call void @_Z3barv(), !dbg !10 ; CHECK: call void @_Z3barv(), !dbg ![[CALL0:[0-9]+]] call void @_Z3barv(), !dbg !11 Index: test/Transforms/AddDiscriminators/diamond.ll =================================================================== --- test/Transforms/AddDiscriminators/diamond.ll +++ test/Transforms/AddDiscriminators/diamond.ll @@ -12,7 +12,7 @@ ; bar(3): discriminator 1 ; Function Attrs: uwtable -define void @_Z3fooi(i32 %i) #0 !dbg !4 { +define void @_Z3fooi(i32 %i) #0 !dbg 0 !4 { %1 = alloca i32, align 4 store i32 %i, i32* %1, align 4 call void @llvm.dbg.declare(metadata i32* %1, metadata !11, metadata !12), !dbg !13 Index: test/Transforms/AddDiscriminators/first-only.ll =================================================================== --- test/Transforms/AddDiscriminators/first-only.ll +++ test/Transforms/AddDiscriminators/first-only.ll @@ -13,7 +13,7 @@ ; } ; } -define void @foo(i32 %i) #0 !dbg !4 { +define void @foo(i32 %i) #0 !dbg 0 !4 { entry: %i.addr = alloca i32, align 4 %x = alloca i32, align 4 Index: test/Transforms/AddDiscriminators/multiple.ll =================================================================== --- test/Transforms/AddDiscriminators/multiple.ll +++ test/Transforms/AddDiscriminators/multiple.ll @@ -10,7 +10,7 @@ ; The two stores inside the if-then-else line must have different discriminator ; values. -define void @foo(i32 %i) #0 !dbg !4 { +define void @foo(i32 %i) #0 !dbg 0 !4 { entry: %i.addr = alloca i32, align 4 %x = alloca i32, align 4 Index: test/Transforms/AddDiscriminators/no-discriminators.ll =================================================================== --- test/Transforms/AddDiscriminators/no-discriminators.ll +++ test/Transforms/AddDiscriminators/no-discriminators.ll @@ -12,7 +12,7 @@ ; altered. If they are, it means that the discriminators pass added a ; new lexical scope. -define i32 @foo(i64 %i) #0 !dbg !4 { +define i32 @foo(i64 %i) #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 %i.addr = alloca i64, align 8 Index: test/Transforms/AddDiscriminators/oneline.ll =================================================================== --- test/Transforms/AddDiscriminators/oneline.ll +++ test/Transforms/AddDiscriminators/oneline.ll @@ -10,7 +10,7 @@ ; return 100: discriminator 2 ; return 99: discriminator 3 -define i32 @_Z3fooi(i32 %i) #0 !dbg !4 { +define i32 @_Z3fooi(i32 %i) #0 !dbg 0 !4 { %1 = alloca i32, align 4 %2 = alloca i32, align 4 store i32 %i, i32* %2, align 4, !tbaa !13 Index: test/Transforms/ArgumentPromotion/dbg.ll =================================================================== --- test/Transforms/ArgumentPromotion/dbg.ll +++ test/Transforms/ArgumentPromotion/dbg.ll @@ -2,8 +2,8 @@ declare void @sink(i32) -; CHECK: define internal void @test({{.*}} !dbg [[SP:![0-9]+]] -define internal void @test(i32** %X) !dbg !2 { +; CHECK: define internal void @test({{.*}} !dbg 0 [[SP:![0-9]+]] +define internal void @test(i32** %X) !dbg 0 !2 { %1 = load i32*, i32** %X, align 8 %2 = load i32, i32* %1, align 8 call void @sink(i32 %2) Index: test/Transforms/DeadArgElim/dbginfo.ll =================================================================== --- test/Transforms/DeadArgElim/dbginfo.ll +++ test/Transforms/DeadArgElim/dbginfo.ll @@ -14,21 +14,21 @@ ; the function->debug info mapping on update to ensure it's accurate when used ; again for the next removal. -; CHECK: define internal void @_ZL2f1iz({{.*}} !dbg [[SP:![0-9]+]] +; CHECK: define internal void @_ZL2f1iz({{.*}} !dbg 0 [[SP:![0-9]+]] ; CHECK: [[SP]] = distinct !DISubprogram(name: "f1" ; Check that debug info metadata for subprograms stores pointers to ; updated LLVM functions. ; Function Attrs: uwtable -define void @_Z2f2v() #0 !dbg !4 { +define void @_Z2f2v() #0 !dbg 0 !4 { entry: call void (i32, ...) @_ZL2f1iz(i32 1), !dbg !15 ret void, !dbg !16 } ; Function Attrs: nounwind uwtable -define internal void @_ZL2f1iz(i32, ...) #1 !dbg !8 { +define internal void @_ZL2f1iz(i32, ...) #1 !dbg 0 !8 { entry: call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !17, metadata !18), !dbg !19 ret void, !dbg !20 Index: test/Transforms/DeadStoreElimination/inst-limits.ll =================================================================== --- test/Transforms/DeadStoreElimination/inst-limits.ll +++ test/Transforms/DeadStoreElimination/inst-limits.ll @@ -9,7 +9,7 @@ @x = global i32 0, align 4 ; Function Attrs: nounwind -define i32 @test_within_limit() !dbg !4 { +define i32 @test_within_limit() !dbg 0 !4 { entry: ; The first store; later there is a second store to the same location, ; so this store should be optimized away by DSE. Index: test/Transforms/FunctionImport/Inputs/funcimport_debug.ll =================================================================== --- test/Transforms/FunctionImport/Inputs/funcimport_debug.ll +++ test/Transforms/FunctionImport/Inputs/funcimport_debug.ll @@ -3,7 +3,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind uwtable -define void @func() #0 !dbg !4 { +define void @func() #0 !dbg 0 !4 { entry: ret void, !dbg !10 } Index: test/Transforms/FunctionImport/funcimport_debug.ll =================================================================== --- test/Transforms/FunctionImport/funcimport_debug.ll +++ test/Transforms/FunctionImport/funcimport_debug.ll @@ -24,7 +24,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg 0 !4 { entry: call void (...) @func(), !dbg !11 ret i32 0, !dbg !12 Index: test/Transforms/GCOVProfiling/function-numbering.ll =================================================================== --- test/Transforms/GCOVProfiling/function-numbering.ll +++ test/Transforms/GCOVProfiling/function-numbering.ll @@ -22,16 +22,16 @@ ; GCNO-NOT: == bar ({{[0-9]+}}) @ ; GCNO: == baz (1) @ -define void @foo() !dbg !4 { +define void @foo() !dbg 0 !4 { ret void, !dbg !12 } -define void @bar() !dbg !7 { +define void @bar() !dbg 0 !7 { ; This function is referenced by the debug info, but no lines have locations. ret void } -define void @baz() !dbg !8 { +define void @baz() !dbg 0 !8 { ret void, !dbg !13 } Index: test/Transforms/GCOVProfiling/global-ctor.ll =================================================================== --- test/Transforms/GCOVProfiling/global-ctor.ll +++ test/Transforms/GCOVProfiling/global-ctor.ll @@ -8,7 +8,7 @@ @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_global-ctor.ll, i8* null }] ; Function Attrs: nounwind -define internal void @__cxx_global_var_init() #0 section ".text.startup" !dbg !4 { +define internal void @__cxx_global_var_init() #0 section ".text.startup" !dbg 0 !4 { entry: br label %0 Index: test/Transforms/GCOVProfiling/linezero.ll =================================================================== --- test/Transforms/GCOVProfiling/linezero.ll +++ test/Transforms/GCOVProfiling/linezero.ll @@ -9,7 +9,7 @@ %struct.vector = type { i8 } ; Function Attrs: nounwind -define i32 @_Z4testv() #0 !dbg !15 { +define i32 @_Z4testv() #0 !dbg 0 !15 { entry: %retval = alloca i32, align 4 %__range = alloca %struct.vector*, align 8 @@ -75,7 +75,7 @@ declare void @llvm.trap() #3 ; Function Attrs: nounwind -define void @_Z2f1v() #0 !dbg !20 { +define void @_Z2f1v() #0 !dbg 0 !20 { entry: br label %0 Index: test/Transforms/GCOVProfiling/linkagename.ll =================================================================== --- test/Transforms/GCOVProfiling/linkagename.ll +++ test/Transforms/GCOVProfiling/linkagename.ll @@ -4,7 +4,7 @@ ; RUN: grep _Z3foov %T/linkagename.gcno ; RUN: rm %T/linkagename.gcno -define void @_Z3foov() !dbg !5 { +define void @_Z3foov() !dbg 0 !5 { entry: ret void, !dbg !8 } Index: test/Transforms/GCOVProfiling/return-block.ll =================================================================== --- test/Transforms/GCOVProfiling/return-block.ll +++ test/Transforms/GCOVProfiling/return-block.ll @@ -13,10 +13,10 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -@A = common global i32 0, align 4 +@A = common global i32 0, align 4, !dbg 0 !9 ; Function Attrs: nounwind uwtable -define void @test() #0 !dbg !4 { +define void @test() #0 !dbg 0 !4 { entry: tail call void (...) @f() #2, !dbg !14 %0 = load i32, i32* @A, align 4, !dbg !15 @@ -52,7 +52,7 @@ !6 = !DISubroutineType(types: !7) !7 = !{null} !8 = !{!9} -!9 = !DIGlobalVariable(name: "A", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10, variable: i32* @A) +!9 = !DIGlobalVariable(name: "A", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10) !10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !11 = !{i32 2, !"Dwarf Version", i32 4} !12 = !{i32 2, !"Debug Info Version", i32 3} Index: test/Transforms/GCOVProfiling/version.ll =================================================================== --- test/Transforms/GCOVProfiling/version.ll +++ test/Transforms/GCOVProfiling/version.ll @@ -8,7 +8,7 @@ ; RUN: head -c8 %T/version.gcno | grep '^oncg.704' ; RUN: rm %T/version.gcno -define void @test() !dbg !5 { +define void @test() !dbg 0 !5 { ret void, !dbg !8 } Index: test/Transforms/GVN/load-pre-nonlocal.ll =================================================================== --- test/Transforms/GVN/load-pre-nonlocal.ll +++ test/Transforms/GVN/load-pre-nonlocal.ll @@ -61,7 +61,7 @@ ; CHECK-NOT: %1 = load i32, i32* ; CHECK: [[LSHR_LOC]] = !DILocation(line: 101, column: 1, scope: !{{.*}}) -define i32 @overaligned_load(i32 %a, i32* nocapture %b) !dbg !13 { +define i32 @overaligned_load(i32 %a, i32* nocapture %b) !dbg 0 !13 { entry: %cmp = icmp sgt i32 %a, 0, !dbg !14 br i1 %cmp, label %if.then, label %if.else, !dbg !14 Index: test/Transforms/GVN/phi-translate.ll =================================================================== --- test/Transforms/GVN/phi-translate.ll +++ test/Transforms/GVN/phi-translate.ll @@ -18,7 +18,7 @@ ; CHECK-DAG: [[N_LOC]] = !DILocation(line: 47, column: 1, scope: !{{.*}}) @G = external global [100 x i32] -define i32 @foo(i32 %x, i32 %z) !dbg !6 { +define i32 @foo(i32 %x, i32 %z) !dbg 0 !6 { entry: %tobool = icmp eq i32 %z, 0, !dbg !7 br i1 %tobool, label %end, label %then, !dbg !7 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 @@ -2,7 +2,7 @@ ; RUN: opt < %s -globalopt -stats -disable-output 2>&1 | FileCheck %s ; CHECK: 1 globalopt - Number of global vars shrunk to booleans -@Stop = internal global i32 0 ; [#uses=3] +@Stop = internal global i32 0, !dbg 0 !0 ; [#uses=3] define i32 @foo(i32 %i) nounwind ssp { entry: @@ -55,7 +55,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone !llvm.dbg.cu = !{!1} -!0 = !DIGlobalVariable(name: "Stop", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !2, variable: i32* @Stop) +!0 = !DIGlobalVariable(name: "Stop", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !2) !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) Index: test/Transforms/Inline/alloca-dbgdeclare-merge.ll =================================================================== --- test/Transforms/Inline/alloca-dbgdeclare-merge.ll +++ test/Transforms/Inline/alloca-dbgdeclare-merge.ll @@ -32,7 +32,7 @@ target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: alwaysinline nounwind uwtable -define void @f() #0 !dbg !4 { +define void @f() #0 !dbg 0 !4 { entry: %aaa = alloca [100 x i8], align 16 call void @llvm.dbg.declare(metadata [100 x i8]* %aaa, metadata !12, metadata !17), !dbg !18 @@ -45,7 +45,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: alwaysinline nounwind uwtable -define void @g() #0 !dbg !7 { +define void @g() #0 !dbg 0 !7 { entry: %bbb = alloca [100 x i8], align 16 call void @llvm.dbg.declare(metadata [100 x i8]* %bbb, metadata !22, metadata !17), !dbg !23 @@ -55,7 +55,7 @@ } ; Function Attrs: nounwind uwtable -define void @h() #2 !dbg !8 { +define void @h() #2 !dbg 0 !8 { entry: call void @f(), !dbg !27 call void @g(), !dbg !28 Index: test/Transforms/Inline/alloca-dbgdeclare.ll =================================================================== --- test/Transforms/Inline/alloca-dbgdeclare.ll +++ test/Transforms/Inline/alloca-dbgdeclare.ll @@ -21,8 +21,8 @@ %struct.A = type { i32, [2 x double] } -@a = global %struct.A zeroinitializer, align 8 -@b = global %struct.A zeroinitializer, align 8 +@a = global %struct.A zeroinitializer, align 8, !dbg 0 !26 +@b = global %struct.A zeroinitializer, align 8, !dbg 0 !27 ; Function Attrs: nounwind declare void @_Z3fn31A(%struct.A* nocapture readonly %p1) #0 @@ -34,7 +34,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #2 ; Function Attrs: nounwind -define void @_Z3fn4v() #0 !dbg !21 { +define void @_Z3fn4v() #0 !dbg 0 !21 { entry: ; Test that the dbg.declare is moved together with the alloca. ; CHECK: define void @_Z3fn5v() @@ -61,7 +61,7 @@ } ; Function Attrs: noreturn nounwind -define void @_Z3fn5v() #3 !dbg !24 { +define void @_Z3fn5v() #3 !dbg 0 !24 { entry: br label %while.body, !dbg !55 @@ -107,8 +107,8 @@ !23 = !{null} !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: !4, variable: %struct.A* @a) -!27 = !DIGlobalVariable(name: "b", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !4, variable: %struct.A* @b) +!26 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !4) +!27 = !DIGlobalVariable(name: "b", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !4) !28 = !{i32 2, !"Dwarf Version", i32 4} !29 = !{i32 2, !"Debug Info Version", i32 3} !30 = !{!"clang version 3.7.0 (trunk 227480) (llvm/trunk 227517)"} 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 @@ -59,7 +59,7 @@ $_Z2f2v = comdat any ; Function Attrs: uwtable -define void @_Z1fv() #0 !dbg !4 { +define void @_Z1fv() #0 !dbg 0 !4 { entry: call void @_Z2f4v(), !dbg !13 call void @_Z2f4v(), !dbg !13 @@ -67,14 +67,14 @@ } ; Function Attrs: alwaysinline inlinehint uwtable -define linkonce_odr void @_Z2f4v() #1 comdat !dbg !7 { +define linkonce_odr void @_Z2f4v() #1 comdat !dbg 0 !7 { entry: call void @_Z2f3v(), !dbg !15 ret void, !dbg !16 } ; Function Attrs: alwaysinline inlinehint uwtable -define linkonce_odr void @_Z2f3v() #1 comdat !dbg !8 { +define linkonce_odr void @_Z2f3v() #1 comdat !dbg 0 !8 { entry: call void @_Z2f2v(), !dbg !17 call void @_Z2f2v(), !dbg !17 @@ -82,7 +82,7 @@ } ; Function Attrs: alwaysinline inlinehint uwtable -define linkonce_odr void @_Z2f2v() #1 comdat !dbg !9 { +define linkonce_odr void @_Z2f2v() #1 comdat !dbg 0 !9 { entry: call void @_Z2f1v(), !dbg !19 ret void, !dbg !20 Index: test/Transforms/Inline/inline-cold-callee.ll =================================================================== --- test/Transforms/Inline/inline-cold-callee.ll +++ test/Transforms/Inline/inline-cold-callee.ll @@ -5,7 +5,7 @@ ; A callee with identical body does gets inlined because cost fits within the ; inline-threshold -define i32 @callee1(i32 %x) !prof !1 { +define i32 @callee1(i32 %x) !prof 0 !1 { %x1 = add i32 %x, 1 %x2 = add i32 %x1, 1 %x3 = add i32 %x2, 1 @@ -13,7 +13,7 @@ ret i32 %x3 } -define i32 @callee2(i32 %x) !prof !2 { +define i32 @callee2(i32 %x) !prof 0 !2 { ; CHECK-LABEL: @callee2( %x1 = add i32 %x, 1 %x2 = add i32 %x1, 1 @@ -22,7 +22,7 @@ ret i32 %x3 } -define i32 @caller2(i32 %y1) !prof !2 { +define i32 @caller2(i32 %y1) !prof 0 !2 { ; CHECK-LABEL: @caller2( ; CHECK: call i32 @callee2 ; CHECK-NOT: call i32 @callee1 Index: test/Transforms/Inline/inline-hot-callee.ll =================================================================== --- test/Transforms/Inline/inline-hot-callee.ll +++ test/Transforms/Inline/inline-hot-callee.ll @@ -5,7 +5,7 @@ ; A cold callee with identical body does not get inlined because cost exceeds the ; inline-threshold -define i32 @callee1(i32 %x) !prof !1 { +define i32 @callee1(i32 %x) !prof 0 !1 { %x1 = add i32 %x, 1 %x2 = add i32 %x1, 1 %x3 = add i32 %x2, 1 @@ -13,7 +13,7 @@ ret i32 %x3 } -define i32 @callee2(i32 %x) !prof !2 { +define i32 @callee2(i32 %x) !prof 0 !2 { ; CHECK-LABEL: @callee2( %x1 = add i32 %x, 1 %x2 = add i32 %x1, 1 @@ -22,7 +22,7 @@ ret i32 %x3 } -define i32 @caller2(i32 %y1) !prof !2 { +define i32 @caller2(i32 %y1) !prof 0 !2 { ; CHECK-LABEL: @caller2( ; CHECK: call i32 @callee2 ; CHECK-NOT: call i32 @callee1 Index: test/Transforms/Inline/inline_dbg_declare.ll =================================================================== --- test/Transforms/Inline/inline_dbg_declare.ll +++ test/Transforms/Inline/inline_dbg_declare.ll @@ -23,7 +23,7 @@ target triple = "i686-pc-windows-msvc" ; Function Attrs: nounwind -define float @foo(float %x) #0 !dbg !4 { +define float @foo(float %x) #0 !dbg 0 !4 { entry: %x.addr = alloca float, align 4 store float %x, float* %x.addr, align 4 @@ -38,7 +38,7 @@ ; CHECK: define void @bar ; Function Attrs: nounwind -define void @bar(float* %dst) #0 !dbg !9 { +define void @bar(float* %dst) #0 !dbg 0 !9 { entry: ; CHECK: [[x_addr_i:%[a-zA-Z0-9.]+]] = alloca float, align 4 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 @@ -7,7 +7,7 @@ ; fine to delete this testcase. However, we would need a bitcode upgrade since ; such historical IR exists in practice. -define i32 @foo(i32 %i) !dbg !4 { +define i32 @foo(i32 %i) !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32 %add, i64 0, metadata !8, metadata !10), !dbg !11 %add = add nsw i32 1, %i, !dbg !12 Index: test/Transforms/InstCombine/debug-line.ll =================================================================== --- test/Transforms/InstCombine/debug-line.ll +++ test/Transforms/InstCombine/debug-line.ll @@ -3,7 +3,7 @@ @.str = private constant [3 x i8] c"%c\00" -define void @foo() nounwind ssp !dbg !0 { +define void @foo() nounwind ssp !dbg 0 !0 { ;CHECK: call i32 @putchar{{.+}} !dbg %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 97), !dbg !5 ret void, !dbg !7 Index: test/Transforms/InstCombine/debuginfo.ll =================================================================== --- test/Transforms/InstCombine/debuginfo.ll +++ test/Transforms/InstCombine/debuginfo.ll @@ -6,7 +6,7 @@ declare i8* @foo(i8*, i32, i64, i64) nounwind -define hidden i8* @foobar(i8* %__dest, i32 %__val, i64 %__len) nounwind inlinehint ssp !dbg !1 { +define hidden i8* @foobar(i8* %__dest, i32 %__val, i64 %__len) nounwind inlinehint ssp !dbg 0 !1 { entry: %__dest.addr = alloca i8*, align 8 %__val.addr = alloca i32, align 4 Index: test/Transforms/InstCombine/lifetime.ll =================================================================== --- test/Transforms/InstCombine/lifetime.ll +++ test/Transforms/InstCombine/lifetime.ll @@ -5,7 +5,7 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) declare void @foo(i8* nocapture, i8* nocapture) -define void @bar(i1 %flag) !dbg !4 { +define void @bar(i1 %flag) !dbg 0 !4 { entry: ; CHECK-LABEL: @bar( ; CHECK: %[[T:[^ ]+]] = getelementptr inbounds [1 x i8], [1 x i8]* %text Index: test/Transforms/JumpThreading/update-edge-weight.ll =================================================================== --- test/Transforms/JumpThreading/update-edge-weight.ll +++ test/Transforms/JumpThreading/update-edge-weight.ll @@ -4,7 +4,7 @@ ; CHECK: !2 = !{!"branch_weights", i32 1629125526, i32 518358122} -define void @foo(i32 %n) !prof !0 { +define void @foo(i32 %n) !prof 0 !0 { entry: %cmp = icmp sgt i32 %n, 10 br i1 %cmp, label %if.then.1, label %if.else.1, !prof !1 Index: test/Transforms/LoopDataPrefetch/AArch64/opt-remark.ll =================================================================== --- test/Transforms/LoopDataPrefetch/AArch64/opt-remark.ll +++ test/Transforms/LoopDataPrefetch/AArch64/opt-remark.ll @@ -26,7 +26,7 @@ @my_struct = common global %struct.MyStruct* null, align 8 -define i32 @f(%struct.MyStruct* nocapture readnone %p, i32 %N) !dbg !6 { +define i32 @f(%struct.MyStruct* nocapture readnone %p, i32 %N) !dbg 0 !6 { entry: %cmp6 = icmp sgt i32 %N, 0, !dbg !8 br i1 %cmp6, label %for.body.lr.ph, label %for.cond.cleanup, !dbg !9 Index: test/Transforms/LoopDistribute/diagnostics.ll =================================================================== --- test/Transforms/LoopDistribute/diagnostics.ll +++ test/Transforms/LoopDistribute/diagnostics.ll @@ -36,7 +36,7 @@ ; ALWAYS: remark: /tmp/t.c:3:3: loop not distributed: memory operations are safe for vectorization ; ALWAYS: warning: /tmp/t.c:3:3: loop not disributed: failed explicitly specified loop distribution -define void @forced(i8* %A, i8* %B, i8* %C, i32 %N) !dbg !7 { +define void @forced(i8* %A, i8* %B, i8* %C, i32 %N) !dbg 0 !7 { entry: %cmp12 = icmp sgt i32 %N, 0, !dbg !9 br i1 %cmp12, label %ph, label %for.cond.cleanup, !dbg !10 @@ -67,7 +67,7 @@ ; ANALYSIS_REMARKS: remark: /tmp/t.c:9:3: loop not distributed: memory operations are safe for vectorization ; ALWAYS-NOT: warning: /tmp/t.c:9:3: loop not disributed: failed explicitly specified loop distribution -define void @not_forced(i8* %A, i8* %B, i8* %C, i32 %N) !dbg !22 { +define void @not_forced(i8* %A, i8* %B, i8* %C, i32 %N) !dbg 0 !22 { entry: %cmp12 = icmp sgt i32 %N, 0, !dbg !23 br i1 %cmp12, label %ph, label %for.cond.cleanup, !dbg !24 @@ -95,7 +95,7 @@ ; REMARKS: remark: /tmp/t.c:15:3: distributed loop -define void @success(i8* %A, i8* %B, i8* %C, i8* %D, i8* %E, i32 %N) !dbg !31 { +define void @success(i8* %A, i8* %B, i8* %C, i8* %D, i8* %E, i32 %N) !dbg 0 !31 { entry: %cmp28 = icmp sgt i32 %N, 0, !dbg !32 br i1 %cmp28, label %ph, label %for.cond.cleanup, !dbg !33 Index: test/Transforms/LoopIdiom/debug-line.ll =================================================================== --- test/Transforms/LoopIdiom/debug-line.ll +++ test/Transforms/LoopIdiom/debug-line.ll @@ -3,7 +3,7 @@ target triple = "x86_64-apple-darwin10.0.0" -define void @foo(double* nocapture %a) nounwind ssp !dbg !0 { +define void @foo(double* nocapture %a) nounwind ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata double* %a, i64 0, metadata !5, metadata !DIExpression()), !dbg !8 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !10, metadata !DIExpression()), !dbg !14 Index: test/Transforms/LoopReroll/reroll_with_dbg.ll =================================================================== --- test/Transforms/LoopReroll/reroll_with_dbg.ll +++ test/Transforms/LoopReroll/reroll_with_dbg.ll @@ -11,7 +11,7 @@ target triple = "armv4t--linux-gnueabi" ; Function Attrs: nounwind -define void @foo(float* noalias nocapture %a, float* noalias nocapture readonly %b, i32 %n) #0 !dbg !4 { +define void @foo(float* noalias nocapture %a, float* noalias nocapture readonly %b, i32 %n) #0 !dbg 0 !4 { entry: ;CHECK-LABEL: @foo Index: test/Transforms/LoopRotate/dbgvalue.ll =================================================================== --- test/Transforms/LoopRotate/dbgvalue.ll +++ test/Transforms/LoopRotate/dbgvalue.ll @@ -3,7 +3,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone -define i32 @tak(i32 %x, i32 %y, i32 %z) nounwind ssp !dbg !0 { +define i32 @tak(i32 %x, i32 %y, i32 %z) nounwind ssp !dbg 0 !0 { ; CHECK-LABEL: define i32 @tak( ; CHECK: entry ; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 %x @@ -38,7 +38,7 @@ ret i32 %z.tr, !dbg !17 } -define i32 @tak2(i32 %x, i32 %y, i32 %z) nounwind ssp !dbg !0 { +define i32 @tak2(i32 %x, i32 %y, i32 %z) nounwind ssp !dbg 0 !0 { ; CHECK-LABEL: define i32 @tak2( ; CHECK: entry ; CHECK: tail call void @llvm.dbg.value(metadata i32 %x.tr Index: test/Transforms/LoopSimplify/dbg-loc.ll =================================================================== --- test/Transforms/LoopSimplify/dbg-loc.ll +++ test/Transforms/LoopSimplify/dbg-loc.ll @@ -16,7 +16,7 @@ ; CHECK: for.end.loopexit: ; CHECK-NEXT: br label %for.end, !dbg [[LOOPEXIT_LOC:![0-9]+]] -define linkonce_odr hidden void @foo(%"Length"* %begin, %"Length"* %end) nounwind ssp uwtable align 2 !dbg !6 { +define linkonce_odr hidden void @foo(%"Length"* %begin, %"Length"* %end) nounwind ssp uwtable align 2 !dbg 0 !6 { entry: %cmp.4 = icmp eq %"Length"* %begin, %end, !dbg !7 br i1 %cmp.4, label %for.end, label %for.body, !dbg !8 Index: test/Transforms/LoopUnroll/runtime-loop1.ll =================================================================== --- test/Transforms/LoopUnroll/runtime-loop1.ll +++ test/Transforms/LoopUnroll/runtime-loop1.ll @@ -31,7 +31,7 @@ ; PROLOG-DAG: [[PH_LOC]] = !DILocation(line: 101, column: 1, scope: !{{.*}}) ; PROLOG-DAG: [[BODY_LOC]] = !DILocation(line: 102, column: 1, scope: !{{.*}}) -define i32 @test(i32* nocapture %a, i32 %n) nounwind uwtable readonly !dbg !6 { +define i32 @test(i32* nocapture %a, i32 %n) nounwind uwtable readonly !dbg 0 !6 { entry: %cmp1 = icmp eq i32 %n, 0, !dbg !7 br i1 %cmp1, label %for.end, label %for.body, !dbg !7 Index: test/Transforms/LoopUnswitch/cold-loop.ll =================================================================== --- test/Transforms/LoopUnswitch/cold-loop.ll +++ test/Transforms/LoopUnswitch/cold-loop.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -loop-unswitch -loop-unswitch-with-block-frequency -S 2>&1 | FileCheck %s ;; trivial condition should be unswithed regardless of coldness. -define i32 @test1(i1 %cond1, i1 %cond2) !prof !1 { +define i32 @test1(i1 %cond1, i1 %cond2) !prof 0 !1 { br i1 %cond1, label %loop_begin, label %loop_exit, !prof !0 loop_begin: @@ -17,7 +17,7 @@ } ;; cold non-trivial condition should not be unswitched. -define i32 @test2(i32* %var, i1 %cond1, i1 %cond2) !prof !1 { +define i32 @test2(i32* %var, i1 %cond1, i1 %cond2) !prof 0 !1 { br i1 %cond1, label %loop_begin, label %loop_exit, !prof !0 loop_begin: Index: test/Transforms/LoopVectorize/X86/no_fpmath.ll =================================================================== --- test/Transforms/LoopVectorize/X86/no_fpmath.ll +++ test/Transforms/LoopVectorize/X86/no_fpmath.ll @@ -8,7 +8,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind readonly ssp uwtable -define double @cond_sum(i32* nocapture readonly %v, i32 %n) #0 !dbg !4 { +define double @cond_sum(i32* nocapture readonly %v, i32 %n) #0 !dbg 0 !4 { entry: %cmp.7 = icmp sgt i32 %n, 0, !dbg !3 br i1 %cmp.7, label %for.body.preheader, label %for.cond.cleanup, !dbg !8 @@ -39,7 +39,7 @@ } ; Function Attrs: nounwind readonly ssp uwtable -define double @cond_sum_loop_hint(i32* nocapture readonly %v, i32 %n) #0 !dbg !20 { +define double @cond_sum_loop_hint(i32* nocapture readonly %v, i32 %n) #0 !dbg 0 !20 { entry: %cmp.7 = icmp sgt i32 %n, 0, !dbg !19 br i1 %cmp.7, label %for.body.preheader, label %for.cond.cleanup, !dbg !21 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 @@ -45,7 +45,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind optsize ssp uwtable -define void @_Z4testPii(i32* nocapture %A, i32 %Length) #0 !dbg !4 { +define void @_Z4testPii(i32* nocapture %A, i32 %Length) #0 !dbg 0 !4 { entry: %cmp10 = icmp sgt i32 %Length, 0, !dbg !12 br i1 %cmp10, label %for.body, label %for.end, !dbg !12, !llvm.loop !14 @@ -68,7 +68,7 @@ } ; Function Attrs: nounwind optsize ssp uwtable -define void @_Z13test_disabledPii(i32* nocapture %A, i32 %Length) #0 !dbg !7 { +define void @_Z13test_disabledPii(i32* nocapture %A, i32 %Length) #0 !dbg 0 !7 { entry: %cmp4 = icmp sgt i32 %Length, 0, !dbg !25 br i1 %cmp4, label %for.body, label %for.end, !dbg !25, !llvm.loop !27 @@ -88,7 +88,7 @@ } ; Function Attrs: nounwind optsize ssp uwtable -define void @_Z17test_array_boundsPiS_i(i32* nocapture %A, i32* nocapture readonly %B, i32 %Length) #0 !dbg !8 { +define void @_Z17test_array_boundsPiS_i(i32* nocapture %A, i32* nocapture readonly %B, i32 %Length) #0 !dbg 0 !8 { entry: %cmp9 = icmp sgt i32 %Length, 0, !dbg !32 br i1 %cmp9, label %for.body.preheader, label %for.end, !dbg !32, !llvm.loop !34 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 @@ -23,7 +23,7 @@ target triple = "x86_64-apple-macosx10.10.0" ; Function Attrs: nounwind uwtable -define void @do_not_interleave(float** noalias nocapture readonly %in, float* noalias nocapture %out, i32 %size) #0 !dbg !4 { +define void @do_not_interleave(float** noalias nocapture readonly %in, float* noalias nocapture %out, i32 %size) #0 !dbg 0 !4 { entry: %cmp.4 = icmp eq i32 %size, 0, !dbg !10 br i1 %cmp.4, label %for.end, label %for.body.preheader, !dbg !11 @@ -53,7 +53,7 @@ } ; Function Attrs: nounwind uwtable -define void @interleave_not_profitable(float** noalias nocapture readonly %in, float* noalias nocapture %out, i32 %size) #0 !dbg !6 { +define void @interleave_not_profitable(float** noalias nocapture readonly %in, float* noalias nocapture %out, i32 %size) #0 !dbg 0 !6 { entry: %cmp.4 = icmp eq i32 %size, 0, !dbg !20 br i1 %cmp.4, label %for.end, label %for.body, !dbg !21 Index: test/Transforms/LoopVectorize/X86/vectorization-remarks.ll =================================================================== --- test/Transforms/LoopVectorize/X86/vectorization-remarks.ll +++ test/Transforms/LoopVectorize/X86/vectorization-remarks.ll @@ -12,7 +12,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -define i32 @foo(i32 %n) #0 !dbg !4 { +define i32 @foo(i32 %n) #0 !dbg 0 !4 { entry: %diff = alloca i32, align 4 %cb = alloca [16 x i8], align 16 Index: test/Transforms/LoopVectorize/conditional-assignment.ll =================================================================== --- test/Transforms/LoopVectorize/conditional-assignment.ll +++ test/Transforms/LoopVectorize/conditional-assignment.ll @@ -6,7 +6,7 @@ target triple = "x86_64-apple-macosx10.9.0" ; Function Attrs: nounwind ssp uwtable -define void @conditional_store(i32* noalias nocapture %indices) #0 !dbg !4 { +define void @conditional_store(i32* noalias nocapture %indices) #0 !dbg 0 !4 { entry: br label %for.body, !dbg !10 Index: test/Transforms/LoopVectorize/control-flow.ll =================================================================== --- test/Transforms/LoopVectorize/control-flow.ll +++ test/Transforms/LoopVectorize/control-flow.ll @@ -20,7 +20,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind optsize ssp uwtable -define i32 @_Z4testPii(i32* nocapture %A, i32 %Length) #0 !dbg !4 { +define i32 @_Z4testPii(i32* nocapture %A, i32 %Length) #0 !dbg 0 !4 { entry: %cmp8 = icmp sgt i32 %Length, 0, !dbg !10 br i1 %cmp8, label %for.body.preheader, label %end, !dbg !10 Index: test/Transforms/LoopVectorize/dbg.value.ll =================================================================== --- test/Transforms/LoopVectorize/dbg.value.ll +++ test/Transforms/LoopVectorize/dbg.value.ll @@ -4,12 +4,12 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.8.0" -@A = global [1024 x i32] zeroinitializer, align 16 -@B = global [1024 x i32] zeroinitializer, align 16 -@C = global [1024 x i32] zeroinitializer, align 16 +@A = global [1024 x i32] zeroinitializer, align 16, !dbg 0 !12 +@B = global [1024 x i32] zeroinitializer, align 16, !dbg 0 !16 +@C = global [1024 x i32] zeroinitializer, align 16, !dbg 0 !17 ; CHECK-LABEL: @test( -define i32 @test() #0 !dbg !3 { +define i32 @test() #0 !dbg 0 !3 { entry: tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !DIExpression()), !dbg !18 br label %for.body, !dbg !18 @@ -55,12 +55,12 @@ !9 = !DILocalVariable(name: "i", line: 6, scope: !10, file: !4, type: !7) !10 = distinct !DILexicalBlock(line: 6, column: 0, file: !25, scope: !3) !11 = !{!12, !16, !17} -!12 = !DIGlobalVariable(name: "A", line: 1, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @A) +!12 = !DIGlobalVariable(name: "A", line: 1, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13) !13 = !DICompositeType(tag: DW_TAG_array_type, size: 32768, align: 32, baseType: !7, elements: !14) !14 = !{!15} !15 = !{i32 786465, i64 0, i64 1024} -!16 = !DIGlobalVariable(name: "B", line: 2, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @B) -!17 = !DIGlobalVariable(name: "C", line: 3, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13, variable: [1024 x i32]* @C) +!16 = !DIGlobalVariable(name: "B", line: 2, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13) +!17 = !DIGlobalVariable(name: "C", line: 3, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13) !18 = !DILocation(line: 6, scope: !10) !19 = !DILocation(line: 7, scope: !20) !20 = distinct !DILexicalBlock(line: 6, column: 0, file: !25, scope: !10) Index: test/Transforms/LoopVectorize/debugloc.ll =================================================================== --- test/Transforms/LoopVectorize/debugloc.ll +++ test/Transforms/LoopVectorize/debugloc.ll @@ -17,7 +17,7 @@ ; CHECK: add <2 x i32> %{{.*}}, %rdx.shuf, !dbg ![[LOC2]] ; CHECK: extractelement <2 x i32> %bin.rdx, i32 0, !dbg ![[LOC2]] -define i32 @f(i32* nocapture %a, i32 %size) #0 !dbg !4 { +define i32 @f(i32* nocapture %a, i32 %size) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata i32* %a, i64 0, metadata !13, metadata !DIExpression()), !dbg !19 tail call void @llvm.dbg.value(metadata i32 %size, i64 0, metadata !14, metadata !DIExpression()), !dbg !19 Index: test/Transforms/LoopVectorize/no_array_bounds.ll =================================================================== --- test/Transforms/LoopVectorize/no_array_bounds.ll +++ test/Transforms/LoopVectorize/no_array_bounds.ll @@ -17,7 +17,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind ssp uwtable -define void @_Z4testPiS_i(i32* nocapture %A, i32* nocapture %B, i32 %number) #0 !dbg !4 { +define void @_Z4testPiS_i(i32* nocapture %A, i32* nocapture %B, i32 %number) #0 !dbg 0 !4 { entry: %cmp25 = icmp sgt i32 %number, 0, !dbg !10 br i1 %cmp25, label %for.body.preheader, label %for.end15, !dbg !10, !llvm.loop !12 Index: test/Transforms/LoopVectorize/no_switch.ll =================================================================== --- test/Transforms/LoopVectorize/no_switch.ll +++ test/Transforms/LoopVectorize/no_switch.ll @@ -19,7 +19,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind optsize ssp uwtable -define void @_Z11test_switchPii(i32* nocapture %A, i32 %Length) #0 !dbg !4 { +define void @_Z11test_switchPii(i32* nocapture %A, i32 %Length) #0 !dbg 0 !4 { entry: %cmp18 = icmp sgt i32 %Length, 0, !dbg !10 br i1 %cmp18, label %for.body.preheader, label %for.end, !dbg !10, !llvm.loop !12 Index: test/Transforms/LoopVectorize/unsafe-dep-remark.ll =================================================================== --- test/Transforms/LoopVectorize/unsafe-dep-remark.ll +++ test/Transforms/LoopVectorize/unsafe-dep-remark.ll @@ -14,7 +14,7 @@ ; CHECK: remark: /tmp/kk.c:3:16: loop not vectorized: unsafe dependent memory operations in loop. Use #pragma loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop -define void @success(i8* nocapture %A, i8* nocapture readonly %B, i8* nocapture %C, i8* nocapture readonly %D, i8* nocapture readonly %E, i32 %N) !dbg !6 { +define void @success(i8* nocapture %A, i8* nocapture readonly %B, i8* nocapture %C, i8* nocapture readonly %D, i8* nocapture readonly %E, i32 %N) !dbg 0 !6 { entry: %cmp28 = icmp sgt i32 %N, 0, !dbg !8 br i1 %cmp28, label %for.body, label %for.cond.cleanup, !dbg !9 Index: test/Transforms/Mem2Reg/ConvertDebugInfo.ll =================================================================== --- test/Transforms/Mem2Reg/ConvertDebugInfo.ll +++ test/Transforms/Mem2Reg/ConvertDebugInfo.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -mem2reg -S | FileCheck %s -define double @testfunc(i32 %i, double %j) nounwind ssp !dbg !1 { +define double @testfunc(i32 %i, double %j) nounwind ssp !dbg 0 !1 { entry: %i_addr = alloca i32 ; [#uses=2] %j_addr = alloca double ; [#uses=2] Index: test/Transforms/Mem2Reg/ConvertDebugInfo2.ll =================================================================== --- test/Transforms/Mem2Reg/ConvertDebugInfo2.ll +++ test/Transforms/Mem2Reg/ConvertDebugInfo2.ll @@ -4,7 +4,7 @@ declare void @foo(i32, i64, i8*) -define void @baz(i32 %a) nounwind ssp !dbg !1 { +define void @baz(i32 %a) nounwind ssp !dbg 0 !1 { ; CHECK-LABEL: entry: ; CHECK-NEXT: %"alloca point" = bitcast i32 0 to i32{{$}} ; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 %a,{{.*}}, !dbg 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 @@ -34,7 +34,7 @@ @"\01L_OBJC_SELECTOR_REFERENCES_5" = internal global i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_OBJC_METH_VAR_NAME_4", i64 0, i64 0), section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip" @llvm.used = appending global [6 x i8*] [i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_" to i8*), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_OBJC_METH_VAR_NAME_", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_" to i8*), i8* bitcast (%struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_1" to i8*), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @"\01L_OBJC_METH_VAR_NAME_4", i32 0, i32 0), i8* bitcast (i8** @"\01L_OBJC_SELECTOR_REFERENCES_5" to i8*)], section "llvm.metadata" -define i32 @main() uwtable ssp personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) !dbg !5 { +define i32 @main() uwtable ssp personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) !dbg 0 !5 { entry: %tmp = load %struct._class_t*, %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_", align 8, !dbg !37 %tmp1 = load i8*, i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !dbg !37, !invariant.load !38 @@ -84,7 +84,7 @@ declare void @objc_exception_rethrow() -define internal fastcc void @ThrowFunc(i8* %obj) uwtable noinline ssp !dbg !27 { +define internal fastcc void @ThrowFunc(i8* %obj) uwtable noinline ssp !dbg 0 !27 { entry: %tmp = call i8* @objc_retain(i8* %obj) nounwind call void @llvm.dbg.value(metadata i8* %obj, i64 0, metadata !32, metadata !DIExpression()), !dbg !55 Index: test/Transforms/PGOProfile/icp_invoke.ll =================================================================== --- test/Transforms/PGOProfile/icp_invoke.ll +++ test/Transforms/PGOProfile/icp_invoke.ll @@ -6,12 +6,12 @@ @foo2 = global i32 ()* null, align 8 @_ZTIi = external constant i8* -define internal void @_ZL4bar1v() !PGOFuncName !0 { +define internal void @_ZL4bar1v() !PGOFuncName 0 !0 { entry: ret void } -define internal i32 @_ZL4bar2v() !PGOFuncName !1 { +define internal i32 @_ZL4bar2v() !PGOFuncName 0 !1 { entry: ret i32 100 } Index: test/Transforms/SLPVectorizer/X86/debug_info.ll =================================================================== --- test/Transforms/SLPVectorizer/X86/debug_info.ll +++ test/Transforms/SLPVectorizer/X86/debug_info.ll @@ -21,7 +21,7 @@ ;CHECK: ![[LOC]] = !DILocation(line: 4, scope: ;CHECK: ![[LOC2]] = !DILocation(line: 7, scope: -define i32 @depth(double* nocapture %A, i32 %m) #0 !dbg !4 { +define i32 @depth(double* nocapture %A, i32 %m) #0 !dbg 0 !4 { entry: tail call void @llvm.dbg.value(metadata double* %A, i64 0, metadata !12, metadata !DIExpression()), !dbg !19 tail call void @llvm.dbg.value(metadata i32 %m, i64 0, metadata !13, metadata !DIExpression()), !dbg !19 Index: test/Transforms/SafeStack/debug-loc.ll =================================================================== --- test/Transforms/SafeStack/debug-loc.ll +++ test/Transforms/SafeStack/debug-loc.ll @@ -8,7 +8,7 @@ %struct.S = type { [100 x i8] } ; Function Attrs: safestack uwtable -define void @f(%struct.S* byval align 8 %zzz) #0 !dbg !12 { +define void @f(%struct.S* byval align 8 %zzz) #0 !dbg 0 !12 { ; CHECK: define void @f entry: Index: test/Transforms/SampleProfile/branch.ll =================================================================== --- test/Transforms/SampleProfile/branch.ll +++ test/Transforms/SampleProfile/branch.ll @@ -28,7 +28,7 @@ @.str = private unnamed_addr constant [15 x i8] c"result is %lf\0A\00", align 1 ; Function Attrs: uwtable -define i32 @main(i32 %argc, i8** %argv) #0 !dbg !6 { +define i32 @main(i32 %argc, i8** %argv) #0 !dbg 0 !6 { ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'main': entry: Index: test/Transforms/SampleProfile/calls.ll =================================================================== --- test/Transforms/SampleProfile/calls.ll +++ test/Transforms/SampleProfile/calls.ll @@ -19,7 +19,7 @@ @.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @_Z3sumii(i32 %x, i32 %y) !dbg !4 { +define i32 @_Z3sumii(i32 %x, i32 %y) !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 %y.addr = alloca i32, align 4 @@ -32,7 +32,7 @@ } ; Function Attrs: uwtable -define i32 @main() !dbg !7 { +define i32 @main() !dbg 0 !7 { entry: %retval = alloca i32, align 4 %s = alloca i32, align 4 Index: test/Transforms/SampleProfile/cov-zero-samples.ll =================================================================== --- test/Transforms/SampleProfile/cov-zero-samples.ll +++ test/Transforms/SampleProfile/cov-zero-samples.ll @@ -12,11 +12,11 @@ ; Coverage for this profile should be 100% ; CHECK-NOT: warning: cov-zero-samples.cc:1: -@N = global i64 8000000000, align 8 +@N = global i64 8000000000, align 8, !dbg 0 !12 @.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @_Z12never_calledi(i32 %i) !dbg !4 { +define i32 @_Z12never_calledi(i32 %i) !dbg 0 !4 { entry: ret i32 0, !dbg !32 } @@ -25,7 +25,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) ; Function Attrs: norecurse uwtable -define i32 @main() !dbg !8 { +define i32 @main() !dbg 0 !8 { entry: %retval = alloca i32, align 4 %sum = alloca i32, align 4 @@ -97,7 +97,7 @@ !9 = !DISubroutineType(types: !10) !10 = !{!7} !11 = !{!12} -!12 = !DIGlobalVariable(name: "N", scope: !0, file: !1, line: 3, type: !13, isLocal: false, isDefinition: true, variable: i64* @N) +!12 = !DIGlobalVariable(name: "N", scope: !0, file: !1, line: 3, type: !13, isLocal: false, isDefinition: true) !13 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !14) !14 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !15 = !{i32 2, !"Dwarf Version", i32 4} Index: test/Transforms/SampleProfile/coverage-warning.ll =================================================================== --- test/Transforms/SampleProfile/coverage-warning.ll +++ test/Transforms/SampleProfile/coverage-warning.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/coverage-warning.prof -sample-profile-check-record-coverage=90 -sample-profile-check-sample-coverage=100 -o /dev/null 2>&1 | FileCheck %s -define i32 @foo(i32 %i) !dbg !4 { +define i32 @foo(i32 %i) !dbg 0 !4 { ; The profile has samples for line locations that are no longer present. ; Coverage does not reach 90%, so we should get this warning: ; Index: test/Transforms/SampleProfile/discriminator.ll =================================================================== --- test/Transforms/SampleProfile/discriminator.ll +++ test/Transforms/SampleProfile/discriminator.ll @@ -21,7 +21,7 @@ ; This means that the predicate 'i < 5' (line 3) is executed 100 times, ; but the then branch (line 3.1) is only executed 5 times. -define i32 @foo(i32 %i) #0 !dbg !4 { +define i32 @foo(i32 %i) #0 !dbg 0 !4 { ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'foo': entry: %i.addr = alloca i32, align 4 Index: test/Transforms/SampleProfile/entry_counts.ll =================================================================== --- test/Transforms/SampleProfile/entry_counts.ll +++ test/Transforms/SampleProfile/entry_counts.ll @@ -3,7 +3,7 @@ ; According to the profile, function empty() was called 13,293 times. ; CHECK: {{.*}} = !{!"function_entry_count", i64 13293} -define void @empty() !dbg !4 { +define void @empty() !dbg 0 !4 { entry: ret void, !dbg !9 } Index: test/Transforms/SampleProfile/fnptr.ll =================================================================== --- test/Transforms/SampleProfile/fnptr.ll +++ test/Transforms/SampleProfile/fnptr.ll @@ -46,7 +46,7 @@ @.str = private unnamed_addr constant [9 x i8] c"S = %lf\0A\00", align 1 -define double @_Z3fooi(i32 %x) #0 !dbg !3 { +define double @_Z3fooi(i32 %x) #0 !dbg 0 !3 { entry: %conv = sitofp i32 %x to double, !dbg !2 %call = tail call double @sin(double %conv) #3, !dbg !8 @@ -56,7 +56,7 @@ declare double @sin(double) #1 -define double @_Z3bari(i32 %x) #0 !dbg !10 { +define double @_Z3bari(i32 %x) #0 !dbg 0 !10 { entry: %conv = sitofp i32 %x to double, !dbg !9 %call = tail call double @cos(double %conv) #3, !dbg !11 @@ -66,7 +66,7 @@ declare double @cos(double) #1 -define i32 @main() #2 !dbg !13 { +define i32 @main() #2 !dbg 0 !13 { entry: br label %for.cond1.preheader, !dbg !12 Index: test/Transforms/SampleProfile/gcc-simple.ll =================================================================== --- test/Transforms/SampleProfile/gcc-simple.ll +++ test/Transforms/SampleProfile/gcc-simple.ll @@ -24,8 +24,8 @@ ; $ perf record -b ./gcc-simple ; $ create_gcov --binary=gcc-simple --gcov=gcc-simple.afdo -define i64 @_Z3fool(i64 %i) #0 !dbg !4 { -; CHECK: !prof ![[EC1:[0-9]+]] +define i64 @_Z3fool(i64 %i) #0 !dbg 0 !4 { +; CHECK: !prof 0 ![[EC1:[0-9]+]] entry: %retval = alloca i64, align 8 %i.addr = alloca i64, align 8 @@ -66,8 +66,8 @@ declare i32 @rand() #2 ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !9 { -; CHECK: !prof ![[EC2:[0-9]+]] +define i32 @main() #0 !dbg 0 !9 { +; CHECK: !prof 0 ![[EC2:[0-9]+]] entry: %retval = alloca i32, align 4 %sum = alloca i64, align 8 Index: test/Transforms/SampleProfile/inline-combine.ll =================================================================== --- test/Transforms/SampleProfile/inline-combine.ll +++ test/Transforms/SampleProfile/inline-combine.ll @@ -15,7 +15,7 @@ $bar = comdat any -define void @foo(%"class.llvm::FoldingSetNodeID"* %this) comdat align 2 !dbg !3 { +define void @foo(%"class.llvm::FoldingSetNodeID"* %this) comdat align 2 !dbg 0 !3 { %1 = alloca %"class.llvm::FoldingSetNodeID"*, align 8 store %"class.llvm::FoldingSetNodeID"* %this, %"class.llvm::FoldingSetNodeID"** %1, align 8 %2 = load %"class.llvm::FoldingSetNodeID"*, %"class.llvm::FoldingSetNodeID"** %1, align 8 @@ -26,7 +26,7 @@ ret void } -define void @bar(%"class.llvm::SmallVectorImpl"* %this) comdat align 2 !dbg !8 { +define void @bar(%"class.llvm::SmallVectorImpl"* %this) comdat align 2 !dbg 0 !8 { ret void } Index: test/Transforms/SampleProfile/inline-coverage.ll =================================================================== --- test/Transforms/SampleProfile/inline-coverage.ll +++ test/Transforms/SampleProfile/inline-coverage.ll @@ -31,7 +31,7 @@ ; 110% coverage check. ; CHECK: warning: coverage.cc:7: 78834 of 78834 available profile samples (100%) were applied -define i64 @_Z3fool(i64 %i) !dbg !4 { +define i64 @_Z3fool(i64 %i) !dbg 0 !4 { entry: %i.addr = alloca i64, align 8 store i64 %i, i64* %i.addr, align 8 @@ -47,7 +47,7 @@ declare i32 @rand() -define i32 @main() !dbg !9 { +define i32 @main() !dbg 0 !9 { entry: %retval = alloca i32, align 4 %sum = alloca i64, align 8 Index: test/Transforms/SampleProfile/inline-hint.ll =================================================================== --- test/Transforms/SampleProfile/inline-hint.ll +++ test/Transforms/SampleProfile/inline-hint.ll @@ -1,13 +1,13 @@ ; RUN: opt %s -sample-profile -sample-profile-file=%S/Inputs/inline-hint.prof -pass-remarks=sample-profile -o /dev/null 2>&1 | FileCheck %s ; ; CHECK: Applied cold hint to globally cold function '_Z7cold_fnRxi' with 0.1 -define void @_Z7cold_fnRxi() !dbg !4 { +define void @_Z7cold_fnRxi() !dbg 0 !4 { entry: ret void, !dbg !29 } ; CHECK: Applied inline hint to globally hot function '_Z6hot_fnRxi' with 70.0 -define void @_Z6hot_fnRxi() #0 !dbg !10 { +define void @_Z6hot_fnRxi() #0 !dbg 0 !10 { entry: ret void, !dbg !38 } Index: test/Transforms/SampleProfile/inline.ll =================================================================== --- test/Transforms/SampleProfile/inline.ll +++ test/Transforms/SampleProfile/inline.ll @@ -19,7 +19,7 @@ @.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @_Z3sumii(i32 %x, i32 %y) !dbg !4 { +define i32 @_Z3sumii(i32 %x, i32 %y) !dbg 0 !4 { entry: %x.addr = alloca i32, align 4 %y.addr = alloca i32, align 4 @@ -32,7 +32,7 @@ } ; Function Attrs: uwtable -define i32 @main() !dbg !7 { +define i32 @main() !dbg 0 !7 { entry: %retval = alloca i32, align 4 %s = alloca i32, align 4 Index: test/Transforms/SampleProfile/nolocinfo.ll =================================================================== --- test/Transforms/SampleProfile/nolocinfo.ll +++ test/Transforms/SampleProfile/nolocinfo.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/nolocinfo.prof -S -pass-remarks=sample-profile 2>&1 | FileCheck %s -define i32 @foo(i32 %i) !dbg !4 { +define i32 @foo(i32 %i) !dbg 0 !4 { entry: %i.addr = alloca i32, align 4 %0 = load i32, i32* %i.addr, align 4 Index: test/Transforms/SampleProfile/offset.ll =================================================================== --- test/Transforms/SampleProfile/offset.ll +++ test/Transforms/SampleProfile/offset.ll @@ -19,7 +19,7 @@ ; #5 } ; Function Attrs: nounwind uwtable -define i32 @_Z3fooi(i32 %a) #0 !dbg !4 { +define i32 @_Z3fooi(i32 %a) #0 !dbg 0 !4 { entry: %retval = alloca i32, align 4 %a.addr = alloca i32, align 4 Index: test/Transforms/SampleProfile/propagate.ll =================================================================== --- test/Transforms/SampleProfile/propagate.ll +++ test/Transforms/SampleProfile/propagate.ll @@ -40,7 +40,7 @@ @.str = private unnamed_addr constant [24 x i8] c"foo(%d, %d, %ld) = %ld\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i64 @_Z3fooiil(i32 %x, i32 %y, i64 %N) #0 !dbg !6 { +define i64 @_Z3fooiil(i32 %x, i32 %y, i64 %N) #0 !dbg 0 !6 { entry: %retval = alloca i64, align 8 %x.addr = alloca i32, align 4 @@ -174,7 +174,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: norecurse uwtable -define i32 @main() #2 !dbg !86 { +define i32 @main() #2 !dbg 0 !86 { entry: %retval = alloca i32, align 4 %x = alloca i32, align 4 Index: test/Transforms/SampleProfile/remarks.ll =================================================================== --- test/Transforms/SampleProfile/remarks.ll +++ test/Transforms/SampleProfile/remarks.ll @@ -27,7 +27,7 @@ ; CHECK: remark: remarks.cc:9:15: most popular destination for conditional branches at remarks.cc:6:9 ; Function Attrs: nounwind uwtable -define i64 @_Z3foov() #0 !dbg !4 { +define i64 @_Z3foov() #0 !dbg 0 !4 { entry: %sum = alloca i64, align 8 %i = alloca i32, align 4 @@ -104,7 +104,7 @@ declare void @llvm.lifetime.end(i64, i8* nocapture) #1 ; Function Attrs: nounwind uwtable -define i32 @main() #0 !dbg !13 { +define i32 @main() #0 !dbg 0 !13 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval, align 4 Index: test/Transforms/ScalarRepl/debuginfo-preserved.ll =================================================================== --- test/Transforms/ScalarRepl/debuginfo-preserved.ll +++ test/Transforms/ScalarRepl/debuginfo-preserved.ll @@ -11,7 +11,7 @@ ; CHECK: llvm.dbg.value ; CHECK: llvm.dbg.value -define i32 @f(i32 %a, i32 %b) nounwind ssp !dbg !1 { +define i32 @f(i32 %a, i32 %b) nounwind ssp !dbg 0 !1 { entry: %a.addr = alloca i32, align 4 %b.addr = alloca i32, align 4 Index: test/Transforms/Scalarizer/dbginfo.ll =================================================================== --- test/Transforms/Scalarizer/dbginfo.ll +++ test/Transforms/Scalarizer/dbginfo.ll @@ -2,7 +2,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" ; Function Attrs: nounwind uwtable -define void @f1(<4 x i32>* nocapture %a, <4 x i32>* nocapture readonly %b, <4 x i32>* nocapture readonly %c) #0 !dbg !4 { +define void @f1(<4 x i32>* nocapture %a, <4 x i32>* nocapture readonly %b, <4 x i32>* nocapture readonly %c) #0 !dbg 0 !4 { ; CHECK: @f1( ; CHECK: %a.i0 = bitcast <4 x i32>* %a to i32* ; CHECK: %a.i1 = getelementptr i32, i32* %a.i0, i32 1 Index: test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll =================================================================== --- test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll +++ test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll @@ -9,13 +9,13 @@ ; ModuleID = './csmith107.i.debug.ll' source_filename = "./csmith107.i.debug.ll" -@a = global i16 0 -@b = global i32 0 -@c = global i16* null +@a = global i16 0, !dbg 0 !4 +@b = global i32 0, !dbg 0 !6 +@c = global i16* null, !dbg 0 !10 ; Function Attrs: nounwind -define i16 @fn1() #3 !dbg !15 { +define i16 @fn1() #3 !dbg 0 !15 { bb2: store i32 -1, i32* @b, align 1 %_tmp1.pre = load i16, i16* @a, align 1, !dbg !19 @@ -46,13 +46,13 @@ !1 = !DIFile(filename: "csmith107.i.c", directory: "/tmp") !2 = !{} !3 = !{!4, !6, !10} -!4 = !DIGlobalVariable(name: "a", scope: null, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, variable: i16* @a) +!4 = !DIGlobalVariable(name: "a", scope: null, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true) !5 = !DIBasicType(name: "int", size: 16, align: 16, encoding: DW_ATE_signed) -!6 = !DIGlobalVariable(name: "b", scope: null, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true, variable: i32* @b) +!6 = !DIGlobalVariable(name: "b", scope: null, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true) !7 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32_t", file: !1, line: 1, baseType: !8) !8 = !DIDerivedType(tag: DW_TAG_typedef, name: "__u32_t", file: !1, baseType: !9) !9 = !DIBasicType(name: "unsigned long", size: 32, align: 16, encoding: DW_ATE_unsigned) -!10 = !DIGlobalVariable(name: "c", scope: null, file: !1, line: 4, type: !11, isLocal: false, isDefinition: true, variable: i16** @c) +!10 = !DIGlobalVariable(name: "c", scope: null, file: !1, line: 4, type: !11, isLocal: false, isDefinition: true) !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 16, align: 16) !12 = !{i32 2, !"Dwarf Version", i32 4} !13 = !{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 @@ -4,7 +4,7 @@ @0 = external hidden constant [5 x %0], align 4 -define void @foo(i32) nounwind ssp !dbg !0 { +define void @foo(i32) nounwind ssp !dbg 0 !0 { Entry: %1 = icmp slt i32 %0, 0, !dbg !5 br i1 %1, label %BB5, label %BB1, !dbg !5 Index: test/Transforms/SimplifyCFG/hoist-dbgvalue.ll =================================================================== --- test/Transforms/SimplifyCFG/hoist-dbgvalue.ll +++ test/Transforms/SimplifyCFG/hoist-dbgvalue.ll @@ -1,6 +1,6 @@ ; RUN: opt -simplifycfg -S < %s | FileCheck %s -define i32 @foo(i32 %i) nounwind ssp !dbg !0 { +define i32 @foo(i32 %i) nounwind ssp !dbg 0 !0 { call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !6, metadata !DIExpression()), !dbg !7 call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !DIExpression()), !dbg !11 %1 = icmp ne i32 %i, 0, !dbg !12 Index: test/Transforms/SimplifyCFG/trap-debugloc.ll =================================================================== --- test/Transforms/SimplifyCFG/trap-debugloc.ll +++ test/Transforms/SimplifyCFG/trap-debugloc.ll @@ -1,7 +1,7 @@ ; RUN: opt -S -simplifycfg < %s | FileCheck %s ; Radar 9342286 ; Assign DebugLoc to trap instruction. -define void @foo() nounwind ssp !dbg !0 { +define void @foo() nounwind ssp !dbg 0 !0 { ; CHECK: call void @llvm.trap(), !dbg store i32 42, i32* null, !dbg !5 ret void, !dbg !7 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 @@ -2,9 +2,9 @@ ; CHECK-NOT: call void @llvm.dbg.value -@x = common global i32 0 ; [#uses=0] +@x = common global i32 0, !dbg 0 !8 ; [#uses=0] -define void @foo() nounwind readnone optsize ssp !dbg !0 { +define void @foo() nounwind readnone optsize ssp !dbg 0 !0 { entry: tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !5, metadata !{}), !dbg !10 ret void, !dbg !11 @@ -23,7 +23,7 @@ !5 = !DILocalVariable(name: "y", line: 3, scope: !6, file: !1, type: !7) !6 = distinct !DILexicalBlock(line: 2, column: 0, file: !12, scope: !0) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7, variable: i32* @x) +!8 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7) !9 = !{i32 0} !10 = !DILocation(line: 3, scope: !6) !11 = !DILocation(line: 4, scope: !6) 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 @@ -1,5 +1,5 @@ ; RUN: opt -strip-dead-debug-info -disable-output < %s -define i32 @foo() nounwind ssp !dbg !0 { +define i32 @foo() nounwind ssp !dbg 0 !0 { entry: ret i32 0, !dbg !8 } 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 @@ -4,19 +4,19 @@ ; CHECK-NOT: bar ; CHECK-NOT: abcd -@xyz = global i32 2 +@xyz = global i32 2, !dbg 0 !17 ; Function Attrs: nounwind readnone declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #0 ; Function Attrs: nounwind readnone ssp -define i32 @fn() #1 !dbg !6 { +define i32 @fn() #1 !dbg 0 !6 { entry: ret i32 0, !dbg !18 } ; Function Attrs: nounwind readonly ssp -define i32 @foo(i32 %i) #2 !dbg !10 { +define i32 @foo(i32 %i) #2 !dbg 0 !10 { entry: tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !15, metadata !DIExpression()), !dbg !20 %.0 = load i32, i32* @xyz, align 4 @@ -47,7 +47,7 @@ !14 = distinct !DILexicalBlock(line: 5, column: 0, file: !1, scope: !3) !15 = !DILocalVariable(name: "i", line: 7, arg: 1, scope: !10, file: !5, type: !9) !16 = !DIGlobalVariable(name: "abcd", line: 2, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !9) -!17 = !DIGlobalVariable(name: "xyz", line: 3, isLocal: false, isDefinition: true, scope: !5, file: !5, type: !9, variable: i32* @xyz) +!17 = !DIGlobalVariable(name: "xyz", line: 3, isLocal: false, isDefinition: true, scope: !5, file: !5, type: !9) !18 = !DILocation(line: 6, scope: !19) !19 = distinct !DILexicalBlock(line: 6, column: 0, file: !1, scope: !6) !20 = !DILocation(line: 7, scope: !10) Index: test/Verifier/callsite-dbgloc.ll =================================================================== --- test/Verifier/callsite-dbgloc.ll +++ test/Verifier/callsite-dbgloc.ll @@ -13,7 +13,7 @@ target triple = "x86_64-apple-macosx" ; Function Attrs: nounwind ssp uwtable -define void @h() #0 !dbg !7 { +define void @h() #0 !dbg 0 !7 { entry: call void (...) @i(), !dbg !9 ret void, !dbg !10 @@ -22,7 +22,7 @@ declare void @i(...) #1 ; Function Attrs: nounwind ssp uwtable -define void @g() #0 !dbg !11 { +define void @g() #0 !dbg 0 !11 { entry: ; Manually removed !dbg. ; CHECK: inlinable function call in a function with debug info must have a !dbg location @@ -31,7 +31,7 @@ } ; Function Attrs: nounwind ssp uwtable -define void @f() #0 !dbg !14 { +define void @f() #0 !dbg 0 !14 { entry: call void @g(), !dbg !15 ret void, !dbg !16 Index: test/Verifier/dbg-difile-crash.ll =================================================================== --- test/Verifier/dbg-difile-crash.ll +++ test/Verifier/dbg-difile-crash.ll @@ -2,7 +2,7 @@ ; CHECK: assembly parsed, but does not verify ; CHECK-NEXT: invalid file -define void @blah() !dbg !3 { +define void @blah() !dbg 0 !3 { ret void } Index: test/Verifier/func-dbg.ll =================================================================== --- test/Verifier/func-dbg.ll +++ test/Verifier/func-dbg.ll @@ -1,11 +1,11 @@ ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s -define i32 @foo() !dbg !4 { +define i32 @foo() !dbg 0 !4 { entry: ret i32 0, !dbg !6 } -define i32 @bar() !dbg !5 { +define i32 @bar() !dbg 0 !5 { entry: ; CHECK: !dbg attachment points at wrong subprogram for function ret i32 0, !dbg !6 Index: test/Verifier/function-metadata-bad.ll =================================================================== --- test/Verifier/function-metadata-bad.ll +++ test/Verifier/function-metadata-bad.ll @@ -1,6 +1,6 @@ ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s -define i32 @bad1() !prof !0 { +define i32 @bad1() !prof 0 !0 { ret i32 0 } @@ -9,7 +9,7 @@ ; CHECK-NEXT: expected string with name of the !prof annotation ; CHECK-NEXT: !0 = !{i32 123, i32 3} -define i32 @bad2() !prof !1 { +define i32 @bad2() !prof 0 !1 { ret i32 0 } @@ -18,7 +18,7 @@ ; CHECK-NEXT: !1 = !{!"function_entry_count"} -define i32 @bad3() !prof !2 { +define i32 @bad3() !prof 0 !2 { ret i32 0 } @@ -26,7 +26,7 @@ ; CHECK-NEXT: first operand should be 'function_entry_count' ; CHECK-NEXT: !2 = !{!"some_other_count", i64 200} -define i32 @bad4() !prof !3 { +define i32 @bad4() !prof 0 !3 { ret i32 0 } Index: test/Verifier/function-metadata-good.ll =================================================================== --- test/Verifier/function-metadata-good.ll +++ test/Verifier/function-metadata-good.ll @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s -o /dev/null 2>&1 ; Function foo() is called 2,304 times at runtime. -define i32 @foo() !prof !0 { +define i32 @foo() !prof 0 !0 { ret i32 0 } Index: test/Verifier/metadata-function-dbg.ll =================================================================== --- test/Verifier/metadata-function-dbg.ll +++ test/Verifier/metadata-function-dbg.ll @@ -1,6 +1,11 @@ ; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s -define void @foo() !dbg !4 !dbg !4 { +define void @foo() !dbg 0 !4 { + unreachable +} + +; CHECK: function must have a single !dbg attachment +define void @foo2() !dbg 0 !4 !dbg 0 !4 { unreachable } @@ -8,7 +13,7 @@ ; CHECK: function !dbg attachment must be a subprogram ; CHECK-NEXT: void ()* @bar ; CHECK-NEXT: !{{[0-9]+}} = !{} -define void @bar() !dbg !6 { +define void @bar() !dbg 0 !6 { unreachable } Index: test/tools/dsymutil/Inputs/frame-dw2.ll =================================================================== --- test/tools/dsymutil/Inputs/frame-dw2.ll +++ test/tools/dsymutil/Inputs/frame-dw2.ll @@ -4,7 +4,7 @@ target triple = "i386-apple-macosx10.11.0" ; Function Attrs: nounwind ssp -define i32 @bar(i32 %b) #0 !dbg !4 { +define i32 @bar(i32 %b) #0 !dbg 0 !4 { entry: %b.addr = alloca i32, align 4 %var = alloca i32, align 4 @@ -24,7 +24,7 @@ declare i32 @foo(i32*) #2 ; Function Attrs: nounwind ssp -define i32 @baz(i32 %b) #0 !dbg !8 { +define i32 @baz(i32 %b) #0 !dbg 0 !8 { entry: %b.addr = alloca i32, align 4 store i32 %b, i32* %b.addr, align 4 Index: test/tools/dsymutil/Inputs/frame-dw4.ll =================================================================== --- test/tools/dsymutil/Inputs/frame-dw4.ll +++ test/tools/dsymutil/Inputs/frame-dw4.ll @@ -4,7 +4,7 @@ target triple = "i386-apple-macosx10.11.0" ; Function Attrs: nounwind ssp -define i32 @bar(i32 %b) #0 !dbg !4 { +define i32 @bar(i32 %b) #0 !dbg 0 !4 { entry: %b.addr = alloca i32, align 4 %var = alloca i32, align 4 @@ -24,7 +24,7 @@ declare i32 @foo(i32*) #2 ; Function Attrs: nounwind ssp -define i32 @baz(i32 %b) #0 !dbg !8 { +define i32 @baz(i32 %b) #0 !dbg 0 !8 { entry: %b.addr = alloca i32, align 4 store i32 %b, i32* %b.addr, align 4 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 @@ -1,4 +1,4 @@ -define weak_odr void @f() !dbg !4 { +define weak_odr void @f() !dbg 0 !4 { ret void, !dbg !10 } Index: test/tools/gold/X86/linkonce-weak.ll =================================================================== --- test/tools/gold/X86/linkonce-weak.ll +++ test/tools/gold/X86/linkonce-weak.ll @@ -11,7 +11,7 @@ ; RUN: -shared %t2.o %t.o -o %t3.o ; RUN: llvm-dis %t3.o -o - | FileCheck %s -define linkonce_odr void @f() !dbg !4 { +define linkonce_odr void @f() !dbg 0 !4 { ret void, !dbg !10 } Index: unittests/IR/MetadataTest.cpp =================================================================== --- unittests/IR/MetadataTest.cpp +++ unittests/IR/MetadataTest.cpp @@ -104,7 +104,7 @@ nullptr, 0, nullptr, getBasicType("basictype"), 1, 2, 0, 0); } - Constant *getConstant() { + ConstantInt *getConstant() { return ConstantInt::get(Type::getInt32Ty(Context), Counter++); } ConstantAsMetadata *getConstantAsMetadata() { @@ -1740,13 +1740,13 @@ DIType *Type = getDerivedType(); bool IsLocalToUnit = false; bool IsDefinition = true; - Constant *Variable = getConstant(); + ConstantInt *ConstantValue = getConstant(); DIDerivedType *StaticDataMemberDeclaration = cast(getDerivedType()); auto *N = DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, - Type, IsLocalToUnit, IsDefinition, Variable, - StaticDataMemberDeclaration); + Type, IsLocalToUnit, IsDefinition, + ConstantValue, StaticDataMemberDeclaration); EXPECT_EQ(dwarf::DW_TAG_variable, N->getTag()); EXPECT_EQ(Scope, N->getScope()); EXPECT_EQ(Name, N->getName()); @@ -1756,48 +1756,53 @@ EXPECT_EQ(Type, N->getType()); EXPECT_EQ(IsLocalToUnit, N->isLocalToUnit()); EXPECT_EQ(IsDefinition, N->isDefinition()); - EXPECT_EQ(Variable, N->getVariable()); + EXPECT_EQ(ConstantValue, N->getConstantValue()); EXPECT_EQ(StaticDataMemberDeclaration, N->getStaticDataMemberDeclaration()); - EXPECT_EQ(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, - Line, Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); + EXPECT_EQ(N, + DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, + Type, IsLocalToUnit, IsDefinition, + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, getSubprogram(), Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); - EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, "other", LinkageName, File, - Line, Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); - EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, "other", File, Line, - Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); + ConstantValue, StaticDataMemberDeclaration)); + EXPECT_NE(N, + DIGlobalVariable::get(Context, Scope, "other", LinkageName, File, + Line, Type, IsLocalToUnit, IsDefinition, + ConstantValue, StaticDataMemberDeclaration)); + EXPECT_NE(N, + DIGlobalVariable::get(Context, Scope, Name, "other", File, Line, + Type, IsLocalToUnit, IsDefinition, + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, getFile(), Line, Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line + 1, Type, IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, getDerivedType(), IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); - EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, - Line, Type, !IsLocalToUnit, IsDefinition, - Variable, StaticDataMemberDeclaration)); - EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, - Line, Type, IsLocalToUnit, !IsDefinition, - Variable, StaticDataMemberDeclaration)); + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, - Type, IsLocalToUnit, IsDefinition, - getConstant(), StaticDataMemberDeclaration)); + Type, !IsLocalToUnit, IsDefinition, + ConstantValue, StaticDataMemberDeclaration)); + EXPECT_NE(N, + DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, + Type, IsLocalToUnit, !IsDefinition, + ConstantValue, StaticDataMemberDeclaration)); EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, Line, - Type, IsLocalToUnit, IsDefinition, Variable, - cast(getDerivedType()))); + Type, IsLocalToUnit, IsDefinition, + getConstant(), StaticDataMemberDeclaration)); + EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, + Line, Type, IsLocalToUnit, IsDefinition, + ConstantValue, + cast(getDerivedType()))); TempDIGlobalVariable Temp = N->clone(); EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp))); @@ -2229,43 +2234,17 @@ F->setMetadata("other2", T2); F->setMetadata("other1", T1); - SmallVector, 4> MDs; + SmallVector, 4> MDs; F->getAllMetadata(MDs); ASSERT_EQ(4u, MDs.size()); - EXPECT_EQ(LLVMContext::MD_dbg, MDs[0].first); - EXPECT_EQ(LLVMContext::MD_prof, MDs[1].first); - EXPECT_EQ(Context.getMDKindID("other1"), MDs[2].first); - EXPECT_EQ(Context.getMDKindID("other2"), MDs[3].first); - EXPECT_EQ(SP, MDs[0].second); - EXPECT_EQ(P, MDs[1].second); - EXPECT_EQ(T1, MDs[2].second); - EXPECT_EQ(T2, MDs[3].second); -} - -TEST_F(FunctionAttachmentTest, dropUnknownMetadata) { - Function *F = getFunction("foo"); - - MDTuple *T1 = getTuple(); - MDTuple *T2 = getTuple(); - MDTuple *P = getTuple(); - DISubprogram *SP = getSubprogram(); - - F->setMetadata("other1", T1); - F->setMetadata(LLVMContext::MD_dbg, SP); - F->setMetadata("other2", T2); - F->setMetadata(LLVMContext::MD_prof, P); - - unsigned Known[] = {Context.getMDKindID("other2"), LLVMContext::MD_prof}; - F->dropUnknownMetadata(Known); - - EXPECT_EQ(T2, F->getMetadata("other2")); - EXPECT_EQ(P, F->getMetadata(LLVMContext::MD_prof)); - EXPECT_EQ(nullptr, F->getMetadata("other1")); - EXPECT_EQ(nullptr, F->getMetadata(LLVMContext::MD_dbg)); - - F->setMetadata("other2", nullptr); - F->setMetadata(LLVMContext::MD_prof, nullptr); - EXPECT_FALSE(F->hasMetadata()); + EXPECT_EQ(LLVMContext::MD_dbg, std::get<0>(MDs[0])); + EXPECT_EQ(LLVMContext::MD_prof, std::get<0>(MDs[1])); + EXPECT_EQ(Context.getMDKindID("other1"), std::get<0>(MDs[2])); + EXPECT_EQ(Context.getMDKindID("other2"), std::get<0>(MDs[3])); + EXPECT_EQ(SP, std::get<2>(MDs[0])); + EXPECT_EQ(P, std::get<2>(MDs[1])); + EXPECT_EQ(T1, std::get<2>(MDs[2])); + EXPECT_EQ(T2, std::get<2>(MDs[3])); } TEST_F(FunctionAttachmentTest, Verifier) { Index: unittests/IR/VerifierTest.cpp =================================================================== --- unittests/IR/VerifierTest.cpp +++ unittests/IR/VerifierTest.cpp @@ -120,31 +120,6 @@ F3->eraseFromParent(); } -TEST(VerifierTest, CrossModuleMetadataRef) { - LLVMContext C; - Module M1("M1", C); - Module M2("M2", C); - GlobalVariable *newGV = - new GlobalVariable(M1, Type::getInt8Ty(C), false, - GlobalVariable::ExternalLinkage, nullptr, - "Some Global"); - - DIBuilder dbuilder(M2); - auto CU = dbuilder.createCompileUnit(dwarf::DW_LANG_Julia, "test.jl", ".", - "unittest", false, "", 0); - auto File = dbuilder.createFile("test.jl", "."); - auto Ty = dbuilder.createBasicType("Int8", 8, 8, dwarf::DW_ATE_signed); - dbuilder.createGlobalVariable(CU, "_SOME_GLOBAL", "_SOME_GLOBAL", File, 1, Ty, - false, newGV); - dbuilder.finalize(); - - std::string Error; - raw_string_ostream ErrorOS(Error); - EXPECT_TRUE(verifyModule(M2, &ErrorOS)); - EXPECT_TRUE(StringRef(ErrorOS.str()) - .startswith("Referencing global in another module!")); -} - #ifndef _MSC_VER // FIXME: This test causes an ICE in MSVC 2013. TEST(VerifierTest, StripInvalidDebugInfo) { Index: unittests/Linker/LinkModulesTest.cpp =================================================================== --- unittests/Linker/LinkModulesTest.cpp +++ unittests/Linker/LinkModulesTest.cpp @@ -237,7 +237,7 @@ LLVMContext C; SMDiagnostic Err; - const char *SrcStr = "define void @foo() !attach !0 {\n" + const char *SrcStr = "define void @foo() !attach 0 !0 {\n" "entry:\n" " call void @llvm.md(metadata !1)\n" " ret void, !attach !2\n"