Skip to content

Commit cf9788e

Browse files
committed
review: clean up after moving
- remove uneeded headers - rename to new directory
1 parent 5439fa8 commit cf9788e

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

clang/include/clang/Lex/LexHLSLRootSignature.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
//===--- ParseHLSLRootSignature.h -------------------------------*- C++ -*-===//
1+
//===--- LexHLSLRootSignature.h ---------------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file defines the ParseHLSLRootSignature interface.
9+
// This file defines the LexHLSLRootSignature interface.
1010
//
1111
//===----------------------------------------------------------------------===//
1212

1313
#ifndef LLVM_CLANG_PARSE_PARSEHLSLROOTSIGNATURE_H
1414
#define LLVM_CLANG_PARSE_PARSEHLSLROOTSIGNATURE_H
1515

16-
#include "clang/AST/APValue.h"
17-
#include "clang/Basic/DiagnosticLex.h"
18-
#include "clang/Lex/LiteralSupport.h"
19-
#include "clang/Lex/Preprocessor.h"
16+
#include "clang/Basic/SourceLocation.h"
2017

2118
#include "llvm/ADT/SmallVector.h"
2219
#include "llvm/ADT/StringRef.h"
@@ -28,7 +25,7 @@ namespace hlsl {
2825
struct RootSignatureToken {
2926
enum Kind {
3027
#define TOK(X) X,
31-
#include "clang/Parse/HLSLRootSignatureTokenKinds.def"
28+
#include "clang/Lex/HLSLRootSignatureTokenKinds.def"
3229
};
3330

3431
Kind Kind = Kind::invalid;

clang/lib/Lex/LexHLSLRootSignature.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "clang/Parse/ParseHLSLRootSignature.h"
1+
#include "clang/Lex/LexHLSLRootSignature.h"
22

33
namespace clang {
44
namespace hlsl {
@@ -30,7 +30,7 @@ RootSignatureToken RootSignatureLexer::LexToken() {
3030
AdvanceBuffer(); \
3131
return Result; \
3232
}
33-
#include "clang/Parse/HLSLRootSignatureTokenKinds.def"
33+
#include "clang/Lex/HLSLRootSignatureTokenKinds.def"
3434
default:
3535
break;
3636
}
@@ -89,7 +89,7 @@ RootSignatureToken RootSignatureLexer::LexToken() {
8989
auto Switch = llvm::StringSwitch<TokenKind>(TokSpelling);
9090
#define KEYWORD(NAME) Switch.Case(#NAME, TokenKind::kw_##NAME);
9191
#define ENUM(NAME, LIT) Switch.CaseLower(LIT, TokenKind::en_##NAME);
92-
#include "clang/Parse/HLSLRootSignatureTokenKinds.def"
92+
#include "clang/Lex/HLSLRootSignatureTokenKinds.def"
9393

9494
// Then attempt to retreive a string from it
9595
Result.Kind = Switch.Default(TokenKind::invalid);

clang/unittests/Lex/LexHLSLRootSignatureTest.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
//=== ParseHLSLRootSignatureTest.cpp - Parse Root Signature tests ---------===//
1+
//=== LexHLSLRootSignatureTest.cpp - Lex Root Signature tests -------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "clang/Parse/ParseHLSLRootSignature.h"
9+
#include "clang/Lex/LexHLSLRootSignature.h"
1010
#include "gtest/gtest.h"
1111

1212
using namespace clang;
1313

1414
namespace {
1515

1616
// The test fixture.
17-
class ParseHLSLRootSignatureTest : public ::testing::Test {
17+
class LexHLSLRootSignatureTest : public ::testing::Test {
1818
protected:
19-
ParseHLSLRootSignatureTest() {}
19+
LexHLSLRootSignatureTest() {}
2020

2121
void CheckTokens(hlsl::RootSignatureLexer &Lexer,
2222
SmallVector<hlsl::RootSignatureToken> &Computed,
@@ -38,7 +38,7 @@ class ParseHLSLRootSignatureTest : public ::testing::Test {
3838

3939
// Lexing Tests
4040

41-
TEST_F(ParseHLSLRootSignatureTest, ValidLexNumbersTest) {
41+
TEST_F(LexHLSLRootSignatureTest, ValidLexNumbersTest) {
4242
// This test will check that we can lex different number tokens
4343
const llvm::StringLiteral Source = R"cc(
4444
-42 42 +42 +2147483648
@@ -75,7 +75,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidLexNumbersTest) {
7575
ASSERT_EQ(IntToken.NumSpelling, "2147483648");
7676
}
7777

78-
TEST_F(ParseHLSLRootSignatureTest, ValidLexAllTokensTest) {
78+
TEST_F(LexHLSLRootSignatureTest, ValidLexAllTokensTest) {
7979
// This test will check that we can lex all defined tokens as defined in
8080
// HLSLRootSignatureTokenKinds.def, plus some additional integer variations
8181
const llvm::StringLiteral Source = R"cc(
@@ -114,13 +114,13 @@ TEST_F(ParseHLSLRootSignatureTest, ValidLexAllTokensTest) {
114114
SmallVector<hlsl::RootSignatureToken> Tokens;
115115
SmallVector<hlsl::TokenKind> Expected = {
116116
#define TOK(NAME) hlsl::TokenKind::NAME,
117-
#include "clang/Parse/HLSLRootSignatureTokenKinds.def"
117+
#include "clang/Lex/HLSLRootSignatureTokenKinds.def"
118118
};
119119

120120
CheckTokens(Lexer, Tokens, Expected);
121121
}
122122

123-
TEST_F(ParseHLSLRootSignatureTest, ValidLexPeekTest) {
123+
TEST_F(LexHLSLRootSignatureTest, ValidLexPeekTest) {
124124
// This test will check that we the peek api is correctly used
125125
const llvm::StringLiteral Source = R"cc(
126126
)1

0 commit comments

Comments
 (0)