Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDxcTranslationUnit::ParseTranslationUnit compatible cmdline arguments #7061

Closed
plekakis opened this issue Jan 13, 2025 · 2 comments
Closed
Labels
user-support Issues from users requesting support.
Milestone

Comments

@plekakis
Copy link

What is the issue you're encountering?
I am looking to generate AST for a given shader entry point.

Steps to Reproduce (if applicable)
Attempting to parse the translation unit and giving the following parameters:
const char* command_line_args[] = { "-E", "CS_Main"};
HRESULT hr = tuIndex->ParseTranslationUnit(getDefaultFileName(), command_line_args, 2, &(unsavedFile.p), 1, localOptions, &tu);

Gives me a return code of: 2147500037 [0x80004005]

Is there a listing of compatible command line arguments for ParseTranslationUnit? I know -HV works (based on the the DXISenseTest.cpp)

Environment
dxcompiler.dll: 1.8 - 1.8.2407.7 (416fab6); dxil.dll: 1.8(101.8.2407.12)

@plekakis plekakis added needs-triage Awaiting triage user-support Issues from users requesting support. labels Jan 13, 2025
@damyanp damyanp removed the needs-triage Awaiting triage label Jan 14, 2025
@damyanp damyanp added this to the Dormant milestone Jan 14, 2025
@damyanp
Copy link
Member

damyanp commented Jan 14, 2025

This API isn't something that we're intending to support long term. Depending on what you're trying to do this may well be something worth discussing with us as we design the clangd-based replacement. Maybe we can provide a better answer if we understand better what you're trying to use the AST for.

There's also the DirectX and LLVM discords where you can get in touch with the people working in this area.

@damyanp damyanp moved this to Triaged in HLSL Triage Jan 14, 2025
@plekakis
Copy link
Author

So the main reason I want to use the AST is for code-gen in my shader compiler (mostly for code modifications and resource/structures collections). For my use case perhaps reflection is a better way to do it though.

If the API is not meant to be used long term, I am happy to close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-support Issues from users requesting support.
Projects
Archived in project
Development

No branches or pull requests

2 participants