Apply constexpr on global constant varaibles

When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.

Change-Id: I9837c42e6bab38a894ece4e0f34b64f81b38fef0


[ROCm/clr commit: f7cc49c0b2]
Αυτή η υποβολή περιλαμβάνεται σε:
Tao Sang authored and Tao Sang committed 2020-07-22 22:15:03 -04:00
1 γονέας db1fbf23d2
υποβολή 073b1e28d5
1 file changed
+4 -4
@@ -70,12 +70,12 @@ struct pstreams {
/// Type used for file descriptors.
typedef int fd_type;
static const pmode pstdin = std::ios_base::out; ///< Write to stdin
static const pmode pstdout = std::ios_base::in; ///< Read from stdout
static const pmode pstderr = std::ios_base::app; ///< Read from stderr
static constexpr pmode pstdin = std::ios_base::out; ///< Write to stdin
static constexpr pmode pstdout = std::ios_base::in; ///< Read from stdout
static constexpr pmode pstderr = std::ios_base::app; ///< Read from stderr
/// Create a new process group for the child process.
static const pmode newpg = std::ios_base::trunc;
static constexpr pmode newpg = std::ios_base::trunc;
protected:
enum { bufsz = 32 }; ///< Size of pstreambuf buffers.