2
0
Эх сурвалжийг харах

Modify dxc header generator to use unsigned char instead of BYTE (#59)

Using the BYTE typedef for generated code forces including windows headers to compile the generated code. Using unsigned char we can compile without additional header dependencies.
mrvux 8 жил өмнө
parent
commit
ee10ad4224

+ 1 - 1
tools/clang/tools/dxc/dxc.cpp

@@ -506,7 +506,7 @@ void DxcContext::WriteHeader(IDxcBlobEncoding *pDisassembly, IDxcBlob *pCode,
   {
     std::string s;
     llvm::raw_string_ostream OS(s);
-    OS << "\r\nconst BYTE " << pVariableName << "[] = {";
+    OS << "\r\nconst unsigned char " << pVariableName << "[] = {";
     const uint8_t *pBytes = (const uint8_t *)pCode->GetBufferPointer();
     size_t len = pCode->GetBufferSize();
     s.reserve(100 + len * 6 + (len / 12) * 3); // rough estimate