[llvm-branch-commits] [lld] 496fb70 - [MachO] Fix enum-int mismatch warning

Mikael Holmen via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 28 08:44:55 PST 2020


Author: Gabriel Hjort Ã…kerlund
Date: 2020-12-28T17:39:41+01:00
New Revision: 496fb70b141ccbfaba9761294f3b4b97717096a3

URL: https://github.com/llvm/llvm-project/commit/496fb70b141ccbfaba9761294f3b4b97717096a3
DIFF: https://github.com/llvm/llvm-project/commit/496fb70b141ccbfaba9761294f3b4b97717096a3.diff

LOG: [MachO] Fix enum-int mismatch warning

Change-Id: Ie637dc7761144e5552b05a9c286f1e736579823d

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D91520

Added: 
    

Modified: 
    lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp

Removed: 
    


################################################################################
diff  --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
index 42ac711bc9dc..ddfd1764f7e1 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -1561,7 +1561,7 @@ void Util::addExportInfo(const lld::File &atomFile, NormalizedFile &nFile) {
 uint32_t Util::fileFlags() {
   // FIXME: these need to determined at runtime.
   if (_ctx.outputMachOType() == MH_OBJECT) {
-    return _subsectionsViaSymbols ? MH_SUBSECTIONS_VIA_SYMBOLS : 0;
+    return _subsectionsViaSymbols ? (uint32_t)MH_SUBSECTIONS_VIA_SYMBOLS : 0;
   } else {
     uint32_t flags = MH_DYLDLINK;
     if (!_ctx.useFlatNamespace())


        


More information about the llvm-branch-commits mailing list