summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
diff options
context:
space:
mode:
authorJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>2023-07-12 11:00:16 +0200
committerJuan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com>2023-07-12 11:08:16 +0200
commit367b1f28dbcfda5b7909f4d271bcace063398143 (patch)
treee0ca73d3988d7fa822f3fd659b191a84d604a324 /llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
parent7689179ac9c4f2d6469f617b92a18b350d36b43d (diff)
[NFC][AMDGPULowerModuleLDSPass] Fix buildbot santizier failed to compile
It seems that the sanitizer-x86_64-linux-android wasn't able to deduce the template argument: AMDGPULowerModuleLDSPass.cpp:1192:53: error: no viable constructor or deduction guide for deduction of template arguments of 'vector' auto TableLookupVariablesOrdered = sortByName(std::vector( This patch makes the template argument explicit.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index c83da6187492..4cd138e3f6fb 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -1189,8 +1189,9 @@ public:
// The order must be consistent between lookup table and accesses to
// lookup table
- auto TableLookupVariablesOrdered = sortByName(std::vector(
- TableLookupVariables.begin(), TableLookupVariables.end()));
+ auto TableLookupVariablesOrdered =
+ sortByName(std::vector<GlobalVariable *>(TableLookupVariables.begin(),
+ TableLookupVariables.end()));
GlobalVariable *LookupTable = buildLookupTable(
M, TableLookupVariablesOrdered, OrderedKernels, KernelToReplacement);
@@ -1337,8 +1338,8 @@ private:
// The order of fields in this struct depends on the order of
// varables in the argument which varies when changing how they
// are identified, leading to spurious test breakage.
- auto Sorted = sortByName(
- std::vector(LDSVarsToTransform.begin(), LDSVarsToTransform.end()));
+ auto Sorted = sortByName(std::vector<GlobalVariable *>(
+ LDSVarsToTransform.begin(), LDSVarsToTransform.end()));
for (GlobalVariable *GV : Sorted) {
OptimizedStructLayoutField F(GV,
@@ -1427,7 +1428,7 @@ private:
// A hack... we need to insert the aliasing info in a predictable order for
// lit tests. Would like to have them in a stable order already, ideally the
// same order they get allocated, which might mean an ordered set container
- std::vector<GlobalVariable *> LDSVarsToTransform = sortByName(std::vector(
+ auto LDSVarsToTransform = sortByName(std::vector<GlobalVariable *>(
LDSVarsToTransformArg.begin(), LDSVarsToTransformArg.end()));
// Create alias.scope and their lists. Each field in the new structure