Skip to content

Commit 7710bfb

Browse files
committed
cr feedback - remove include, update error messages
1 parent 0fe1bce commit 7710bfb

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,7 +3438,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx,
34383438
return;
34393439
}
34403440
case Type::HLSLAttributedResource:
3441-
llvm_unreachable("not yet implemented");
3441+
llvm_unreachable("should never get here");
34423442
break;
34433443
case Type::DeducedTemplateSpecialization:
34443444
case Type::Auto:
@@ -13386,6 +13386,7 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X,
1338613386
SUGAR_FREE_TYPE(Record)
1338713387
SUGAR_FREE_TYPE(SubstTemplateTypeParmPack)
1338813388
SUGAR_FREE_TYPE(UnresolvedUsing)
13389+
SUGAR_FREE_TYPE(HLSLAttributedResource)
1338913390
#undef SUGAR_FREE_TYPE
1339013391
#define NON_UNIQUE_TYPE(Class) UNEXPECTED_TYPE(Class, "non-unique")
1339113392
NON_UNIQUE_TYPE(TypeOfExpr)
@@ -13690,9 +13691,6 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X,
1369013691
TX->getDepth(), TX->getIndex(), TX->isParameterPack(),
1369113692
getCommonDecl(TX->getDecl(), TY->getDecl()));
1369213693
}
13693-
case Type::HLSLAttributedResource: {
13694-
llvm_unreachable("not yet implemented");
13695-
}
1369613694
}
1369713695
llvm_unreachable("Unknown Type Class");
1369813696
}

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "llvm/ADT/SmallVector.h"
3333
#include "llvm/ADT/StringExtras.h"
3434
#include "llvm/Support/CRC.h"
35-
#include "llvm/Support/DXILABI.h"
3635
#include "llvm/Support/MD5.h"
3736
#include "llvm/Support/MathExtras.h"
3837
#include "llvm/Support/StringSaver.h"

clang/lib/CodeGen/ItaniumCXXABI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,7 +3945,7 @@ void ItaniumRTTIBuilder::BuildVTablePointer(const Type *Ty) {
39453945
break;
39463946

39473947
case Type::HLSLAttributedResource:
3948-
llvm_unreachable("not yet implemented");
3948+
llvm_unreachable("HLSL doesn't support virtual functions");
39493949
}
39503950

39513951
llvm::Constant *VTable = nullptr;
@@ -4210,7 +4210,7 @@ llvm::Constant *ItaniumRTTIBuilder::BuildTypeInfo(
42104210
break;
42114211

42124212
case Type::HLSLAttributedResource:
4213-
llvm_unreachable("not yet implemented");
4213+
llvm_unreachable("HLSL doesn't support RTTI");
42144214
}
42154215

42164216
llvm::Constant *Init = llvm::ConstantStruct::getAnon(Fields);

clang/lib/CodeGen/Targets/DirectX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM,
4646
// convert element type
4747
llvm::Type *ElemType = CGM.getTypes().ConvertType(ContainedTy);
4848

49-
const char *TypeName =
49+
llvm::StringRef TypeName =
5050
ResAttrs.RawBuffer ? "dx.RawBuffer" : "dx.TypedBuffer";
5151
SmallVector<unsigned, 3> Ints = {/*IsWriteable*/ ResAttrs.ResourceClass ==
5252
llvm::dxil::ResourceClass::UAV,

0 commit comments

Comments
 (0)