Skip to content

Commit 10acf20

Browse files
committed
Emit the new type arg from format attr
1 parent 2cc0483 commit 10acf20

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
@@ -2566,10 +2566,12 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
25662566
if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) {
25672567
// TODO: Error checking
25682568
FormatAttr *Format = TargetDecl->getAttr<FormatAttr>();
2569+
StringRef Type = Format->getType()->getName();
25692570
std::string FormatIdx = std::to_string(Format->getFormatIdx());
25702571
std::string FirstArg = std::to_string(Format->getFirstArg());
25712572
SmallVector<StringRef> Args = {
2572-
FormatIdx, FirstArg, ModularFormat->getModularImplFn()->getName(),
2573+
Type, FormatIdx, FirstArg,
2574+
ModularFormat->getModularImplFn()->getName(),
25732575
ModularFormat->getImplName()};
25742576
llvm::append_range(Args, ModularFormat->aspects());
25752577
FuncAttrs.addAttribute("modular-format", llvm::join(Args, ","));

0 commit comments

Comments
 (0)