Add support for BlockAddress static initializers.
authorDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 01:45:18 +0000 (01:45 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 01:45:18 +0000 (01:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85562 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 576768210f659c17337f2293c311f1b9a5bbb575..989f19cb0ad677b9581a860a11e5692f40c6b3c6 100644 (file)
@@ -919,6 +919,8 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
     default:
       llvm_unreachable("Unsupported operator!");
     }
+  } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(CV)) {
+    GetBlockAddressSymbol(BA)->print(O, MAI);
   } else {
     llvm_unreachable("Unknown constant value!");
   }