[SE] Remove Utils directory

Summary:
There is no purpose in splitting out the Error class from the rest of
the StreamExecutor code. This organization was just a vestige of an old
failed design.

Plus, this change fixes a bug in the build where the utilites library
was not being statically linked in with libstreamexecutor.

Reviewers: jlebar, jprice

Subscribers: beanz, parallel_libs-commits

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

llvm-svn: 281118
GitOrigin-RevId: a3ad6dcfaf1ba5af42f19700c329dd27e3a62c40
diff --git a/streamexecutor/include/streamexecutor/Device.h b/streamexecutor/include/streamexecutor/Device.h
index 9774128..3e8c2c8 100644
--- a/streamexecutor/include/streamexecutor/Device.h
+++ b/streamexecutor/include/streamexecutor/Device.h
@@ -17,9 +17,9 @@
 
 #include <type_traits>
 
+#include "streamexecutor/Error.h"
 #include "streamexecutor/KernelSpec.h"
 #include "streamexecutor/PlatformDevice.h"
-#include "streamexecutor/Utils/Error.h"
 
 namespace streamexecutor {
 
diff --git a/streamexecutor/include/streamexecutor/DeviceMemory.h b/streamexecutor/include/streamexecutor/DeviceMemory.h
index 1cbeac2..2193151 100644
--- a/streamexecutor/include/streamexecutor/DeviceMemory.h
+++ b/streamexecutor/include/streamexecutor/DeviceMemory.h
@@ -32,7 +32,7 @@
 #include <cassert>
 #include <cstddef>
 
-#include "streamexecutor/Utils/Error.h"
+#include "streamexecutor/Error.h"
 
 namespace streamexecutor {
 
diff --git a/streamexecutor/include/streamexecutor/Utils/Error.h b/streamexecutor/include/streamexecutor/Error.h
similarity index 98%
rename from streamexecutor/include/streamexecutor/Utils/Error.h
rename to streamexecutor/include/streamexecutor/Error.h
index 96eccfa..b2d1ebb 100644
--- a/streamexecutor/include/streamexecutor/Utils/Error.h
+++ b/streamexecutor/include/streamexecutor/Error.h
@@ -160,8 +160,8 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef STREAMEXECUTOR_UTILS_ERROR_H
-#define STREAMEXECUTOR_UTILS_ERROR_H
+#ifndef STREAMEXECUTOR_ERROR_H
+#define STREAMEXECUTOR_ERROR_H
 
 #include <cstdio>
 #include <cstdlib>
@@ -212,4 +212,4 @@
 
 } // namespace streamexecutor
 
-#endif // STREAMEXECUTOR_UTILS_ERROR_H
+#endif // STREAMEXECUTOR_ERROR_H
diff --git a/streamexecutor/include/streamexecutor/Kernel.h b/streamexecutor/include/streamexecutor/Kernel.h
index 6ea7c36..d8cbb8a 100644
--- a/streamexecutor/include/streamexecutor/Kernel.h
+++ b/streamexecutor/include/streamexecutor/Kernel.h
@@ -21,8 +21,8 @@
 #ifndef STREAMEXECUTOR_KERNEL_H
 #define STREAMEXECUTOR_KERNEL_H
 
+#include "streamexecutor/Error.h"
 #include "streamexecutor/KernelSpec.h"
-#include "streamexecutor/Utils/Error.h"
 
 #include <memory>
 
diff --git a/streamexecutor/include/streamexecutor/Platform.h b/streamexecutor/include/streamexecutor/Platform.h
index 674a40c..7b26f49 100644
--- a/streamexecutor/include/streamexecutor/Platform.h
+++ b/streamexecutor/include/streamexecutor/Platform.h
@@ -18,7 +18,7 @@
 #ifndef STREAMEXECUTOR_PLATFORM_H
 #define STREAMEXECUTOR_PLATFORM_H
 
-#include "streamexecutor/Utils/Error.h"
+#include "streamexecutor/Error.h"
 
 namespace streamexecutor {
 
diff --git a/streamexecutor/include/streamexecutor/PlatformDevice.h b/streamexecutor/include/streamexecutor/PlatformDevice.h
index 6a46876..6437760 100644
--- a/streamexecutor/include/streamexecutor/PlatformDevice.h
+++ b/streamexecutor/include/streamexecutor/PlatformDevice.h
@@ -20,10 +20,10 @@
 #define STREAMEXECUTOR_PLATFORMDEVICE_H
 
 #include "streamexecutor/DeviceMemory.h"
+#include "streamexecutor/Error.h"
 #include "streamexecutor/Kernel.h"
 #include "streamexecutor/LaunchDimensions.h"
 #include "streamexecutor/PackedKernelArgumentArray.h"
-#include "streamexecutor/Utils/Error.h"
 
 namespace streamexecutor {
 
diff --git a/streamexecutor/include/streamexecutor/PlatformManager.h b/streamexecutor/include/streamexecutor/PlatformManager.h
index c8f68fc..7d0de12 100644
--- a/streamexecutor/include/streamexecutor/PlatformManager.h
+++ b/streamexecutor/include/streamexecutor/PlatformManager.h
@@ -21,8 +21,8 @@
 
 #include <map>
 
+#include "streamexecutor/Error.h"
 #include "streamexecutor/Platform.h"
-#include "streamexecutor/Utils/Error.h"
 
 namespace streamexecutor {
 
diff --git a/streamexecutor/include/streamexecutor/Stream.h b/streamexecutor/include/streamexecutor/Stream.h
index ac57354..704a815 100644
--- a/streamexecutor/include/streamexecutor/Stream.h
+++ b/streamexecutor/include/streamexecutor/Stream.h
@@ -35,11 +35,11 @@
 #include <string>
 
 #include "streamexecutor/DeviceMemory.h"
+#include "streamexecutor/Error.h"
 #include "streamexecutor/Kernel.h"
 #include "streamexecutor/LaunchDimensions.h"
 #include "streamexecutor/PackedKernelArgumentArray.h"
 #include "streamexecutor/PlatformDevice.h"
-#include "streamexecutor/Utils/Error.h"
 
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/Twine.h"
diff --git a/streamexecutor/lib/CMakeLists.txt b/streamexecutor/lib/CMakeLists.txt
index 11873c4..be94cba 100644
--- a/streamexecutor/lib/CMakeLists.txt
+++ b/streamexecutor/lib/CMakeLists.txt
@@ -3,12 +3,11 @@
   set_target_properties(${name} PROPERTIES FOLDER "streamexecutor libraries")
 endmacro(add_se_library)
 
-add_subdirectory(Utils)
-
 add_se_library(
     streamexecutor
     Device.cpp
     DeviceMemory.cpp
+    Error.cpp
     Kernel.cpp
     KernelSpec.cpp
     PackedKernelArgumentArray.cpp
@@ -16,9 +15,6 @@
     PlatformDevice.cpp
     PlatformManager.cpp
     Stream.cpp
-
-    LINK_LIBS
-      utils
     )
 
 install(TARGETS streamexecutor DESTINATION lib)
diff --git a/streamexecutor/lib/Utils/Error.cpp b/streamexecutor/lib/Error.cpp
similarity index 97%
rename from streamexecutor/lib/Utils/Error.cpp
rename to streamexecutor/lib/Error.cpp
index 15a9ccb..1f9d4a7 100644
--- a/streamexecutor/lib/Utils/Error.cpp
+++ b/streamexecutor/lib/Error.cpp
@@ -12,7 +12,7 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#include "streamexecutor/Utils/Error.h"
+#include "streamexecutor/Error.h"
 
 #include "llvm/ADT/StringRef.h"
 
diff --git a/streamexecutor/lib/Utils/CMakeLists.txt b/streamexecutor/lib/Utils/CMakeLists.txt
deleted file mode 100644
index 2cbbc3b..0000000
--- a/streamexecutor/lib/Utils/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-add_se_library(
-  utils
-  Error.cpp)