[Lldb-commits] [lldb] ffd78a0 - [lldb] Replace #pragma once with header guard

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 17 23:39:26 PST 2020


Author: Jonas Devlieghere
Date: 2020-02-17T23:39:19-08:00
New Revision: ffd78a008ab29c399975485e86bc6bedf91c5277

URL: https://github.com/llvm/llvm-project/commit/ffd78a008ab29c399975485e86bc6bedf91c5277
DIFF: https://github.com/llvm/llvm-project/commit/ffd78a008ab29c399975485e86bc6bedf91c5277.diff

LOG: [lldb] Replace #pragma once with header guard

This got messed up when updating the header guard. Remove the
`pragma once` and use a header guard instead.

Added: 
    

Modified: 
    lldb/include/lldb/Host/HostGetOpt.h
    lldb/include/lldb/Host/common/GetOptInc.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Host/HostGetOpt.h b/lldb/include/lldb/Host/HostGetOpt.h
index 6fb0ac53dd5d..746e03e1bd1e 100644
--- a/lldb/include/lldb/Host/HostGetOpt.h
+++ b/lldb/include/lldb/Host/HostGetOpt.h
@@ -1,7 +1,3 @@
-#ifndef LLDB_HOST_HOSTGETOPT_H
-
-#define LLDB_HOST_HOSTGETOPT_H
-
 //===-- HostGetOpt.h --------------------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -9,7 +5,9 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#pragma once
+
+#ifndef LLDB_HOST_HOSTGETOPT_H
+#define LLDB_HOST_HOSTGETOPT_H
 
 #if !defined(_MSC_VER) && !defined(__NetBSD__)
 
@@ -26,4 +24,4 @@
 
 #endif
 
-#endif
+#endif // LLDB_HOST_HOSTGETOPT_H

diff  --git a/lldb/include/lldb/Host/common/GetOptInc.h b/lldb/include/lldb/Host/common/GetOptInc.h
index caa2efc060a0..3fb9add47954 100644
--- a/lldb/include/lldb/Host/common/GetOptInc.h
+++ b/lldb/include/lldb/Host/common/GetOptInc.h
@@ -1,9 +1,14 @@
-#ifndef LLDB_HOST_COMMON_GETOPTINC_H
+//===-- GetOptInc.h ---------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
 
+#ifndef LLDB_HOST_COMMON_GETOPTINC_H
 #define LLDB_HOST_COMMON_GETOPTINC_H
 
-#pragma once
-
 #include "lldb/lldb-defines.h"
 
 #if defined(_MSC_VER)
@@ -55,4 +60,4 @@ int getopt_long_only(int argc, char *const *argv, const char *optstring,
                      const struct option *longopts, int *longindex);
 #endif
 
-#endif
+#endif // LLDB_HOST_COMMON_GETOPTINC_H


        


More information about the lldb-commits mailing list