Quellcode durchsuchen

[NFC] Delete dead code (#5000)

This code is completely dead and unused.
Chris B vor 2 Jahren
Ursprung
Commit
14f06a6ea9
2 geänderte Dateien mit 0 neuen und 21 gelöschten Zeilen
  1. 0 4
      tools/clang/include/clang/AST/HlslTypes.h
  2. 0 17
      tools/clang/lib/AST/HlslTypes.cpp

+ 0 - 4
tools/clang/include/clang/AST/HlslTypes.h

@@ -301,10 +301,6 @@ struct SemanticDecl : public UnusualAnnotation
 ParameterModifier
 ParamModFromAttributeList(_In_opt_ clang::AttributeList *pAttributes);
 
-/// Returns a ParameterModifier initialized as per the attribute list.
-ParameterModifier
-ParamModFromAttrs(llvm::ArrayRef<clang::InheritableAttr *> attributes);
-
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // AST manipulation functions.
 

+ 0 - 17
tools/clang/lib/AST/HlslTypes.cpp

@@ -870,23 +870,6 @@ hlsl::ParameterModifier ParamModFromAttributeList(clang::AttributeList *pAttribu
   return ParameterModifier::FromInOut(isIn, isOut);
 }
 
-hlsl::ParameterModifier ParamModFromAttrs(llvm::ArrayRef<InheritableAttr *> attributes) {
-  bool isIn = false, isOut = false;
-  for (InheritableAttr * attr : attributes) {
-    if (isa<HLSLInAttr>(attr))
-      isIn = true;
-    else if (isa<HLSLOutAttr>(attr))
-      isOut = true;
-    else if (isa<HLSLInOutAttr>(attr))
-      isIn = isOut = true;
-  }
-  // Without any specifications, default to in.
-  if (!isIn && !isOut) {
-    isIn = true;
-  }
-  return ParameterModifier::FromInOut(isIn, isOut);
-}
-
 HLSLScalarType MakeUnsigned(HLSLScalarType T) {
     switch (T) {
     case HLSLScalarType_int: