summaryrefslogtreecommitdiffstats
path: root/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-01-06 20:01:02 +0000
committerdim <dim@FreeBSD.org>2016-01-06 20:01:02 +0000
commitff2ba393a56d9d99dcb76ceada542233db28af9a (patch)
treeea70b740d40cffe568a990c7aecd1acb5f83f786 /lib/IR/AsmWriter.cpp
parent7c35321d839f2c4d0fc8510bfbd8954b07908b76 (diff)
downloadFreeBSD-src-ff2ba393a56d9d99dcb76ceada542233db28af9a.zip
FreeBSD-src-ff2ba393a56d9d99dcb76ceada542233db28af9a.tar.gz
Vendor import of llvm trunk r256945:
https://llvm.org/svn/llvm-project/llvm/trunk@256945
Diffstat (limited to 'lib/IR/AsmWriter.cpp')
-rw-r--r--lib/IR/AsmWriter.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp
index 185db47..1ebe9b7 100644
--- a/lib/IR/AsmWriter.cpp
+++ b/lib/IR/AsmWriter.cpp
@@ -2060,7 +2060,7 @@ private:
// printGCRelocateComment - print comment after call to the gc.relocate
// intrinsic indicating base and derived pointer names.
- void printGCRelocateComment(const Value &V);
+ void printGCRelocateComment(const GCRelocateInst &Relocate);
};
} // namespace
@@ -2722,14 +2722,11 @@ void AssemblyWriter::printInstructionLine(const Instruction &I) {
/// printGCRelocateComment - print comment after call to the gc.relocate
/// intrinsic indicating base and derived pointer names.
-void AssemblyWriter::printGCRelocateComment(const Value &V) {
- assert(isGCRelocate(&V));
- GCRelocateOperands GCOps(cast<Instruction>(&V));
-
+void AssemblyWriter::printGCRelocateComment(const GCRelocateInst &Relocate) {
Out << " ; (";
- writeOperand(GCOps.getBasePtr(), false);
+ writeOperand(Relocate.getBasePtr(), false);
Out << ", ";
- writeOperand(GCOps.getDerivedPtr(), false);
+ writeOperand(Relocate.getDerivedPtr(), false);
Out << ")";
}
@@ -2737,8 +2734,8 @@ void AssemblyWriter::printGCRelocateComment(const Value &V) {
/// which slot it occupies.
///
void AssemblyWriter::printInfoComment(const Value &V) {
- if (isGCRelocate(&V))
- printGCRelocateComment(V);
+ if (const auto *Relocate = dyn_cast<GCRelocateInst>(&V))
+ printGCRelocateComment(*Relocate);
if (AnnotationWriter)
AnnotationWriter->printInfoComment(V, Out);
OpenPOWER on IntegriCloud