diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-04-23 06:30:43 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-04-23 06:30:43 +0000 |
commit | b009b14971cbeb9889567b2ecfae4553fbea90ff (patch) | |
tree | 5f30c0f1eec0490f05b7e9a10c407770b8cb5922 /llvm/lib/Support/ErrorHandling.cpp | |
parent | 76dca78cb4dc0d85285f7c963d2853cf35d4d222 (diff) | |
download | llvm-b009b14971cbeb9889567b2ecfae4553fbea90ff.zip llvm-b009b14971cbeb9889567b2ecfae4553fbea90ff.tar.gz llvm-b009b14971cbeb9889567b2ecfae4553fbea90ff.tar.bz2 |
There were some frustrating problems with the implementation of
-Wwrite-strings. First and foremost, once the positive form of the flag
was passed, it could never be disabled by passing -Wno-write-strings.
Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
control diagnostics (as GCC does) because it was essentially hijacked to
drive the language semantics.
Fix this by giving CC1 a clean '-fconst-strings' flag to enable
const-qualified strings in C and ObjC compilations. Corresponding
'-fno-const-strings' is also added. Then the driver is taught to
introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
dominates.
This entire flag is basically GCC-bug-compatibility driven, so we also
match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
open to changing this though as it seems insane.
llvm-svn: 130051
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
0 files changed, 0 insertions, 0 deletions