diff options
| author | Dan Gohman <gohman@apple.com> | 2008-03-25 21:45:14 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-03-25 21:45:14 +0000 |
| commit | 12300e1e31559e34d96e533506f74f7cb77020a2 (patch) | |
| tree | 189c62a04edbe3e10e114d655bb008c898ed7e20 /lib/Support | |
| parent | 35a5415d68ca68cf51788b42d92be5ccd3181df3 (diff) | |
| download | external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.zip external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.tar.gz external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.tar.bz2 | |
A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
| -rw-r--r-- | lib/Support/APInt.cpp | 2 | ||||
| -rw-r--r-- | lib/Support/CommandLine.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index a853b92..cd95085 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -1971,7 +1971,7 @@ void APInt::fromString(uint32_t numbits, const char *str, uint32_t slen, std::string APInt::toString(uint8_t radix, bool wantSigned) const { assert((radix == 10 || radix == 8 || radix == 16 || radix == 2) && "Radix should be 2, 8, 10, or 16!"); - static const char *digits[] = { + static const char *const digits[] = { "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F" }; std::string result; diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 4868752..b3f32e8 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -267,7 +267,7 @@ static bool EatsUnboundedNumberOfValues(const Option *O) { static void ParseCStringVector(std::vector<char *> &output, const char *input) { // Characters which will be treated as token separators: - static const char *delims = " \v\f\t\r\n"; + static const char *const delims = " \v\f\t\r\n"; std::string work (input); // Skip past any delims at head of input string. |
