Fix a warning building on my machine, NFC. warning: unused function 'compilePtxToCubi...
authorChris Lattner <clattner@nondot.org>
Mon, 23 Mar 2020 16:51:07 +0000 (09:51 -0700)
committerChris Lattner <clattner@nondot.org>
Mon, 23 Mar 2020 18:16:55 +0000 (11:16 -0700)
Summary: Also eliminate the redunant anon namespace around the already static function.

Reviewers: herhut

Subscribers: hiraditya, steven_wu, dexonsmith, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76627

mlir/test/lib/Transforms/TestConvertGPUKernelToCubin.cpp

index 2a22595..e0c4c19 100644 (file)
@@ -9,18 +9,15 @@
 #include "mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassManager.h"
-
 using namespace mlir;
 
-namespace {
+#if MLIR_CUDA_CONVERSIONS_ENABLED
 static OwnedCubin compilePtxToCubinForTesting(const std::string &, Location,
                                               StringRef) {
   const char data[] = "CUBIN";
   return std::make_unique<std::vector<char>>(data, data + sizeof(data) - 1);
 }
-} // end anonymous namespace
 
-#if MLIR_CUDA_CONVERSIONS_ENABLED
 namespace mlir {
 void registerTestConvertGPUKernelToCubinPass() {
   PassPipelineRegistration<>("test-kernel-to-cubin",