[clang] [HLSL] replace std::unordered_map with DenseMap (PR #168739)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 19 08:53:31 PST 2025
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/168739
Broke some builds because of a missing include. Changing to a DenseMap and adding the missing include.
>From 2b153a36bde212070587b9713dde07c06bfcf5de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= <brioche at google.com>
Date: Wed, 19 Nov 2025 17:51:14 +0100
Subject: [PATCH] [HLSL] replace std::unordered_map with DenseMap
Broke some builds because of a missing include. Changing to a DenseMap
and adding the missing include.
---
clang/lib/CodeGen/CGHLSLRuntime.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.cpp b/clang/lib/CodeGen/CGHLSLRuntime.cpp
index 0371af417bdab..5af2a1e9f191d 100644
--- a/clang/lib/CodeGen/CGHLSLRuntime.cpp
+++ b/clang/lib/CodeGen/CGHLSLRuntime.cpp
@@ -27,6 +27,7 @@
#include "clang/AST/Type.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
@@ -905,7 +906,7 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
OB.emplace_back("convergencectrl", bundleArgs);
}
- std::unordered_map<const DeclaratorDecl *, llvm::Value *> OutputSemantic;
+ llvm::DenseMap<const DeclaratorDecl *, llvm::Value *> OutputSemantic;
unsigned SRetOffset = 0;
for (const auto &Param : Fn->args()) {
More information about the cfe-commits
mailing list