diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-24 19:17:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:24:44 +0000 |
commit | ab50317e96e57dee5b3ff4ad3f16f205b2a3359e (patch) | |
tree | 4b1f388eb6a07e574417aaacecd3ec4a83550718 /contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp | |
parent | 412542983a5ba62902141a8a7e155cceb9196a66 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp index 7de0959ca57e..209a6a34a3c9 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/ModuleUtils.cpp @@ -329,35 +329,6 @@ std::string llvm::getUniqueModuleId(Module *M) { return ("." + Str).str(); } -void VFABI::setVectorVariantNames(CallInst *CI, - ArrayRef<std::string> VariantMappings) { - if (VariantMappings.empty()) - return; - - SmallString<256> Buffer; - llvm::raw_svector_ostream Out(Buffer); - for (const std::string &VariantMapping : VariantMappings) - Out << VariantMapping << ","; - // Get rid of the trailing ','. - assert(!Buffer.str().empty() && "Must have at least one char."); - Buffer.pop_back(); - - Module *M = CI->getModule(); -#ifndef NDEBUG - for (const std::string &VariantMapping : VariantMappings) { - LLVM_DEBUG(dbgs() << "VFABI: adding mapping '" << VariantMapping << "'\n"); - std::optional<VFInfo> VI = - VFABI::tryDemangleForVFABI(VariantMapping, CI->getFunctionType()); - assert(VI && "Cannot add an invalid VFABI name."); - assert(M->getNamedValue(VI->VectorName) && - "Cannot add variant to attribute: " - "vector function declaration is missing."); - } -#endif - CI->addFnAttr( - Attribute::get(M->getContext(), MappingsAttrName, Buffer.str())); -} - void llvm::embedBufferInModule(Module &M, MemoryBufferRef Buf, StringRef SectionName, Align Alignment) { // Embed the memory buffer into the module. |