Browse Source

Fix OP::GetTypeName = used in if instead of == causing assert.

Tex Riddell 7 years ago
parent
commit
005c534977
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/HLSL/DxilOperations.cpp

+ 1 - 1
lib/HLSL/DxilOperations.cpp

@@ -360,7 +360,7 @@ const char * OP::GetTypeName(Type *Ty, std::string &str) {
   unsigned TypeSlot = OP::GetTypeSlot(Ty);
   if (TypeSlot < kUserDefineTypeSlot) {
     return GetOverloadTypeName(TypeSlot);
-  } else if (TypeSlot = kObjectTypeSlot) {
+  } else if (TypeSlot == kObjectTypeSlot) {
     StructType *ST = cast<StructType>(Ty);
     return ST->getStructName().data();
   } else {