aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 0c8565c..4d4ffe93 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2931,7 +2931,7 @@ private:
// printInfoComment - Print a little comment after the instruction indicating
// which slot it occupies.
- void printInfoComment(const Value &V);
+ void printInfoComment(const Value &V, bool isMaterializable = false);
// printGCRelocateComment - print comment after call to the gc.relocate
// intrinsic indicating base and derived pointer names.
@@ -3963,7 +3963,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
if (Attrs.hasAttributes())
Out << " #" << Machine.getAttributeGroupSlot(Attrs);
- printInfoComment(*GV);
+ printInfoComment(*GV, GV->isMaterializable());
}
void AssemblyWriter::printAlias(const GlobalAlias *GA) {
@@ -4001,7 +4001,7 @@ void AssemblyWriter::printAlias(const GlobalAlias *GA) {
Out << '"';
}
- printInfoComment(*GA);
+ printInfoComment(*GA, GA->isMaterializable());
Out << '\n';
}
@@ -4040,7 +4040,7 @@ void AssemblyWriter::printIFunc(const GlobalIFunc *GI) {
printMetadataAttachments(MDs, ", ");
}
- printInfoComment(*GI);
+ printInfoComment(*GI, GI->isMaterializable());
Out << '\n';
}
@@ -4319,13 +4319,12 @@ void AssemblyWriter::printGCRelocateComment(const GCRelocateInst &Relocate) {
/// printInfoComment - Print a little comment after the instruction indicating
/// which slot it occupies.
-void AssemblyWriter::printInfoComment(const Value &V) {
+void AssemblyWriter::printInfoComment(const Value &V, bool isMaterializable) {
if (const auto *Relocate = dyn_cast<GCRelocateInst>(&V))
printGCRelocateComment(*Relocate);
- if (AnnotationWriter) {
+ if (AnnotationWriter && !isMaterializable)
AnnotationWriter->printInfoComment(V, Out);
- }
if (PrintInstDebugLocs) {
if (auto *I = dyn_cast<Instruction>(&V)) {