Skip to content

Commit ffd9ec6

Browse files
committed
Merge branch 'main' into update_nd_fix
2 parents 4a6f72f + af98a24 commit ffd9ec6

File tree

82 files changed

+2281
-1750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2281
-1750
lines changed

.github/workflows/premerge.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
# why we do not hardcode it.
6363
export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET
6464
export SCCACHE_GCS_RW_MODE=READ_WRITE
65+
66+
# Set the idle timeout to zero to ensure sccache runs for the
67+
# entire duration of the job. Otherwise it might stop if we run
68+
# several test suites in a row and discard statistics that we want
69+
# to save in the end.
70+
export SCCACHE_IDLE_TIMEOUT=0
6571
sccache --start-server
6672
6773
./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}" "${runtimes_check_targets_needs_reconfig}" "${enable_cir}"
@@ -110,7 +116,9 @@ jobs:
110116
shell: cmd
111117
run: |
112118
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
113-
bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
119+
# See the comments above in the Linux job for why we define each of
120+
# these environment variables.
121+
bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
114122
- name: Upload Artifacts
115123
if: '!cancelled()'
116124
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0

clang/include/clang/Parse/ParseHLSLRootSignature.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ namespace hlsl {
3030
class RootSignatureParser {
3131
public:
3232
RootSignatureParser(llvm::dxbc::RootSignatureVersion Version,
33-
SmallVector<RootSignatureElement> &Elements,
3433
StringLiteral *Signature, Preprocessor &PP);
3534

3635
/// Consumes tokens from the Lexer and constructs the in-memory
@@ -40,6 +39,9 @@ class RootSignatureParser {
4039
/// Returns true if a parsing error is encountered.
4140
bool parse();
4241

42+
/// Return all elements that have been parsed.
43+
ArrayRef<RootSignatureElement> getElements() { return Elements; }
44+
4345
private:
4446
DiagnosticsEngine &getDiags() { return PP.getDiagnostics(); }
4547

@@ -226,7 +228,7 @@ class RootSignatureParser {
226228

227229
private:
228230
llvm::dxbc::RootSignatureVersion Version;
229-
SmallVector<RootSignatureElement> &Elements;
231+
SmallVector<RootSignatureElement> Elements;
230232
StringLiteral *Signature;
231233
RootSignatureLexer Lexer;
232234
Preprocessor &PP;

clang/lib/Parse/ParseDeclCXX.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4940,17 +4940,16 @@ void Parser::ParseHLSLRootSignatureAttributeArgs(ParsedAttributes &Attrs) {
49404940
// signature string and construct the in-memory elements
49414941
if (!Found) {
49424942
// Invoke the root signature parser to construct the in-memory constructs
4943-
SmallVector<hlsl::RootSignatureElement> RootElements;
4944-
hlsl::RootSignatureParser Parser(getLangOpts().HLSLRootSigVer, RootElements,
4945-
Signature, PP);
4943+
hlsl::RootSignatureParser Parser(getLangOpts().HLSLRootSigVer, Signature,
4944+
PP);
49464945
if (Parser.parse()) {
49474946
T.consumeClose();
49484947
return;
49494948
}
49504949

49514950
// Construct the declaration.
49524951
Actions.HLSL().ActOnFinishRootSignatureDecl(RootSignatureLoc, DeclIdent,
4953-
RootElements);
4952+
Parser.getElements());
49544953
}
49554954

49564955
// Create the arg for the ParsedAttr

clang/lib/Parse/ParseHLSLRootSignature.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ static const TokenKind RootElementKeywords[] = {
2727
};
2828

2929
RootSignatureParser::RootSignatureParser(
30-
llvm::dxbc::RootSignatureVersion Version,
31-
SmallVector<RootSignatureElement> &Elements, StringLiteral *Signature,
30+
llvm::dxbc::RootSignatureVersion Version, StringLiteral *Signature,
3231
Preprocessor &PP)
33-
: Version(Version), Elements(Elements), Signature(Signature),
34-
Lexer(Signature->getString()), PP(PP), CurToken(0) {}
32+
: Version(Version), Signature(Signature), Lexer(Signature->getString()),
33+
PP(PP), CurToken(0) {}
3534

3635
bool RootSignatureParser::parse() {
3736
// Iterate as many RootSignatureElements as possible, until we hit the

0 commit comments

Comments
 (0)