Skip to content

Commit 0ed3487

Browse files
committed
Emit the new type arg from format attr
1 parent 19b67ed commit 0ed3487

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
@@ -2573,10 +2573,12 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
25732573
if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) {
25742574
// TODO: Error checking
25752575
FormatAttr *Format = TargetDecl->getAttr<FormatAttr>();
2576+
StringRef Type = Format->getType()->getName();
25762577
std::string FormatIdx = std::to_string(Format->getFormatIdx());
25772578
std::string FirstArg = std::to_string(Format->getFirstArg());
25782579
SmallVector<StringRef> Args = {
2579-
FormatIdx, FirstArg, ModularFormat->getModularImplFn()->getName(),
2580+
Type, FormatIdx, FirstArg,
2581+
ModularFormat->getModularImplFn()->getName(),
25802582
ModularFormat->getImplName()};
25812583
llvm::append_range(Args, ModularFormat->aspects());
25822584
FuncAttrs.addAttribute("modular-format", llvm::join(Args, ","));

0 commit comments

Comments
 (0)