[llvm] r290230 - [Orc][RPC] Actually specialize SerializationTraits and RPCTypeName in the right

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 18:08:23 PST 2016


Author: lhames
Date: Tue Dec 20 20:08:23 2016
New Revision: 290230

URL: http://llvm.org/viewvc/llvm-project?rev=290230&view=rev
Log:
[Orc][RPC] Actually specialize SerializationTraits and RPCTypeName in the right
namespace.

r290226 was a think-o - just qualifying the name doesn't count.


Modified:
    llvm/trunk/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp

Modified: llvm/trunk/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp?rev=290230&r1=290229&r2=290230&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp Tue Dec 20 20:08:23 2016
@@ -60,38 +60,54 @@ private:
 
 class RPCFoo {};
 
-template <>
-class llvm::orc::rpc::RPCTypeName<RPCFoo> {
-public:
-  static const char* getName() { return "RPCFoo"; }
-};
-
-template <>
-class llvm::orc::rpc::SerializationTraits<QueueChannel, RPCFoo, RPCFoo> {
-public:
-  static Error serialize(QueueChannel&, const RPCFoo&) {
-    return Error::success();
-  }
-
-  static Error deserialize(QueueChannel&, RPCFoo&) {
-    return Error::success();
-  }
-};
+namespace llvm {
+namespace orc {
+namespace rpc {
+
+  template <>
+  class RPCTypeName<RPCFoo> {
+  public:
+    static const char* getName() { return "RPCFoo"; }
+  };
+
+  template <>
+  class SerializationTraits<QueueChannel, RPCFoo, RPCFoo> {
+  public:
+    static Error serialize(QueueChannel&, const RPCFoo&) {
+      return Error::success();
+    }
+
+    static Error deserialize(QueueChannel&, RPCFoo&) {
+      return Error::success();
+    }
+  };
+
+} // end namespace rpc
+} // end namespace orc
+} // end namespace llvm
 
 class RPCBar {};
 
-template <>
-class llvm::orc::rpc::SerializationTraits<QueueChannel, RPCFoo, RPCBar> {
-public:
-  static Error serialize(QueueChannel&, const RPCBar&) {
-    return Error::success();
-  }
-
-  static Error deserialize(QueueChannel&, RPCBar&) {
-    return Error::success();
-  }
+namespace llvm {
+namespace orc {
+namespace rpc {
+
+  template <>
+  class SerializationTraits<QueueChannel, RPCFoo, RPCBar> {
+  public:
+    static Error serialize(QueueChannel&, const RPCBar&) {
+      return Error::success();
+    }
+
+    static Error deserialize(QueueChannel&, RPCBar&) {
+      return Error::success();
+    }
 };
 
+} // end namespace rpc
+} // end namespace orc
+} // end namespace llvm
+
 class DummyRPCAPI {
 public:
 




More information about the llvm-commits mailing list