forked from OSchip/llvm-project
Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
in array value-initialization. llvm-svn: 75518
This commit is contained in:
parent
48b4d1e27e
commit
9ab53d2b17
|
@ -91,7 +91,11 @@ static Info &getInfo(unsigned id) {
|
|||
return OptionInfos[id - 1];
|
||||
}
|
||||
|
||||
OptTable::OptTable() : Options(new Option*[numOptions]()) {
|
||||
OptTable::OptTable() : Options(new Option*[numOptions]) {
|
||||
// Explicitly zero initialize the error to work around a bug in array
|
||||
// value-initialization on MinGW with gcc 4.3.5.
|
||||
memset(Options, 0, sizeof(*Options) * numOptions);
|
||||
|
||||
// Find start of normal options.
|
||||
FirstSearchableOption = 0;
|
||||
for (unsigned i = OPT_UNKNOWN + 1; i < LastOption; ++i) {
|
||||
|
|
Loading…
Reference in New Issue