[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)
Tex Riddell via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 18:30:07 PST 2024
================
@@ -553,3 +748,20 @@ void HLSLExternalSemaSource::CompleteType(TagDecl *Tag) {
return;
It->second(Record);
}
+
+static FunctionDecl *lookupBuiltinFunction(Sema &S, StringRef Name) {
+ IdentifierInfo &II =
+ S.getASTContext().Idents.get(Name, tok::TokenKind::identifier);
+ DeclarationNameInfo NameInfo =
+ DeclarationNameInfo(DeclarationName(&II), SourceLocation());
+ LookupResult R(S, NameInfo, Sema::LookupOrdinaryName);
+ // AllowBuiltinCreation is false but LookupDirect will create
+ // the builtin when searching the global scope anyways...
+ S.LookupName(R, S.getCurScope());
+ // FIXME: If the builtin function was user-declared in global scope,
----------------
tex3d wrote:
Since this is just moving a pre-existing function, feel free to ignore this comment for the purpose of completing the PR. I'm just wondering out loud.
https://github.com/llvm/llvm-project/pull/114148
More information about the cfe-commits
mailing list