From 287533609d3a5b7fcc0cfdb4f895d1f87aa7fe01 Mon Sep 17 00:00:00 2001 From: yuhachen Date: Tue, 10 Oct 2023 14:47:56 +0800 Subject: [PATCH] remove external linkage. --- llpc/lower/llpcSpirvLowerRayTracing.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/llpc/lower/llpcSpirvLowerRayTracing.cpp b/llpc/lower/llpcSpirvLowerRayTracing.cpp index 39c2e6d404..8d64a72570 100644 --- a/llpc/lower/llpcSpirvLowerRayTracing.cpp +++ b/llpc/lower/llpcSpirvLowerRayTracing.cpp @@ -654,18 +654,11 @@ PreservedAnalyses SpirvLowerRayTracing::run(Module &module, ModuleAnalysisManage func->eraseFromParent(); } - StringRef traceRayGetInstanceIndx = - m_context->getPipelineContext()->getRayTracingFunctionName(Vkgc::RT_ENTRY_INSTANCE_INDEX); - - StringRef traceRayGetInstanceId = - m_context->getPipelineContext()->getRayTracingFunctionName(Vkgc::RT_ENTRY_INSTANCE_ID); - // Newly generated implementation functions are external linkage, fix that. for (auto funcIt = module.begin(), funcEnd = module.end(); funcIt != funcEnd;) { Function *func = &*funcIt++; if (func->getLinkage() == GlobalValue::ExternalLinkage && !func->empty()) { - if (!func->getName().startswith(module.getName()) && !func->getName().startswith(traceRayGetInstanceId) && - !func->getName().startswith(traceRayGetInstanceIndx)) { + if (!func->getName().startswith(module.getName())) { func->setLinkage(GlobalValue::InternalLinkage); } }