summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-18 21:56:20 +0000
committerChris Lattner <sabre@nondot.org>2004-07-18 21:56:20 +0000
commit13e5831bd033bd0aee3991f556f8add6d095e52f (patch)
tree0733915ae1e72f47dd369594ce867d6c4d4c565e /llvm/lib/Support/CommandLine.cpp
parent517f1847ba61d45b8efa5ad90662ff544b3230c6 (diff)
downloadbcm5719-llvm-13e5831bd033bd0aee3991f556f8add6d095e52f.tar.gz
bcm5719-llvm-13e5831bd033bd0aee3991f556f8add6d095e52f.zip
Add a workaround for a GCC 3.3.2 bug
llvm-svn: 14976
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 2337e2e2558..0e0cad96eaa 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -69,7 +69,12 @@ static void AddArgument(const char *ArgName, Option *Opt) {
//
static void RemoveArgument(const char *ArgName, Option *Opt) {
if (CommandLineOptions == 0) return;
- assert(getOption(ArgName) == Opt && "Arg not in map!");
+#ifndef NDEBUG
+ // This disgusting HACK is brought to you courtesy of GCC 3.3.2, which ICE's
+ // If we pass ArgName directly into getOption here.
+ std::string Tmp = ArgName;
+ assert(getOption(Tmp) == Opt && "Arg not in map!");
+#endif
CommandLineOptions->erase(ArgName);
if (CommandLineOptions->empty()) {
delete CommandLineOptions;
OpenPOWER on IntegriCloud