aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2024-09-17 13:53:50 -0700
committerGitHub <noreply@github.com>2024-09-17 13:53:50 -0700
commit783d323da3c79d884afaed9b1653697fcac58fe3 (patch)
treee84ef484a060dd1407396e234e66e0f9d5c177b0 /clang/lib/CodeGen/CodeGenModule.cpp
parent9a312d47f39bcfcadc16021f1db88b04997dbdc6 (diff)
downloadllvm-783d323da3c79d884afaed9b1653697fcac58fe3.zip
llvm-783d323da3c79d884afaed9b1653697fcac58fe3.tar.gz
llvm-783d323da3c79d884afaed9b1653697fcac58fe3.tar.bz2
[VirtRegMap] Replace a single value enum with a static constexpr member variable. NFC (#109010)
Change the constant to INT_MAX instead of our own large number. Any value larger than a valid frame index should work. I'm a bit puzzled why it was using a shift of 30. A long time ago when it was first created, the value was INT_MAX. Then it was changed in e2b77d57c0c13 to (~0 >> 1) which I guess was trying to be INT_MAX without using the constant. But ~0 is an `int` so that produced -1. I'm not sure what the 'l' suffix was for. Unless that was an attempt to avoid undefined behavior had the shift been 31 instead of 30. But 'long' is 32 bits on some targets so that wouldn't have worked for all platforms. Using INT_MAX is straightforward and avoids any mysteries.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions