[llvm] bcb20aa - Fixed the build failure of yaml2obj in XCOFFEmitter.cpp:

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 6 22:49:35 PDT 2021


Author: Esme-Yi
Date: 2021-06-07T05:45:05Z
New Revision: bcb20aa7701d3e2d6deef24ce26c25ed7d2dbc6b

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

LOG: Fixed the build failure of yaml2obj in XCOFFEmitter.cpp:
  error: ambiguous overload for 'operator=='
  (operand types are 'llvm::yaml::Hex16' and 'llvm::XCOFF::MagicNumber')
     Is64Bit = Obj.Header.Magic == XCOFF::XCOFF64;

Added: 
    

Modified: 
    llvm/lib/ObjectYAML/XCOFFEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ObjectYAML/XCOFFEmitter.cpp b/llvm/lib/ObjectYAML/XCOFFEmitter.cpp
index 67c890eebd77..8d2c17c76e0d 100644
--- a/llvm/lib/ObjectYAML/XCOFFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/XCOFFEmitter.cpp
@@ -32,7 +32,7 @@ class XCOFFWriter {
 public:
   XCOFFWriter(XCOFFYAML::Object &Obj, raw_ostream &OS, yaml::ErrorHandler EH)
       : Obj(Obj), W(OS, support::big), ErrHandler(EH) {
-    Is64Bit = Obj.Header.Magic == XCOFF::XCOFF64;
+    Is64Bit = Obj.Header.Magic == (llvm::yaml::Hex16)XCOFF::XCOFF64;
   }
   bool writeXCOFF();
 


        


More information about the llvm-commits mailing list