]> granicus.if.org Git - llvm/commitdiff
[Bitcode] Update naming of UNOP_NEG to UNOP_FNEG
authorCameron McInally <cameron.mcinally@nyu.edu>
Mon, 7 Oct 2019 20:41:25 +0000 (20:41 +0000)
committerCameron McInally <cameron.mcinally@nyu.edu>
Mon, 7 Oct 2019 20:41:25 +0000 (20:41 +0000)
Differential Revision: https://reviews.llvm.org/D68588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373958 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/LLVMBitCodes.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp

index decd4dd3a9659621b4be6c28ae78ee26c631e3b5..1a397068caf0ab5ad8c1d6cecd402c9fa44b9b7b 100644 (file)
@@ -391,7 +391,7 @@ enum CastOpcodes {
 /// have no fixed relation to the LLVM IR enum values.  Changing these will
 /// break compatibility with old files.
 enum UnaryOpcodes {
-  UNOP_NEG = 0
+  UNOP_FNEG = 0
 };
 
 /// BinaryOpcodes - These are values used in the bitcode files to encode which
index 9c377552b4a360084ecf02cfa22b93dcda498627..bd1115f238b36080cf90d4d2f9c57713ed53efb1 100644 (file)
@@ -1063,7 +1063,7 @@ static int getDecodedUnaryOpcode(unsigned Val, Type *Ty) {
   switch (Val) {
   default:
     return -1;
-  case bitc::UNOP_NEG:
+  case bitc::UNOP_FNEG:
     return IsFP ? Instruction::FNeg : -1;
   }
 }
index 2818e843b50b65f1e120c5c09dd50d8c6093eadc..deb4019ea8ba73c7036530f359ca450589fad043 100644 (file)
@@ -520,7 +520,7 @@ static unsigned getEncodedCastOpcode(unsigned Opcode) {
 static unsigned getEncodedUnaryOpcode(unsigned Opcode) {
   switch (Opcode) {
   default: llvm_unreachable("Unknown binary instruction!");
-  case Instruction::FNeg: return bitc::UNOP_NEG;
+  case Instruction::FNeg: return bitc::UNOP_FNEG;
   }
 }