Skip to content

Commit 3adc15b

Browse files
committed
Emit the new type arg from format attr
1 parent 753b076 commit 3adc15b

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
@@ -2561,10 +2561,12 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
25612561
if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) {
25622562
// TODO: Error checking
25632563
FormatAttr *Format = TargetDecl->getAttr<FormatAttr>();
2564+
StringRef Type = Format->getType()->getName();
25642565
std::string FormatIdx = std::to_string(Format->getFormatIdx());
25652566
std::string FirstArg = std::to_string(Format->getFirstArg());
25662567
SmallVector<StringRef> Args = {
2567-
FormatIdx, FirstArg, ModularFormat->getModularImplFn()->getName(),
2568+
Type, FormatIdx, FirstArg,
2569+
ModularFormat->getModularImplFn()->getName(),
25682570
ModularFormat->getImplName()};
25692571
llvm::append_range(Args, ModularFormat->aspects());
25702572
FuncAttrs.addAttribute("modular-format", llvm::join(Args, ","));

0 commit comments

Comments
 (0)