Projects
openEuler:24.03
llvm
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 14
View file
_service:tar_scm:llvm.spec
Changed
@@ -1,5 +1,6 @@ %bcond_without sys_llvm %bcond_without check +%bcond_with classic_flang %global maj_ver 17 %global min_ver 0 @@ -37,7 +38,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 7 +Release: 8 Summary: The Low Level Virtual Machine License: NCSA @@ -64,6 +65,8 @@ Patch14: 0014-Backport-X86-Inline-Skip-inline-asm-in-inlining-targ.patch Patch15: 0015-Backport-ARM-Check-all-terms-in-emitPopInst-when-clearing-Res.patch Patch16: 0016-Backport-ARM-Update-IsRestored-for-LR-based-on-all-returns-82.patch +Patch17: 0017-Add-the-support-for-classic-flang.patch +Patch18: 0018-Fix-declaration-definition-mismatch-for-classic-flang.patch BuildRequires: binutils-devel BuildRequires: cmake @@ -223,8 +226,10 @@ %else -DLLVM_LIBDIR_SUFFIX= \ %endif +%if %{with classic_flang} + -DLLVM_ENABLE_CLASSIC_FLANG=ON \ +%endif -DLLVM_INCLUDE_BENCHMARKS=OFF - %ninja_build LLVM %ninja_build @@ -346,6 +351,9 @@ %{install_includedir}/llvm-gmock %changelog +* Wed Apr 17 2024 luofeng <luofeng13@huawei.com> - 17.0.6-8 +- Add the support for classic flang + * Fri Apr 12 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-7 - Backport patch to fix CVE-2024-31852
View file
_service:tar_scm:0017-Add-the-support-for-classic-flang.patch
Added
@@ -0,0 +1,1776 @@ +From b297f30783da0dfb3098fe6d39b209caacd45691 Mon Sep 17 00:00:00 2001 +From: luofeng14 <luofeng13@huawei.com> +Date: Fri, 1 Mar 2024 18:39:52 +0800 +Subject: PATCH sync classic flang patch + +--- + llvm/cmake/modules/HandleLLVMOptions.cmake | 8 + + llvm/include/llvm-c/DebugInfo.h | 5 +- + .../include/llvm/Analysis/TargetLibraryInfo.h | 6 +- + llvm/include/llvm/Analysis/VecFuncs.def | 592 ++++++++++++++++++ + llvm/include/llvm/IR/DIBuilder.h | 28 +- + llvm/include/llvm/IR/DebugInfoMetadata.h | 32 +- + llvm/lib/Analysis/TargetLibraryInfo.cpp | 38 +- + llvm/lib/AsmParser/LLParser.cpp | 22 +- + llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 42 +- + llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 3 +- + llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | 54 ++ + .../lib/CodeGen/AsmPrinter/DebugLocStream.cpp | 5 + + llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h | 6 + + .../CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 3 + + llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 4 + + llvm/lib/IR/AsmWriter.cpp | 1 + + llvm/lib/IR/DIBuilder.cpp | 12 +- + llvm/lib/IR/DebugInfo.cpp | 10 +- + llvm/lib/IR/DebugInfoMetadata.cpp | 12 +- + llvm/lib/IR/LLVMContextImpl.h | 11 +- + .../Instrumentation/InstrProfiling.cpp | 4 +- + .../invalid-diglobalvariable-empty-name.ll | 1 + + .../Generic/fortran-subprogram-at.ll | 24 + + .../DebugInfo/Generic/more-subprogram-attr.ll | 38 ++ + llvm/test/DebugInfo/X86/DICommonBlock.ll | 36 ++ + llvm/test/lit.cfg.py | 3 + + llvm/test/lit.site.cfg.py.in | 1 + + llvm/tools/llvm-c-test/debuginfo.c | 4 +- + llvm/unittests/IR/MetadataTest.cpp | 47 +- + llvm/utils/lit/lit/TestingConfig.py | 1 + + llvm/utils/lit/lit/llvm/config.py | 10 + + 31 files changed, 983 insertions(+), 80 deletions(-) + create mode 100644 llvm/test/DebugInfo/Generic/fortran-subprogram-at.ll + create mode 100644 llvm/test/DebugInfo/Generic/more-subprogram-attr.ll + create mode 100644 llvm/test/DebugInfo/X86/DICommonBlock.ll + +diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake +index 76723be696e5..492ea25b179b 100644 +--- a/llvm/cmake/modules/HandleLLVMOptions.cmake ++++ b/llvm/cmake/modules/HandleLLVMOptions.cmake +@@ -89,6 +89,14 @@ if( LLVM_ENABLE_ASSERTIONS ) + add_compile_definitions(_LIBCPP_ENABLE_HARDENED_MODE) + endif() + ++option(LLVM_ENABLE_CLASSIC_FLANG "Build support for classic Flang instead of the new built-in Flang" OFF) ++if(LLVM_ENABLE_CLASSIC_FLANG) ++ set(LLVM_ENABLE_CLASSIC_FLANG 1) ++ add_definitions( -DENABLE_CLASSIC_FLANG ) ++else() ++ set(LLVM_ENABLE_CLASSIC_FLANG 0) ++endif() ++ + if(LLVM_ENABLE_EXPENSIVE_CHECKS) + add_compile_definitions(EXPENSIVE_CHECKS) + +diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h +index 5924294708cc..09d584c24711 100644 +--- a/llvm/include/llvm-c/DebugInfo.h ++++ b/llvm/include/llvm-c/DebugInfo.h +@@ -1148,7 +1148,8 @@ LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression( + LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, + size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File, + unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, +- LLVMMetadataRef Expr, LLVMMetadataRef Decl, uint32_t AlignInBits); ++ LLVMMetadataRef Expr, LLVMMetadataRef Decl, LLVMDIFlags Flags, ++ uint32_t AlignInBits); + + + /** +@@ -1246,7 +1247,7 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl( + LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, + size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File, + unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, +- LLVMMetadataRef Decl, uint32_t AlignInBits); ++ LLVMMetadataRef Decl, LLVMDIFlags Flags, uint32_t AlignInBits); + + /** + * Insert a new llvm.dbg.declare intrinsic call before the given instruction. +diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h +index 5d62e837c1f3..490252cd018a 100644 +--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h ++++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h +@@ -22,7 +22,6 @@ namespace llvm { + template <typename T> class ArrayRef; + class Function; + class Module; +-class Triple; + + /// Describes a possible vectorization of a function. + /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized +@@ -81,6 +80,8 @@ class TargetLibraryInfoImpl { + bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, + const Module &M) const; + ++ Triple T; ++ + public: + /// List of known vector-functions libraries. + /// +@@ -95,6 +96,9 @@ public: + DarwinLibSystemM, // Use Darwin's libsystem_m. + LIBMVEC_X86, // GLIBC Vector Math library. + MASSV, // IBM MASS vector library. ++#ifdef ENABLE_CLASSIC_FLANG ++ PGMATH, // PGI math library. ++#endif + SVML, // Intel short vector math library. + SLEEFGNUABI, // SLEEF - SIMD Library for Evaluating Elementary Functions. + ArmPL // Arm Performance Libraries. +diff --git a/llvm/include/llvm/Analysis/VecFuncs.def b/llvm/include/llvm/Analysis/VecFuncs.def +index b884c1e3911e..d1712d158423 100644 +--- a/llvm/include/llvm/Analysis/VecFuncs.def ++++ b/llvm/include/llvm/Analysis/VecFuncs.def +@@ -909,6 +909,596 @@ TLI_DEFINE_VECFUNC("tgammaf", "armpl_vtgammaq_f32", FIXED(4), NOMASK) + TLI_DEFINE_VECFUNC("tgamma", "armpl_svtgamma_f64_x", SCALABLE(2), MASKED) + TLI_DEFINE_VECFUNC("tgammaf", "armpl_svtgamma_f32_x", SCALABLE(4), MASKED) + ++#elif defined(TLI_DEFINE_PGMATH_AARCH64_VECFUNCS) ++// Classic flang libpgmath library's Vector Functions for AArch64 ++ ++TLI_DEFINE_VECFUNC("__fd_sin_1", "__fd_sin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_sin_1", "__fs_sin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_sin_1", "__pd_sin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_sin_1", "__ps_sin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_sin_1", "__rd_sin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_sin_1", "__rs_sin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_cos_1", "__fd_cos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_cos_1", "__fs_cos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_cos_1", "__pd_cos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_cos_1", "__ps_cos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_cos_1", "__rd_cos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_cos_1", "__rs_cos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_sincos_1", "__fd_sincos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_sincos_1", "__fs_sincos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_sincos_1", "__pd_sincos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_sincos_1", "__ps_sincos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_sincos_1", "__rd_sincos_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_sincos_1", "__rs_sincos_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_tan_1", "__fd_tan_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_tan_1", "__fs_tan_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_tan_1", "__pd_tan_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_tan_1", "__ps_tan_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_tan_1", "__rd_tan_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_tan_1", "__rs_tan_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_sinh_1", "__fd_sinh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_sinh_1", "__fs_sinh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_sinh_1", "__pd_sinh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_sinh_1", "__ps_sinh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_sinh_1", "__rd_sinh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_sinh_1", "__rs_sinh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_cosh_1", "__fd_cosh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_cosh_1", "__fs_cosh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_cosh_1", "__pd_cosh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_cosh_1", "__ps_cosh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_cosh_1", "__rd_cosh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_cosh_1", "__rs_cosh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_tanh_1", "__fd_tanh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_tanh_1", "__fs_tanh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_tanh_1", "__pd_tanh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_tanh_1", "__ps_tanh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_tanh_1", "__rd_tanh_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_tanh_1", "__rs_tanh_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_asin_1", "__fd_asin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__fs_asin_1", "__fs_asin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__pd_asin_1", "__pd_asin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__ps_asin_1", "__ps_asin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__rd_asin_1", "__rd_asin_2", FIXED(2)) ++TLI_DEFINE_VECFUNC("__rs_asin_1", "__rs_asin_4", FIXED(4)) ++ ++TLI_DEFINE_VECFUNC("__fd_acos_1", "__fd_acos_2", FIXED(2))
View file
_service:tar_scm:0018-Fix-declaration-definition-mismatch-for-classic-flang.patch
Added
@@ -0,0 +1,1041 @@ +From d6d17d8f0362ac47100be32f0d9cb31fd66a1060 Mon Sep 17 00:00:00 2001 +From: luofeng14 <luofeng13@huawei.com> +Date: Wed, 17 Apr 2024 14:26:07 +0800 +Subject: PATCH Fix declaration definition mismatch for classic flang + +--- + llvm/cmake/modules/TableGen.cmake | 4 + + llvm/include/llvm-c/DebugInfo.h | 11 ++- + .../include/llvm/Analysis/TargetLibraryInfo.h | 5 + + llvm/include/llvm/Analysis/VecFuncs.def | 8 ++ + llvm/include/llvm/IR/DebugInfoMetadata.h | 65 ++++++++++--- + llvm/lib/Analysis/TargetLibraryInfo.cpp | 24 +++++ + llvm/lib/AsmParser/LLParser.cpp | 6 +- + llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 44 ++++++--- + llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 6 ++ + llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | 4 + + .../CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 +- + llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 +- + llvm/lib/IR/AsmWriter.cpp | 2 + + llvm/lib/IR/DIBuilder.cpp | 21 +++- + llvm/lib/IR/DebugInfo.cpp | 22 ++++- + llvm/lib/IR/DebugInfoMetadata.cpp | 19 +++- + llvm/lib/IR/LLVMContextImpl.h | 22 ++++- + .../Instrumentation/InstrProfiling.cpp | 5 +- + llvm/tools/llvm-c-test/debuginfo.c | 12 ++- + llvm/unittests/IR/MetadataTest.cpp | 97 +++++++++++++++---- + llvm/utils/lit/lit/llvm/config.py | 17 ++-- + 21 files changed, 321 insertions(+), 85 deletions(-) + +diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake +index 7fd6628ef55d..d4d2c06c051b 100644 +--- a/llvm/cmake/modules/TableGen.cmake ++++ b/llvm/cmake/modules/TableGen.cmake +@@ -76,6 +76,10 @@ function(tablegen project ofn) + set(tblgen_change_flag "--write-if-changed") + endif() + ++ if (LLVM_ENABLE_CLASSIC_FLANG) ++ list(APPEND tblgen_change_flag "-DENABLE_CLASSIC_FLANG") ++ endif() ++ + if (NOT LLVM_ENABLE_WARNINGS) + list(APPEND LLVM_TABLEGEN_FLAGS "-no-warn-on-unused-template-args") + endif() +diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h +index 09d584c24711..0201bac4349d 100644 +--- a/llvm/include/llvm-c/DebugInfo.h ++++ b/llvm/include/llvm-c/DebugInfo.h +@@ -1148,7 +1148,10 @@ LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression( + LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, + size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File, + unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, +- LLVMMetadataRef Expr, LLVMMetadataRef Decl, LLVMDIFlags Flags, ++ LLVMMetadataRef Expr, LLVMMetadataRef Decl, ++#ifdef ENABLE_CLASSIC_FLANG ++ LLVMDIFlags Flags, ++#endif + uint32_t AlignInBits); + + +@@ -1247,7 +1250,11 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl( + LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, + size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File, + unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, +- LLVMMetadataRef Decl, LLVMDIFlags Flags, uint32_t AlignInBits); ++ LLVMMetadataRef Decl, ++#ifdef ENABLE_CLASSIC_FLANG ++ LLVMDIFlags Flags, ++#endif ++ uint32_t AlignInBits); + + /** + * Insert a new llvm.dbg.declare intrinsic call before the given instruction. +diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h +index 490252cd018a..6805c6535189 100644 +--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h ++++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h +@@ -22,6 +22,9 @@ namespace llvm { + template <typename T> class ArrayRef; + class Function; + class Module; ++#ifndef ENABLE_CLASSIC_FLANG ++class Triple; ++#endif + + /// Describes a possible vectorization of a function. + /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized +@@ -80,7 +83,9 @@ class TargetLibraryInfoImpl { + bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, + const Module &M) const; + ++#ifdef ENABLE_CLASSIC_FLANG + Triple T; ++#endif + + public: + /// List of known vector-functions libraries. +diff --git a/llvm/include/llvm/Analysis/VecFuncs.def b/llvm/include/llvm/Analysis/VecFuncs.def +index d1712d158423..679e28057d6e 100644 +--- a/llvm/include/llvm/Analysis/VecFuncs.def ++++ b/llvm/include/llvm/Analysis/VecFuncs.def +@@ -910,6 +910,8 @@ TLI_DEFINE_VECFUNC("tgamma", "armpl_svtgamma_f64_x", SCALABLE(2), MASKED) + TLI_DEFINE_VECFUNC("tgammaf", "armpl_svtgamma_f32_x", SCALABLE(4), MASKED) + + #elif defined(TLI_DEFINE_PGMATH_AARCH64_VECFUNCS) ++ ++#ifdef ENABLE_CLASSIC_FLANG + // Classic flang libpgmath library's Vector Functions for AArch64 + + TLI_DEFINE_VECFUNC("__fd_sin_1", "__fd_sin_2", FIXED(2)) +@@ -1079,8 +1081,11 @@ TLI_DEFINE_VECFUNC("__ps_exp_1", "__ps_exp_4", FIXED(4)) + + TLI_DEFINE_VECFUNC("__rd_exp_1", "__rd_exp_2", FIXED(2)) + TLI_DEFINE_VECFUNC("__rs_exp_1", "__rs_exp_4", FIXED(4)) ++#endif + + #elif defined(TLI_DEFINE_PGMATH_X86_VECFUNCS) ++ ++#ifdef ENABLE_CLASSIC_FLANG + // Classic flang libpgmath library's Vector Functions for X86 + + TLI_DEFINE_VECFUNC("__fd_sin_1", "__fd_sin_2", FIXED(2)) +@@ -1498,6 +1503,7 @@ TLI_DEFINE_VECFUNC("__rd_exp_1", "__rd_exp_8", FIXED(8)) + TLI_DEFINE_VECFUNC("__rs_exp_1", "__rs_exp_4", FIXED(4)) + TLI_DEFINE_VECFUNC("__rs_exp_1", "__rs_exp_8", FIXED(8)) + TLI_DEFINE_VECFUNC("__rs_exp_1", "__rs_exp_16", FIXED(16)) ++#endif + + #else + #error "Must choose which vector library functions are to be defined." +@@ -1519,5 +1525,7 @@ TLI_DEFINE_VECFUNC("__rs_exp_1", "__rs_exp_16", FIXED(16)) + #undef TLI_DEFINE_SLEEFGNUABI_SCALABLE_VECFUNCS + #undef TLI_DEFINE_MASSV_VECFUNCS_NAMES + #undef TLI_DEFINE_ARMPL_VECFUNCS ++#ifdef ENABLE_CLASSIC_FLANG + #undef TLI_DEFINE_PGMATH_AARCH64_VECFUNCS + #undef TLI_DEFINE_PGMATH_X86_VECFUNCS ++#endif +diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h +index 9bd86172a4c0..277c2ddd4dd9 100644 +--- a/llvm/include/llvm/IR/DebugInfoMetadata.h ++++ b/llvm/include/llvm/IR/DebugInfoMetadata.h +@@ -3062,14 +3062,23 @@ class DIGlobalVariable : public DIVariable { + + bool IsLocalToUnit; + bool IsDefinition; ++#ifdef ENABLE_CLASSIC_FLANG + DIFlags Flags; ++#endif + + DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line, +- bool IsLocalToUnit, bool IsDefinition, DIFlags Flags, ++ bool IsLocalToUnit, bool IsDefinition, ++#ifdef ENABLE_CLASSIC_FLANG ++ DIFlags Flags, ++#endif + uint32_t AlignInBits, ArrayRef<Metadata *> Ops) + : DIVariable(C, DIGlobalVariableKind, Storage, Line, Ops, AlignInBits), +- IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition), +- Flags(Flags) {} ++#ifdef ENABLE_CLASSIC_FLANG ++ IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition), Flags(Flags) {} ++#else ++ IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {} ++#endif ++ + ~DIGlobalVariable() = default; + + static DIGlobalVariable * +@@ -3077,28 +3086,40 @@ class DIGlobalVariable : public DIVariable { + StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, + bool IsLocalToUnit, bool IsDefinition, + DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, +- DIFlags Flags, uint32_t AlignInBits, DINodeArray Annotations, ++#ifdef ENABLE_CLASSIC_FLANG ++ DIFlags Flags, ++#endif ++ uint32_t AlignInBits, DINodeArray Annotations, + StorageType Storage, bool ShouldCreate = true) { + return getImpl(Context, Scope, getCanonicalMDString(Context, Name), + getCanonicalMDString(Context, LinkageName), File, Line, Type, + IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, +- cast_or_null<Metadata>(TemplateParams), Flags, AlignInBits, +- Annotations.get(), Storage, ShouldCreate); ++ cast_or_null<Metadata>(TemplateParams), ++#ifdef ENABLE_CLASSIC_FLANG ++ Flags, ++#endif ++ AlignInBits, Annotations.get(), Storage, ShouldCreate); + } + static DIGlobalVariable * + getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, + MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, + bool IsLocalToUnit, bool IsDefinition, + Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, +- DIFlags Flags, uint32_t AlignInBits, Metadata *Annotations, ++#ifdef ENABLE_CLASSIC_FLANG ++ DIFlags Flags, ++#endif
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2