[NVPTX] Handle addrspacecast constant expressions in aggregate initializers
[oota-llvm.git] / lib / Target / NVPTX / NVPTXMCExpr.cpp
index 137248b19a68dfbd3c55534a263fc3f385c4f7bf..779b65ecc39f2061f246b8c2fedb109069d22291 100644 (file)
@@ -45,3 +45,13 @@ void NVPTXFloatMCExpr::PrintImpl(raw_ostream &OS) const {
     OS << std::string(NumHex - HexStr.length(), '0');
   OS << utohexstr(API.getZExtValue());
 }
+
+const NVPTXGenericMCSymbolRefExpr*
+NVPTXGenericMCSymbolRefExpr::Create(const MCSymbolRefExpr *SymExpr,
+                                    MCContext &Ctx) {
+  return new (Ctx) NVPTXGenericMCSymbolRefExpr(SymExpr);
+}
+
+void NVPTXGenericMCSymbolRefExpr::PrintImpl(raw_ostream &OS) const {
+  OS << "generic(" << *SymExpr << ")";
+}