diff options
author | Daniel Thornburgh <dthorn@google.com> | 2025-07-22 13:35:46 -0700 |
---|---|---|
committer | Daniel Thornburgh <dthorn@google.com> | 2025-09-02 15:25:07 -0700 |
commit | aaeb8a95da15d411e9cf730cbfa8654273c0b7c1 (patch) | |
tree | e2c96f364c1d6ea05e63c5e2c32bedfcb614a6e8 | |
parent | f5681b3910c49938e305f9f3564c00a78f2118dc (diff) | |
download | llvm-aaeb8a95da15d411e9cf730cbfa8654273c0b7c1.zip llvm-aaeb8a95da15d411e9cf730cbfa8654273c0b7c1.tar.gz llvm-aaeb8a95da15d411e9cf730cbfa8654273c0b7c1.tar.bz2 |
Emit the new type arg from format attr
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index bf1ddb7..e50ed1c 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2564,10 +2564,12 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) { // TODO: Error checking FormatAttr *Format = TargetDecl->getAttr<FormatAttr>(); + StringRef Type = Format->getType()->getName(); std::string FormatIdx = std::to_string(Format->getFormatIdx()); std::string FirstArg = std::to_string(Format->getFirstArg()); SmallVector<StringRef> Args = { - FormatIdx, FirstArg, ModularFormat->getModularImplFn()->getName(), + Type, FormatIdx, FirstArg, + ModularFormat->getModularImplFn()->getName(), ModularFormat->getImplName()}; llvm::append_range(Args, ModularFormat->aspects()); FuncAttrs.addAttribute("modular-format", llvm::join(Args, ",")); |