diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp index a9b5ca483861..06f08db2eadd 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/SystemZ.cpp @@ -138,6 +138,16 @@ bool SystemZTargetInfo::hasFeature(StringRef Feature) const { .Default(false); } +unsigned SystemZTargetInfo::getMinGlobalAlign(uint64_t Size, + bool HasNonWeakDef) const { + // Don't enforce the minimum alignment on an external or weak symbol if + // -munaligned-symbols is passed. + if (UnalignedSymbols && !HasNonWeakDef) + return 0; + + return MinGlobalAlign; +} + void SystemZTargetInfo::getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const { Builder.defineMacro("__s390__"); |