<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Frontend/CompilerInvocation.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[clang] Delay normalization of `-fmodules-cache-path` (#150123)</title>
<updated>2025-09-10T22:17:44+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-10T22:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4a4bddec3571d78c8073fa45b57bbabc8796d13d'/>
<id>4a4bddec3571d78c8073fa45b57bbabc8796d13d</id>
<content type='text'>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays normalization of the module cache path until
`CompilerInstance` is asked for the cache path in the current
compilation context.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays normalization of the module cache path until
`CompilerInstance` is asked for the cache path in the current
compilation context.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Delay checking of `-fopenmp-host-ir-file-path` (#150124)</title>
<updated>2025-09-02T20:04:13+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-02T20:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a24e11fd951d3396ccbb469b2c5dc707dc4196a6'/>
<id>a24e11fd951d3396ccbb469b2c5dc707dc4196a6</id>
<content type='text'>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays opening the OpenMP host IR file until codegen.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays opening the OpenMP host IR file until codegen.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][analyzer] Delay checking the ctu-dir (#150139)</title>
<updated>2025-09-02T18:39:26+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-02T18:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1fc090f7f1dba97bf0c53d3b158ef4934804d3d9'/>
<id>1fc090f7f1dba97bf0c53d3b158ef4934804d3d9</id>
<content type='text'>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays checking that `ctu-dir` is an existing directory.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays checking that `ctu-dir` is an existing directory.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][analyzer] Delay checking the model-path (#150133)</title>
<updated>2025-09-02T17:43:04+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-02T17:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e96cd6562f64e11b4b3359f867bab8d45a79672'/>
<id>2e96cd6562f64e11b4b3359f867bab8d45a79672</id>
<content type='text'>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays checking that `model-path` is an existing directory.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays checking that `model-path` is an existing directory.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] [C2y] Implement N3355 ‘Named Loops’ (#152870)</title>
<updated>2025-09-02T16:37:19+00:00</updated>
<author>
<name>Sirraide</name>
<email>aeternalmail@gmail.com</email>
</author>
<published>2025-09-02T16:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e4a1b5f36e71c8c382bdd531867c5f6eb3f7deac'/>
<id>e4a1b5f36e71c8c382bdd531867c5f6eb3f7deac</id>
<content type='text'>
This implements support for [named
loops](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm) for
C2y. 

When parsing a `LabelStmt`, we create the `LabeDecl` early before we parse 
the substatement; this label is then passed down to `ParseWhileStatement()` 
and friends, which then store it in the loop’s (or switch statement’s) `Scope`; 
when we encounter a `break/continue` statement, we perform a lookup for 
the label (and error if it doesn’t exist), and then walk the scope stack and 
check if there is a scope whose preceding label is the target label, which 
identifies the jump target.

The feature is only supported in C2y mode, though a cc1-only option
exists for testing (`-fnamed-loops`), which is mostly intended to try
and make sure that we don’t have to refactor this entire implementation
when/if we start supporting it in C++.

---------

Co-authored-by: Balazs Benics &lt;benicsbalazs@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements support for [named
loops](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm) for
C2y. 

When parsing a `LabelStmt`, we create the `LabeDecl` early before we parse 
the substatement; this label is then passed down to `ParseWhileStatement()` 
and friends, which then store it in the loop’s (or switch statement’s) `Scope`; 
when we encounter a `break/continue` statement, we perform a lookup for 
the label (and error if it doesn’t exist), and then walk the scope stack and 
check if there is a scope whose preceding label is the target label, which 
identifies the jump target.

The feature is only supported in C2y mode, though a cc1-only option
exists for testing (`-fnamed-loops`), which is mostly intended to try
and make sure that we don’t have to refactor this entire implementation
when/if we start supporting it in C++.

---------

Co-authored-by: Balazs Benics &lt;benicsbalazs@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL][RootSignature] Introduce `HLSLFrontendAction` to implement `rootsig-define` (#154639)</title>
<updated>2025-08-25T23:09:34+00:00</updated>
<author>
<name>Finn Plummer</name>
<email>mail@inbelic.dev</email>
</author>
<published>2025-08-25T23:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=508ef1796cf3fb590c79e2c76bf3339d3e4a8739'/>
<id>508ef1796cf3fb590c79e2c76bf3339d3e4a8739</id>
<content type='text'>
This pr implements the functionality of `rootsig-define` as described
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0029-root-signature-driver-options.md#option--rootsig-define).

This is accomplished by:
- Defining the `fdx-rootsignature-define`, and `rootsig-define` alias,
driver options. It simply specifies the name of a macro that will expand
to a `LiteralString` to be interpreted as a root signature.
- Introduces a new general frontend action wrapper,
`HLSLFrontendAction`. This class allows us to introduce `HLSL` specific
behaviour on the underlying action (primarily `ASTFrontendAction`).
Which will be further extended, or modularly wrapped, when considering
future DXC options.
- Using `HLSLFrontendAction` we can add a new `PPCallback` that will
eagerly parse the root signature specified with `rootsig-define` and
push it as a `TopLevelDecl` to `Sema`. This occurs when the macro has
been lexed.
- Since the root signature is parsed early, before any function
declarations, we can then simply attach it to the entry function once it
is encountered. Overwriting any applicable root signature attrs.

Resolves https://github.com/llvm/llvm-project/issues/150274

##### Implementation considerations

To implement this feature, note that:
1. We need access to all defined macros. These are created as part of
the first `Lex` in `Parser::Initialize` after `PP-&gt;EnterMainSourceFile`
2. `RootSignatureDecl` must be added to `Sema` before
`Consumer-&gt;HandleTranslationUnit` is invoked in `ParseAST`

Therefore, we can't handle the root signature in
`HLSLFrontendAction::ExecuteAction` before (from 1.) or after (from 2.)
invoking the underlying `ASTFrontendAction`.

This means we could alternatively:
- Manually handle this case
[here](https://github.com/llvm/llvm-project/blob/ac8f0bb070c9071742b6f6ce03bebc9d87217830/clang/lib/Parse/ParseAST.cpp#L168)
before parsing the first top level decl.
- Hook into when we [return the entry function
decl](https://github.com/llvm/llvm-project/blob/ac8f0bb070c9071742b6f6ce03bebc9d87217830/clang/lib/Parse/Parser.cpp#L1190)
and then parse the root signature and override its `RootSignatureAttr`.

The proposed solution handles this in the most modular way which should
work on any `FrontendAction` that might use the `Parser` without
invoking `ParseAST`, and, is not subject to needing to call the hook in
multiple different places of function declarators.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This pr implements the functionality of `rootsig-define` as described
[here](https://github.com/llvm/wg-hlsl/blob/main/proposals/0029-root-signature-driver-options.md#option--rootsig-define).

This is accomplished by:
- Defining the `fdx-rootsignature-define`, and `rootsig-define` alias,
driver options. It simply specifies the name of a macro that will expand
to a `LiteralString` to be interpreted as a root signature.
- Introduces a new general frontend action wrapper,
`HLSLFrontendAction`. This class allows us to introduce `HLSL` specific
behaviour on the underlying action (primarily `ASTFrontendAction`).
Which will be further extended, or modularly wrapped, when considering
future DXC options.
- Using `HLSLFrontendAction` we can add a new `PPCallback` that will
eagerly parse the root signature specified with `rootsig-define` and
push it as a `TopLevelDecl` to `Sema`. This occurs when the macro has
been lexed.
- Since the root signature is parsed early, before any function
declarations, we can then simply attach it to the entry function once it
is encountered. Overwriting any applicable root signature attrs.

Resolves https://github.com/llvm/llvm-project/issues/150274

##### Implementation considerations

To implement this feature, note that:
1. We need access to all defined macros. These are created as part of
the first `Lex` in `Parser::Initialize` after `PP-&gt;EnterMainSourceFile`
2. `RootSignatureDecl` must be added to `Sema` before
`Consumer-&gt;HandleTranslationUnit` is invoked in `ParseAST`

Therefore, we can't handle the root signature in
`HLSLFrontendAction::ExecuteAction` before (from 1.) or after (from 2.)
invoking the underlying `ASTFrontendAction`.

This means we could alternatively:
- Manually handle this case
[here](https://github.com/llvm/llvm-project/blob/ac8f0bb070c9071742b6f6ce03bebc9d87217830/clang/lib/Parse/ParseAST.cpp#L168)
before parsing the first top level decl.
- Hook into when we [return the entry function
decl](https://github.com/llvm/llvm-project/blob/ac8f0bb070c9071742b6f6ce03bebc9d87217830/clang/lib/Parse/Parser.cpp#L1190)
and then parse the root signature and override its `RootSignatureAttr`.

The proposed solution handles this in the most modular way which should
work on any `FrontendAction` that might use the `Parser` without
invoking `ParseAST`, and, is not subject to needing to call the hook in
multiple different places of function declarators.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Obj-C][PAC] Make block descriptor pointer signing configurable (#153700)</title>
<updated>2025-08-15T00:20:27+00:00</updated>
<author>
<name>Oliver Hunt</name>
<email>oliver@apple.com</email>
</author>
<published>2025-08-15T00:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fb14f91305dd512f28927ee17766c1b00ae114dc'/>
<id>fb14f91305dd512f28927ee17766c1b00ae114dc</id>
<content type='text'>
Pointer auth protection of the block descriptor pointer is only
supported in some constrained environments so we do actually need it to
be configurable.

We had made it non configurable in the first PR to protect block
metadata because we believed that was an option but subsequently
realised it does need to remain configurable.

This PR revives the flags that permit this.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pointer auth protection of the block descriptor pointer is only
supported in some constrained environments so we do actually need it to
be configurable.

We had made it non configurable in the first PR to protect block
metadata because we believed that was an option but subsequently
realised it does need to remain configurable.

This PR revives the flags that permit this.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Obj-C][PAC] Add support for authenticating block metadata (#152978)</title>
<updated>2025-08-14T05:01:24+00:00</updated>
<author>
<name>Oliver Hunt</name>
<email>oliver@apple.com</email>
</author>
<published>2025-08-14T05:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d8850ee6c08fe38d992fb6f61d55a6afcaad6e6a'/>
<id>d8850ee6c08fe38d992fb6f61d55a6afcaad6e6a</id>
<content type='text'>
Introduces the use of pointer authentication to protect the invocation,
copy and dispose, reference, and descriptor pointers in Objective-C
block objects.

Resolves #141176</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduces the use of pointer authentication to protect the invocation,
copy and dispose, reference, and descriptor pointers in Objective-C
block objects.

Resolves #141176</pre>
</div>
</content>
</entry>
<entry>
<title>Fix MSVC warning in CompilerInvocation.cpp (#152809)</title>
<updated>2025-08-10T18:19:12+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2025-08-10T18:19:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=59f31d4e8df8cc35c816c05f2c653ca29e9a276e'/>
<id>59f31d4e8df8cc35c816c05f2c653ca29e9a276e</id>
<content type='text'>
Building Clang using MSVC was resulting in the following warning:

```
tuple(791): warning C4018: '&lt;': signed/unsigned mismatch
```

I traced this to CompilerInvocation.cpp where it was creating a
`std::tuple` to compare version numbers.

This change adds an explicit type for the `tuple` created from the
version macros to match the type of the variables, and uses the `tuple`
constructor instead of `tie` since the integers are smaller than a
reference to the integers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Building Clang using MSVC was resulting in the following warning:

```
tuple(791): warning C4018: '&lt;': signed/unsigned mismatch
```

I traced this to CompilerInvocation.cpp where it was creating a
`std::tuple` to compare version numbers.

This change adds an explicit type for the `tuple` created from the
version macros to match the type of the variables, and uses the `tuple`
constructor instead of `tie` since the integers are smaller than a
reference to the integers.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][NFC] Enumerate Clang ABI versions in a separate header file (#151995)</title>
<updated>2025-08-07T10:00:43+00:00</updated>
<author>
<name>Yanzuo Liu</name>
<email>zwuis@outlook.com</email>
</author>
<published>2025-08-07T10:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=109040acec00e5beaef35e51df3d73d5ba4212a4'/>
<id>109040acec00e5beaef35e51df3d73d5ba4212a4</id>
<content type='text'>
Make it easier for us to add ABI versions.

Close #144332</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it easier for us to add ABI versions.

Close #144332</pre>
</div>
</content>
</entry>
</feed>
