diff --git a/clang/test/Modules/debug-info-moduleimport.m b/clang/test/Modules/debug-info-moduleimport.m --- a/clang/test/Modules/debug-info-moduleimport.m +++ b/clang/test/Modules/debug-info-moduleimport.m @@ -15,7 +15,7 @@ // CHECK: ![[MODULE]] = !DIModule(scope: null, name: "DebugObjC", // CHECK-SAME: configMacros: "\22-DGREETING=Hello World\22 \22-UNDEBUG\22", // CHECK-SAME: includePath: "{{.*}}test{{.*}}Modules{{.*}}Inputs", -// CHECK-SAME: isysroot: "/tmp/..") +// CHECK-SAME: sysroot: "/tmp/..") // CHECK: ![[F]] = !DIFile(filename: {{.*}}debug-info-moduleimport.m // RUN: %clang_cc1 -debug-info-kind=limited -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -977,7 +977,7 @@ DW_AT_LLVM_include_path, nullptr)) module.search_path = ConstString(include_path); if (const char *sysroot = module_die.GetAttributeValueAsString( - DW_AT_LLVM_isysroot, nullptr)) + DW_AT_LLVM_sysroot, nullptr)) module.sysroot = ConstString(sysroot); imported_modules.push_back(module); } diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -283,15 +283,15 @@ * \param ConfigMacrosLen The length of the C string passed to \c ConfigMacros. * \param IncludePath The path to the module map file. * \param IncludePathLen The length of the C string passed to \c IncludePath. - * \param ISysRoot The Clang system root (value of -isysroot). - * \param ISysRootLen The length of the C string passed to \c ISysRoot. + * \param SysRoot The Clang system root (value of -isysroot). + * \param SysRootLen The length of the C string passed to \c SysRoot. */ LLVMMetadataRef LLVMDIBuilderCreateModule(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, const char *ConfigMacros, size_t ConfigMacrosLen, const char *IncludePath, size_t IncludePathLen, - const char *ISysRoot, size_t ISysRootLen); + const char *SysRoot, size_t SysRootLen); /** * Creates a new descriptor for a namespace with the specified parent scope. diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.def b/llvm/include/llvm/BinaryFormat/Dwarf.def --- a/llvm/include/llvm/BinaryFormat/Dwarf.def +++ b/llvm/include/llvm/BinaryFormat/Dwarf.def @@ -405,7 +405,7 @@ // LLVM project extensions. HANDLE_DW_AT(0x3e00, LLVM_include_path, 0, LLVM) HANDLE_DW_AT(0x3e01, LLVM_config_macros, 0, LLVM) -HANDLE_DW_AT(0x3e02, LLVM_isysroot, 0, LLVM) +HANDLE_DW_AT(0x3e02, LLVM_sysroot, 0, LLVM) HANDLE_DW_AT(0x3e03, LLVM_tag_offset, 0, LLVM) // Apple extensions. HANDLE_DW_AT(0x3fe1, APPLE_optimized, 0, APPLE) diff --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h --- a/llvm/include/llvm/IR/DIBuilder.h +++ b/llvm/include/llvm/IR/DIBuilder.h @@ -734,11 +734,11 @@ /// A space-separated shell-quoted list of -D macro /// definitions as they would appear on a command line. /// \param IncludePath The path to the module map file. - /// \param ISysRoot The clang system root (value of -isysroot). + /// \param SysRoot The clang system root (value of -isysroot). DIModule *createModule(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, - StringRef ISysRoot); + StringRef SysRoot); /// This creates a descriptor for a lexical block with a new file /// attached. This merely extends the existing diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h --- a/llvm/include/llvm/IR/DebugInfoMetadata.h +++ b/llvm/include/llvm/IR/DebugInfoMetadata.h @@ -2084,34 +2084,34 @@ static DIModule *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, - StringRef IncludePath, StringRef ISysRoot, + StringRef IncludePath, StringRef SysRoot, StorageType Storage, bool ShouldCreate = true) { return getImpl(Context, Scope, getCanonicalMDString(Context, Name), getCanonicalMDString(Context, ConfigurationMacros), getCanonicalMDString(Context, IncludePath), - getCanonicalMDString(Context, ISysRoot), + getCanonicalMDString(Context, SysRoot), Storage, ShouldCreate); } static DIModule *getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot, + MDString *IncludePath, MDString *SysRoot, StorageType Storage, bool ShouldCreate = true); TempDIModule cloneImpl() const { return getTemporary(getContext(), getScope(), getName(), getConfigurationMacros(), getIncludePath(), - getISysRoot()); + getSysRoot()); } public: DEFINE_MDNODE_GET(DIModule, (DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, - StringRef ISysRoot), - (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)) + StringRef SysRoot), + (Scope, Name, ConfigurationMacros, IncludePath, SysRoot)) DEFINE_MDNODE_GET(DIModule, (Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot), - (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)) + MDString *IncludePath, MDString *SysRoot), + (Scope, Name, ConfigurationMacros, IncludePath, SysRoot)) TempDIModule clone() const { return cloneImpl(); } @@ -2119,13 +2119,13 @@ StringRef getName() const { return getStringOperand(1); } StringRef getConfigurationMacros() const { return getStringOperand(2); } StringRef getIncludePath() const { return getStringOperand(3); } - StringRef getISysRoot() const { return getStringOperand(4); } + StringRef getSysRoot() const { return getStringOperand(4); } Metadata *getRawScope() const { return getOperand(0); } MDString *getRawName() const { return getOperandAs(1); } MDString *getRawConfigurationMacros() const { return getOperandAs(2); } MDString *getRawIncludePath() const { return getOperandAs(3); } - MDString *getRawISysRoot() const { return getOperandAs(4); } + MDString *getRawSysRoot() const { return getOperandAs(4); } static bool classof(const Metadata *MD) { return MD->getMetadataID() == DIModuleKind; diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -4821,19 +4821,19 @@ /// ParseDIModule: /// ::= !DIModule(scope: !0, name: "SomeModule", configMacros: "-DNDEBUG", -/// includePath: "/usr/include", isysroot: "/") +/// includePath: "/usr/include", sysroot: "/") bool LLParser::ParseDIModule(MDNode *&Result, bool IsDistinct) { #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ REQUIRED(scope, MDField, ); \ REQUIRED(name, MDStringField, ); \ OPTIONAL(configMacros, MDStringField, ); \ OPTIONAL(includePath, MDStringField, ); \ - OPTIONAL(isysroot, MDStringField, ); + OPTIONAL(sysroot, MDStringField, ); PARSE_MD_FIELDS(); #undef VISIT_MD_FIELDS Result = GET_OR_DISTINCT(DIModule, (Context, scope.Val, name.Val, - configMacros.Val, includePath.Val, isysroot.Val)); + configMacros.Val, includePath.Val, sysroot.Val)); return false; } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1123,8 +1123,8 @@ M->getConfigurationMacros()); if (!M->getIncludePath().empty()) addString(MDie, dwarf::DW_AT_LLVM_include_path, M->getIncludePath()); - if (!M->getISysRoot().empty()) - addString(MDie, dwarf::DW_AT_LLVM_isysroot, M->getISysRoot()); + if (!M->getSysRoot().empty()) + addString(MDie, dwarf::DW_AT_LLVM_sysroot, M->getSysRoot()); return &MDie; } diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -2057,7 +2057,7 @@ Printer.printString("name", N->getName()); Printer.printString("configMacros", N->getConfigurationMacros()); Printer.printString("includePath", N->getIncludePath()); - Printer.printString("isysroot", N->getISysRoot()); + Printer.printString("sysroot", N->getSysRoot()); Out << ")"; } diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -830,9 +830,9 @@ DIModule *DIBuilder::createModule(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, - StringRef ISysRoot) { + StringRef SysRoot) { return DIModule::get(VMContext, getNonCompileUnitScope(Scope), Name, - ConfigurationMacros, IncludePath, ISysRoot); + ConfigurationMacros, IncludePath, SysRoot); } DILexicalBlockFile *DIBuilder::createLexicalBlockFile(DIScope *Scope, diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -782,12 +782,12 @@ const char *Name, size_t NameLen, const char *ConfigMacros, size_t ConfigMacrosLen, const char *IncludePath, size_t IncludePathLen, - const char *ISysRoot, size_t ISysRootLen) { + const char *SysRoot, size_t SysRootLen) { return wrap(unwrap(Builder)->createModule( unwrapDI(ParentScope), StringRef(Name, NameLen), StringRef(ConfigMacros, ConfigMacrosLen), StringRef(IncludePath, IncludePathLen), - StringRef(ISysRoot, ISysRootLen))); + StringRef(SysRoot, SysRootLen))); } LLVMMetadataRef LLVMDIBuilderCreateNameSpace(LLVMDIBuilderRef Builder, diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -715,12 +715,12 @@ DIModule *DIModule::getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot, + MDString *IncludePath, MDString *SysRoot, StorageType Storage, bool ShouldCreate) { assert(isCanonical(Name) && "Expected canonical MDString"); DEFINE_GETIMPL_LOOKUP( - DIModule, (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)); - Metadata *Ops[] = {Scope, Name, ConfigurationMacros, IncludePath, ISysRoot}; + DIModule, (Scope, Name, ConfigurationMacros, IncludePath, SysRoot)); + Metadata *Ops[] = {Scope, Name, ConfigurationMacros, IncludePath, SysRoot}; DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS(DIModule, Ops); } diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -819,27 +819,27 @@ MDString *Name; MDString *ConfigurationMacros; MDString *IncludePath; - MDString *ISysRoot; + MDString *SysRoot; MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot) + MDString *IncludePath, MDString *SysRoot) : Scope(Scope), Name(Name), ConfigurationMacros(ConfigurationMacros), - IncludePath(IncludePath), ISysRoot(ISysRoot) {} + IncludePath(IncludePath), SysRoot(SysRoot) {} MDNodeKeyImpl(const DIModule *N) : Scope(N->getRawScope()), Name(N->getRawName()), ConfigurationMacros(N->getRawConfigurationMacros()), - IncludePath(N->getRawIncludePath()), ISysRoot(N->getRawISysRoot()) {} + IncludePath(N->getRawIncludePath()), SysRoot(N->getRawSysRoot()) {} bool isKeyOf(const DIModule *RHS) const { return Scope == RHS->getRawScope() && Name == RHS->getRawName() && ConfigurationMacros == RHS->getRawConfigurationMacros() && IncludePath == RHS->getRawIncludePath() && - ISysRoot == RHS->getRawISysRoot(); + SysRoot == RHS->getRawSysRoot(); } unsigned getHashValue() const { return hash_combine(Scope, Name, - ConfigurationMacros, IncludePath, ISysRoot); + ConfigurationMacros, IncludePath, SysRoot); } }; diff --git a/llvm/test/Assembler/dimodule.ll b/llvm/test/Assembler/dimodule.ll --- a/llvm/test/Assembler/dimodule.ll +++ b/llvm/test/Assembler/dimodule.ll @@ -9,7 +9,7 @@ ; CHECK: !1 = !DIModule(scope: !0, name: "Module") !1 = !DIModule(scope: !0, name: "Module") -; CHECK: !2 = !DIModule(scope: !0, name: "Module", configMacros: "-DNDEBUG", includePath: "/usr/include", isysroot: "/") -!2 = !DIModule(scope: !0, name: "Module", configMacros: "-DNDEBUG", includePath: "/usr/include", isysroot: "/") +; CHECK: !2 = !DIModule(scope: !0, name: "Module", configMacros: "-DNDEBUG", includePath: "/usr/include", sysroot: "/") +!2 = !DIModule(scope: !0, name: "Module", configMacros: "-DNDEBUG", includePath: "/usr/include", sysroot: "/") !3 = !DIModule(scope: !0, name: "Module", configMacros: "") diff --git a/llvm/test/CodeGen/X86/load-combine-dbg.ll b/llvm/test/CodeGen/X86/load-combine-dbg.ll --- a/llvm/test/CodeGen/X86/load-combine-dbg.ll +++ b/llvm/test/CodeGen/X86/load-combine-dbg.ll @@ -25,7 +25,7 @@ !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, isOptimized: false, emissionKind: FullDebug) -!2 = !DIModule(scope: null, name: "test", includePath: "", isysroot: "/") +!2 = !DIModule(scope: null, name: "test", includePath: "", sysroot: "/") !3 = !DIFile(filename: "main.swift", directory: "/") !30 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !31, isLocal: false, isDefinition: true, isOptimized: false, unit: !1) diff --git a/llvm/test/DebugInfo/X86/DIModule.ll b/llvm/test/DebugInfo/X86/DIModule.ll --- a/llvm/test/DebugInfo/X86/DIModule.ll +++ b/llvm/test/DebugInfo/X86/DIModule.ll @@ -6,7 +6,7 @@ ; CHECK-NEXT: DW_AT_name {{.*}}"DebugModule" ; CHECK-NEXT: DW_AT_LLVM_config_macros {{.*}}"-DMODULES=0" ; CHECK-NEXT: DW_AT_LLVM_include_path {{.*}}"/llvm/tools/clang/test/Modules/Inputs" -; CHECK-NEXT: DW_AT_LLVM_isysroot {{.*}}"/" +; CHECK-NEXT: DW_AT_LLVM_sysroot {{.*}}"/" target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx" @@ -20,7 +20,7 @@ !2 = !{} !3 = !{!4} !4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !5, file: !1, line: 5) -!5 = !DIModule(scope: null, name: "DebugModule", configMacros: "-DMODULES=0", includePath: "/llvm/tools/clang/test/Modules/Inputs", isysroot: "/") +!5 = !DIModule(scope: null, name: "DebugModule", configMacros: "-DMODULES=0", includePath: "/llvm/tools/clang/test/Modules/Inputs", sysroot: "/") !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} !8 = !{!"LLVM version 3.7.0"} diff --git a/llvm/test/DebugInfo/X86/DIModuleContext.ll b/llvm/test/DebugInfo/X86/DIModuleContext.ll --- a/llvm/test/DebugInfo/X86/DIModuleContext.ll +++ b/llvm/test/DebugInfo/X86/DIModuleContext.ll @@ -25,7 +25,7 @@ !5 = !{!0} !6 = !{!7} !7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !8, file: !3, line: 11) -!8 = !DIModule(scope: null, name: "Module", includePath: ".", isysroot: "/") +!8 = !DIModule(scope: null, name: "Module", includePath: ".", sysroot: "/") !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64) !10 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !8, file: !3, line: 1, flags: DIFlagFwdDecl) !11 = !{i32 2, !"Dwarf Version", i32 2} diff --git a/llvm/test/DebugInfo/X86/clang-module.ll b/llvm/test/DebugInfo/X86/clang-module.ll --- a/llvm/test/DebugInfo/X86/clang-module.ll +++ b/llvm/test/DebugInfo/X86/clang-module.ll @@ -24,7 +24,7 @@ !1 = !DIFile(filename: "modules.m", directory: "/") !3 = !{!4} !4 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !5, line: 122) -!5 = !DIModule(scope: null, name: "Foo", includePath: ".", isysroot: "/") +!5 = !DIModule(scope: null, name: "Foo", includePath: ".", sysroot: "/") !6 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !7, producer: "clang version 5.0.0 (trunk 308357) (llvm/trunk 308379)", isOptimized: true, runtimeVersion: 0, splitDebugFilename: "/Foo.pcm", emissionKind: FullDebug, dwoId: 1234) !7 = !DIFile(filename: "Foo", directory: ".") !15 = !{i32 2, !"Dwarf Version", i32 4} diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp --- a/llvm/unittests/IR/MetadataTest.cpp +++ b/llvm/unittests/IR/MetadataTest.cpp @@ -2059,7 +2059,7 @@ EXPECT_EQ(Name, N->getName()); EXPECT_EQ(ConfigMacro, N->getConfigurationMacros()); EXPECT_EQ(Includes, N->getIncludePath()); - EXPECT_EQ(Sysroot, N->getISysRoot()); + EXPECT_EQ(Sysroot, N->getSysRoot()); EXPECT_EQ(N, DIModule::get(Context, Scope, Name, ConfigMacro, Includes, Sysroot)); EXPECT_NE(N, DIModule::get(Context, getFile(), Name,