diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-10-28 03:38:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-10-28 03:38:12 +0000 |
| commit | 214cc709bc81be288e61d4f7a10d9ea7113921a3 (patch) | |
| tree | 0a1195790f8430451f7b4447df9a2677a5e4b4e7 /llvm/lib/VMCore/AsmWriter.cpp | |
| parent | 3a395304458bb882d4c7234e016cfb8ce1918e6b (diff) | |
| download | bcm5719-llvm-214cc709bc81be288e61d4f7a10d9ea7113921a3.tar.gz bcm5719-llvm-214cc709bc81be288e61d4f7a10d9ea7113921a3.zip | |
asmprinter support for BlockAddress.
llvm-svn: 85367
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 296cc25617e..2a25841b39e 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -1060,6 +1060,15 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, 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 |

