|
@@ -286,7 +286,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(FunctionSymbol::Create(pMalloc, pSession, m_ID, m_Node, m_TypeID, m_Node->getType(), ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str(), CP_UTF8));
|
|
|
return S_OK;
|
|
|
}
|
|
|
|
|
@@ -378,7 +378,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(TypedefTypeSymbol::Create(pMalloc, pSession, m_ParentID, m_ID, m_Node, m_BaseTypeID, ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str(), CP_UTF8));
|
|
|
return S_OK;
|
|
|
}
|
|
|
|
|
@@ -413,7 +413,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(VectorTypeSymbol::Create(pMalloc, pSession, m_ParentID, m_ID, m_Node, m_ElemTyID, m_NumElts, ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str(), CP_UTF8));
|
|
|
return S_OK;
|
|
|
}
|
|
|
|
|
@@ -468,7 +468,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(GlobalVariableSymbol::Create(pMalloc, pSession, m_ID, m_GV, m_TypeID, m_Type, ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_GV->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_GV->getName().str().c_str(), CP_UTF8));
|
|
|
(*ppRet)->SetIsHLSLData(true);
|
|
|
return S_OK;
|
|
|
}
|
|
@@ -538,7 +538,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(LocalVariableSymbol::Create(pMalloc, pSession, m_ID, m_Node, m_TypeID, m_Type, m_VI->GetOffsetInUDT(), m_VI->GetDxilRegister(), ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str(), CP_UTF8));
|
|
|
(*ppRet)->SetDataKind(m_Node->getTag() == llvm::dwarf::DW_TAG_arg_variable ? DataIsParam : DataIsLocal);
|
|
|
return S_OK;
|
|
|
}
|
|
@@ -572,7 +572,7 @@ public:
|
|
|
IMalloc *pMalloc = pSession->GetMallocNoRef();
|
|
|
IFR(UDTFieldSymbol::Create(pMalloc, pSession, m_ID, m_Node, m_TypeID, m_Type, ppRet));
|
|
|
(*ppRet)->SetLexicalParent(m_ParentID);
|
|
|
- (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str()));
|
|
|
+ (*ppRet)->SetName(CA2W(m_Node->getName().str().c_str(), CP_UTF8));
|
|
|
(*ppRet)->SetDataKind(m_Node->isStaticMember() ? DataIsStaticLocal : DataIsMember);
|
|
|
return S_OK;
|
|
|
}
|
|
@@ -841,7 +841,7 @@ HRESULT dxil_dia::hlsl_symbols::CompilandEnvSymbol::CreateDefines(IMalloc *pMall
|
|
|
for (llvm::MDNode::op_iterator it = definesNode->op_begin(); it != definesNode->op_end(); ++it) {
|
|
|
llvm::StringRef strRef = llvm::dyn_cast<llvm::MDString>(*it)->getString();
|
|
|
std::string str(strRef.begin(), strRef.size());
|
|
|
- CA2W cv(str.c_str());
|
|
|
+ CA2W cv(str.c_str(), CP_UTF8);
|
|
|
pBSTR.Append(cv);
|
|
|
pBSTR.Append(L"\0", 1);
|
|
|
}
|
|
@@ -904,7 +904,7 @@ STDMETHODIMP dxil_dia::hlsl_symbols::TypeSymbol::get_name(
|
|
|
DXASSERT(!this->HasName(), "Setting type name multiple times.");
|
|
|
std::string Name;
|
|
|
IFR(m_lazySymbolName(m_pSession, &Name));
|
|
|
- this->SetName(CA2W(Name.c_str()));
|
|
|
+ this->SetName(CA2W(Name.c_str(), CP_UTF8));
|
|
|
m_lazySymbolName = nullptr;
|
|
|
}
|
|
|
return Symbol::get_name(pRetVal);
|
|
@@ -1349,7 +1349,7 @@ HRESULT dxil_dia::hlsl_symbols::SymbolManagerInit::CreateSubroutineType(DWORD dw
|
|
|
if (!name) {
|
|
|
OS << "???";
|
|
|
} else {
|
|
|
- OS << CW2A((BSTR)name);
|
|
|
+ OS << CW2A((BSTR)name, CP_UTF8);
|
|
|
}
|
|
|
}
|
|
|
if (first) {
|
|
@@ -1416,7 +1416,7 @@ HRESULT dxil_dia::hlsl_symbols::SymbolManagerInit::CreateCompositeType(DWORD dwP
|
|
|
if (!name) {
|
|
|
OS << "???";
|
|
|
} else {
|
|
|
- OS << CW2A((BSTR)name);
|
|
|
+ OS << CW2A((BSTR)name, CP_UTF8);
|
|
|
}
|
|
|
|
|
|
OS << "[";
|
|
@@ -1613,7 +1613,7 @@ HRESULT dxil_dia::hlsl_symbols::SymbolManagerInit::HandleDerivedType(DWORD dwPar
|
|
|
if (!name) {
|
|
|
OS << "???";
|
|
|
} else {
|
|
|
- OS << CW2A((BSTR)name);
|
|
|
+ OS << CW2A((BSTR)name, CP_UTF8);
|
|
|
}
|
|
|
OS << Qualifier;
|
|
|
return S_OK;
|