forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Selectively enable the 64-to-32 bit truncation diagnostic (facebook#802)
Summary: Pull Request resolved: facebook#802 Ensures the GCC diagnostic ignored "-Wshorten-64-to-32" is only enabled if the C++ compiler supports it. Reviewed By: fbmal7 Differential Revision: D39100412 fbshipit-source-id: a61b056326633e8ea067bf5b5e547ff89a31fec8
- Loading branch information
1 parent
1814759
commit 8a6a977
Showing
85 changed files
with
382 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
external/llvh/patches/ifdef_around_ignore_Wshorten-64-to-32_warning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/APInt.h b/xplat/hermes/external/llvh/include/llvh/ADT/APInt.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/APInt.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/APInt.h | ||
@@ -23,7 +23,10 @@ | ||
#include <string> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
class FoldingSetNodeID; | ||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/DenseMap.h b/xplat/hermes/external/llvh/include/llvh/ADT/DenseMap.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/DenseMap.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/DenseMap.h | ||
@@ -31,7 +31,10 @@ | ||
#include <utility> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/DenseMapInfo.h b/xplat/hermes/external/llvh/include/llvh/ADT/DenseMapInfo.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/DenseMapInfo.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/DenseMapInfo.h | ||
@@ -24,7 +24,10 @@ | ||
#include <utility> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/Hashing.h b/xplat/hermes/external/llvh/include/llvh/ADT/Hashing.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/Hashing.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/Hashing.h | ||
@@ -55,7 +55,10 @@ | ||
#include <utility> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/MapVector.h b/xplat/hermes/external/llvh/include/llvh/ADT/MapVector.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/MapVector.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/MapVector.h | ||
@@ -27,7 +27,10 @@ | ||
#include <vector> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/SmallVector.h b/xplat/hermes/external/llvh/include/llvh/ADT/SmallVector.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/SmallVector.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/SmallVector.h | ||
@@ -34,7 +34,10 @@ | ||
#include <utility> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/ADT/StringRef.h b/xplat/hermes/external/llvh/include/llvh/ADT/StringRef.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/ADT/StringRef.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/ADT/StringRef.h | ||
@@ -22,7 +22,10 @@ | ||
#include <utility> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/IR/InstrTypes.h b/xplat/hermes/external/llvh/include/llvh/IR/InstrTypes.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/IR/InstrTypes.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/IR/InstrTypes.h | ||
@@ -43,7 +43,10 @@ | ||
#include <vector> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
namespace llvh { | ||
|
||
diff --git a/xplat/hermes/external/llvh/include/llvh/Support/MathExtras.h b/xplat/hermes/external/llvh/include/llvh/Support/MathExtras.h | ||
--- a/xplat/hermes/external/llvh/include/llvh/Support/MathExtras.h | ||
+++ b/xplat/hermes/external/llvh/include/llvh/Support/MathExtras.h | ||
@@ -24,7 +24,10 @@ | ||
#include <type_traits> | ||
|
||
#pragma GCC diagnostic push | ||
+ | ||
+#ifdef HERMES_COMPILER_SUPPORTS_WSHORTEN_64_TO_32 | ||
#pragma GCC diagnostic ignored "-Wshorten-64-to-32" | ||
+#endif | ||
|
||
#ifdef __ANDROID_NDK__ | ||
#include <android/api-level.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.