Use pragma once over #define guards

Test: m
Change-Id: I3d0a1ef87618a963f0641733b5c7ebf849cb260a
diff --git a/ALog-priv.h b/ALog-priv.h
index d6df367..cb0dc8c 100644
--- a/ALog-priv.h
+++ b/ALog-priv.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_ALOG_PRIV_H_
-#define LIBNATIVEHELPER_ALOG_PRIV_H_
+#pragma once
 
 #include <android/log.h>
 
@@ -73,4 +72,3 @@
     if (cond) __android_log_assert(#cond, LOG_TAG, __VA_ARGS__)
 #endif
 
-#endif  // LIBNATIVEHELPER_ALOG_PRIV_H_
diff --git a/JniInvocation-priv.h b/JniInvocation-priv.h
index 51e63e9..8a90ff5 100644
--- a/JniInvocation-priv.h
+++ b/JniInvocation-priv.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_JNIINVOCATION_PRIV_H_
-#define LIBNATIVEHELPER_JNIINVOCATION_PRIV_H_
+#pragma once
 
 #include <sys/cdefs.h>
 
@@ -27,4 +26,3 @@
 
 __END_DECLS
 
-#endif  // LIBNATIVEHELPER_JNIINVOCATION_PRIV_H_
\ No newline at end of file
diff --git a/header_only_include/nativehelper/nativehelper_utils.h b/header_only_include/nativehelper/nativehelper_utils.h
index ba4e23b..9cb8195 100644
--- a/header_only_include/nativehelper/nativehelper_utils.h
+++ b/header_only_include/nativehelper/nativehelper_utils.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_NATIVEHELPER_UTILS_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_NATIVEHELPER_UTILS_H_
+#pragma once
 
 #include <jni.h>
 
@@ -52,4 +51,3 @@
 
 #endif  // defined(__cplusplus)
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_NATIVEHELPER_UTILS_H_
diff --git a/header_only_include/nativehelper/scoped_bytes.h b/header_only_include/nativehelper/scoped_bytes.h
index 7488adc..f58efa4 100644
--- a/header_only_include/nativehelper/scoped_bytes.h
+++ b/header_only_include/nativehelper/scoped_bytes.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_BYTES_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_BYTES_H_
+#pragma once
 
 #include <jni.h>
 
@@ -81,4 +80,3 @@
     }
 };
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_BYTES_H_
diff --git a/header_only_include/nativehelper/scoped_local_frame.h b/header_only_include/nativehelper/scoped_local_frame.h
index c2e5617..da06655 100644
--- a/header_only_include/nativehelper/scoped_local_frame.h
+++ b/header_only_include/nativehelper/scoped_local_frame.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_FRAME_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_FRAME_H_
+#pragma once
 
 #include <jni.h>
 
@@ -37,4 +36,3 @@
     DISALLOW_COPY_AND_ASSIGN(ScopedLocalFrame);
 };
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_FRAME_H_
diff --git a/header_only_include/nativehelper/scoped_local_ref.h b/header_only_include/nativehelper/scoped_local_ref.h
index a43036d..cd35a88 100644
--- a/header_only_include/nativehelper/scoped_local_ref.h
+++ b/header_only_include/nativehelper/scoped_local_ref.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_REF_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_REF_H_
+#pragma once
 
 #include <cstddef>
 
@@ -89,4 +88,3 @@
     DISALLOW_COPY_AND_ASSIGN(ScopedLocalRef);
 };
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_LOCAL_REF_H_
diff --git a/header_only_include/nativehelper/scoped_primitive_array.h b/header_only_include/nativehelper/scoped_primitive_array.h
index e23d9a7..16acb70 100644
--- a/header_only_include/nativehelper/scoped_primitive_array.h
+++ b/header_only_include/nativehelper/scoped_primitive_array.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_PRIMITIVE_ARRAY_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_PRIMITIVE_ARRAY_H_
+#pragma once
 
 #include <stddef.h>
 
@@ -147,4 +146,3 @@
 #undef POINTER_TYPE
 #undef REFERENCE_TYPE
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_PRIMITIVE_ARRAY_H_
diff --git a/header_only_include/nativehelper/scoped_string_chars.h b/header_only_include/nativehelper/scoped_string_chars.h
index 8bbb906..e9d60bc 100644
--- a/header_only_include/nativehelper/scoped_string_chars.h
+++ b/header_only_include/nativehelper/scoped_string_chars.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_STRING_CHARS_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_STRING_CHARS_H_
+#pragma once
 
 #include <stddef.h>
 
@@ -73,4 +72,3 @@
   DISALLOW_COPY_AND_ASSIGN(ScopedStringChars);
 };
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_STRING_CHARS_H_
diff --git a/header_only_include/nativehelper/scoped_utf_chars.h b/header_only_include/nativehelper/scoped_utf_chars.h
index eaca907..363ff42 100644
--- a/header_only_include/nativehelper/scoped_utf_chars.h
+++ b/header_only_include/nativehelper/scoped_utf_chars.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_UTF_CHARS_H_
-#define LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_UTF_CHARS_H_
+#pragma once
 
 #include <stddef.h>
 #include <string.h>
@@ -93,4 +92,3 @@
   DISALLOW_COPY_AND_ASSIGN(ScopedUtfChars);
 };
 
-#endif  // LIBNATIVEHELPER_HEADER_ONLY_INCLUDE_NATIVEHELPER_SCOPED_UTF_CHARS_H_
diff --git a/include/nativehelper/JNIHelp.h b/include/nativehelper/JNIHelp.h
index b3ce836..e6e3c47 100644
--- a/include/nativehelper/JNIHelp.h
+++ b/include/nativehelper/JNIHelp.h
@@ -20,8 +20,7 @@
  * This file may be included by C or C++ code, which is trouble because jni.h
  * uses different typedefs for JNIEnv in each language.
  */
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_JNIHELP_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_JNIHELP_H_
+#pragma once
 
 #include <errno.h>
 #include <unistd.h>
@@ -117,4 +116,3 @@
 
 #endif  // defined(__cplusplus)
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_JNIHELP_H_
diff --git a/include/nativehelper/ScopedBytes.h b/include/nativehelper/ScopedBytes.h
index 371b1bb..7c369b1 100644
--- a/include/nativehelper/ScopedBytes.h
+++ b/include/nativehelper/ScopedBytes.h
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDBYTES_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDBYTES_H_
+#pragma once
 
 #include "JNIHelp.h"
 #include <nativehelper/scoped_bytes.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDBYTES_H_
diff --git a/include/nativehelper/ScopedLocalFrame.h b/include/nativehelper/ScopedLocalFrame.h
index 4cb3d23..387836c 100644
--- a/include/nativehelper/ScopedLocalFrame.h
+++ b/include/nativehelper/ScopedLocalFrame.h
@@ -14,9 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALFRAME_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALFRAME_H_
+#pragma once
 
 #include <nativehelper/scoped_local_frame.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALFRAME_H_
diff --git a/include/nativehelper/ScopedLocalRef.h b/include/nativehelper/ScopedLocalRef.h
index 9960922..7631155 100644
--- a/include/nativehelper/ScopedLocalRef.h
+++ b/include/nativehelper/ScopedLocalRef.h
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALREF_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALREF_H_
+#pragma once
 
 #include "JNIHelp.h"
 #include <nativehelper/scoped_local_ref.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDLOCALREF_H_
diff --git a/include/nativehelper/ScopedPrimitiveArray.h b/include/nativehelper/ScopedPrimitiveArray.h
index 830a712..ee34556 100644
--- a/include/nativehelper/ScopedPrimitiveArray.h
+++ b/include/nativehelper/ScopedPrimitiveArray.h
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDPRIMITIVEARRAY_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDPRIMITIVEARRAY_H_
+#pragma once
 
 #include "JNIHelp.h"
 #include <nativehelper/scoped_primitive_array.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDPRIMITIVEARRAY_H_
diff --git a/include/nativehelper/ScopedStringChars.h b/include/nativehelper/ScopedStringChars.h
index f37d05c..d82b2fa 100644
--- a/include/nativehelper/ScopedStringChars.h
+++ b/include/nativehelper/ScopedStringChars.h
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDSTRINGCHARS_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDSTRINGCHARS_H_
+#pragma once
 
 #include "JNIHelp.h"
 #include <nativehelper/scoped_string_chars.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDSTRINGCHARS_H_
diff --git a/include/nativehelper/ScopedUtfChars.h b/include/nativehelper/ScopedUtfChars.h
index b782a4e..dc41679 100644
--- a/include/nativehelper/ScopedUtfChars.h
+++ b/include/nativehelper/ScopedUtfChars.h
@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDUTFCHARS_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDUTFCHARS_H_
+#pragma once
 
 #include "JNIHelp.h"
 #include <nativehelper/scoped_utf_chars.h>
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_SCOPEDUTFCHARS_H_
diff --git a/include/nativehelper/libnativehelper_api.h b/include/nativehelper/libnativehelper_api.h
index 49c6a91..1efdcbd 100644
--- a/include/nativehelper/libnativehelper_api.h
+++ b/include/nativehelper/libnativehelper_api.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_LIBNATIVEHELPER_API_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_LIBNATIVEHELPER_API_H_
+#pragma once
 
 #include <stdbool.h>
 #include <stddef.h>
@@ -237,4 +236,3 @@
 }
 #endif  // __cplusplus
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_LIBNATIVEHELPER_API_H_
diff --git a/include/nativehelper/toStringArray.h b/include/nativehelper/toStringArray.h
index df53b19..8d25974 100644
--- a/include/nativehelper/toStringArray.h
+++ b/include/nativehelper/toStringArray.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_TOSTRINGARRAY_H_
-#define LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_TOSTRINGARRAY_H_
+#pragma once
 
 #include "libnativehelper_api.h"
 
@@ -61,4 +60,3 @@
 
 #endif  // __cplusplus
 
-#endif  // LIBNATIVEHELPER_INCLUDE_NATIVEHELPER_TOSTRINGARRAY_H_
diff --git a/include_jni/jni.h b/include_jni/jni.h
index f709d67..67417a5 100644
--- a/include_jni/jni.h
+++ b/include_jni/jni.h
@@ -21,8 +21,7 @@
  * Everything here is expected to be VM-neutral.
  */
 
-#ifndef LIBNATIVEHELPER_INCLUDE_JNI_JNI_H_
-#define LIBNATIVEHELPER_INCLUDE_JNI_JNI_H_
+#pragma once
 
 #include <stdarg.h>
 #include <stdint.h>
@@ -1140,4 +1139,3 @@
 #define JNI_COMMIT      1           /* copy content, do not free buffer */
 #define JNI_ABORT       2           /* free buffer w/o copying back */
 
-#endif  // LIBNATIVEHELPER_INCLUDE_JNI_JNI_H_
diff --git a/platform_include/nativehelper/detail/signature_checker.h b/platform_include/nativehelper/detail/signature_checker.h
index f654be5..06ebfa4 100644
--- a/platform_include/nativehelper/detail/signature_checker.h
+++ b/platform_include/nativehelper/detail/signature_checker.h
@@ -32,8 +32,7 @@
  * Everything in this file except ostream<< is constexpr.
  */
 
-#ifndef LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_DETAIL_SIGNATURE_CHECKER_H_
-#define LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_DETAIL_SIGNATURE_CHECKER_H_
+#pragma once
 
 #include <iostream>     // std::ostream
 #include <jni.h>        // jni typedefs, JniNativeMethod.
@@ -1440,4 +1439,3 @@
 }  // namespace detail
 }  // namespace nativehelper
 
-#endif  // LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_DETAIL_SIGNATURE_CHECKER_H_
diff --git a/platform_include/nativehelper/jni_macros.h b/platform_include/nativehelper/jni_macros.h
index b6f6a4b..79f23c8 100644
--- a/platform_include/nativehelper/jni_macros.h
+++ b/platform_include/nativehelper/jni_macros.h
@@ -141,8 +141,7 @@
  * the stricter approach is taken: the most exact C++ type must be used.
  */
 
-#ifndef LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_JNI_MACROS_H_
-#define LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_JNI_MACROS_H_
+#pragma once
 
 // The below basic macros do not perform automatic stringification,
 // invoked e.g. as MAKE_JNI_NATIVE_METHOD("some_name", "()V", void_fn)
@@ -282,4 +281,3 @@
     (to)
 #endif
 
-#endif  // LIBNATIVEHELPER_PLATFORM_INCLUDE_NATIVEHELPER_JNI_MACROS_H_
diff --git a/tests/jni_gtest/base/nativehelper/jni_gtest.h b/tests/jni_gtest/base/nativehelper/jni_gtest.h
index bed1ae0..6af0728 100644
--- a/tests/jni_gtest/base/nativehelper/jni_gtest.h
+++ b/tests/jni_gtest/base/nativehelper/jni_gtest.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef LIBNATIVEHELPER_TESTS_JNI_GTEST_BASE_NATIVEHELPER_JNI_GTEST_H_
-#define LIBNATIVEHELPER_TESTS_JNI_GTEST_BASE_NATIVEHELPER_JNI_GTEST_H_
+#pragma once
 
 #include <memory>
 
@@ -123,4 +122,3 @@
 
 }  // namespace android
 
-#endif  // LIBNATIVEHELPER_TESTS_JNI_GTEST_BASE_NATIVEHELPER_JNI_GTEST_H_