Browse Source

Kernel: Remove use of [[gnu::pure]].

I was messing around with this to tell the compiler that these functions
always return the same value no matter how many times you call them.

It doesn't really seem to improve code generation and it looks weird so
let's just get rid of it.
Andreas Kling 6 years ago
parent
commit
3dac1f8ac5

+ 1 - 1
Kernel/Devices/KeyboardDevice.h

@@ -15,7 +15,7 @@ class KeyboardDevice final : public IRQHandler
 public:
 public:
     using Event = KeyEvent;
     using Event = KeyEvent;
 
 
-    [[gnu::pure]] static KeyboardDevice& the();
+    static KeyboardDevice& the();
 
 
     virtual ~KeyboardDevice() override;
     virtual ~KeyboardDevice() override;
     KeyboardDevice();
     KeyboardDevice();

+ 1 - 1
Kernel/FileSystem/DevPtsFS.h

@@ -8,7 +8,7 @@ class SlavePTY;
 
 
 class DevPtsFS final : public SynthFS {
 class DevPtsFS final : public SynthFS {
 public:
 public:
-    [[gnu::pure]] static DevPtsFS& the();
+    static DevPtsFS& the();
 
 
     virtual ~DevPtsFS() override;
     virtual ~DevPtsFS() override;
     static NonnullRefPtr<DevPtsFS> create();
     static NonnullRefPtr<DevPtsFS> create();

+ 1 - 1
Kernel/FileSystem/ProcFS.h

@@ -13,7 +13,7 @@ class ProcFS final : public FS {
     friend class ProcFSInode;
     friend class ProcFSInode;
 
 
 public:
 public:
-    [[gnu::pure]] static ProcFS& the();
+    static ProcFS& the();
 
 
     virtual ~ProcFS() override;
     virtual ~ProcFS() override;
     static NonnullRefPtr<ProcFS> create();
     static NonnullRefPtr<ProcFS> create();

+ 1 - 1
Kernel/FileSystem/VirtualFileSystem.h

@@ -51,7 +51,7 @@ public:
         RefPtr<Custody> m_host_custody;
         RefPtr<Custody> m_host_custody;
     };
     };
 
 
-    [[gnu::pure]] static VFS& the();
+    static VFS& the();
 
 
     VFS();
     VFS();
     ~VFS();
     ~VFS();

+ 1 - 1
Kernel/VM/MemoryManager.h

@@ -40,7 +40,7 @@ class MemoryManager {
     friend ByteBuffer procfs$memstat(InodeIdentifier);
     friend ByteBuffer procfs$memstat(InodeIdentifier);
 
 
 public:
 public:
-    [[gnu::pure]] static MemoryManager& the();
+    static MemoryManager& the();
 
 
     static void initialize();
     static void initialize();