[llvm-commits] [llvm] r85367 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Chris Lattner
sabre at nondot.org
Tue Oct 27 20:38:12 PDT 2009
Author: lattner
Date: Tue Oct 27 22:38:12 2009
New Revision: 85367
URL: http://llvm.org/viewvc/llvm-project?rev=85367&view=rev
Log:
asmprinter support for BlockAddress.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=85367&r1=85366&r2=85367&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Oct 27 22:38:12 2009
@@ -1060,6 +1060,15 @@
Out << "zeroinitializer";
return;
}
+
+ if (const BlockAddress *BA = dyn_cast<BlockAddress>(CV)) {
+ Out << "blockaddress(";
+ WriteAsOperandInternal(Out, BA->getFunction(), &TypePrinter, Machine);
+ Out << ", ";
+ WriteAsOperandInternal(Out, BA->getBasicBlock(), &TypePrinter, Machine);
+ Out << ")";
+ return;
+ }
if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV)) {
// As a special case, print the array as a string if it is an array of
More information about the llvm-commits
mailing list