Skip to content

Commit 6bf7051

Browse files
committed
Emit the new type arg from format attr
1 parent ffd5658 commit 6bf7051

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,10 +2564,12 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
25642564
if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) {
25652565
// TODO: Error checking
25662566
FormatAttr *Format = TargetDecl->getAttr<FormatAttr>();
2567+
StringRef Type = Format->getType()->getName();
25672568
std::string FormatIdx = std::to_string(Format->getFormatIdx());
25682569
std::string FirstArg = std::to_string(Format->getFirstArg());
25692570
SmallVector<StringRef> Args = {
2570-
FormatIdx, FirstArg, ModularFormat->getModularImplFn()->getName(),
2571+
Type, FormatIdx, FirstArg,
2572+
ModularFormat->getModularImplFn()->getName(),
25712573
ModularFormat->getImplName()};
25722574
llvm::append_range(Args, ModularFormat->aspects());
25732575
FuncAttrs.addAttribute("modular-format", llvm::join(Args, ","));

0 commit comments

Comments
 (0)