Small fix: the error message was incorrect in some cases.
authorMikhail Glushenkov <foldr@codedgers.com>
Wed, 26 Nov 2008 10:55:45 +0000 (10:55 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Wed, 26 Nov 2008 10:55:45 +0000 (10:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60099 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/LLVMCConfigurationEmitter.cpp

index d43e62bad8f7e63f972de024f4a6e066cfd0750e..da4ed78a24cbf8ffc61feddb7769b247d02732ba 100644 (file)
@@ -228,11 +228,11 @@ struct GlobalOptionDescription : public OptionDescription {
     if (other.Type != Type)
       throw "Conflicting definitions for the option " + Name + "!";
 
-    if (Help == DefaultHelpString)
+    if (Help == other.Help || Help == DefaultHelpString)
       Help = other.Help;
     else if (other.Help != DefaultHelpString) {
-      llvm::cerr << "Warning: more than one help string defined for option "
-        + Name + "\n";
+      llvm::cerr << "Warning: several different help strings"
+        " defined for option " + Name + "\n";
     }
 
     Flags |= other.Flags;