aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commitf98cfc716d1916e3400d8980c972f75fe47b9061 (patch)
treedbf5432a67de553f04577ef4e02c6b84da910353 /lib
parentf70c25f79612c7fc2b920e77667462022aac3347 (diff)
downloadexternal_llvm-f98cfc716d1916e3400d8980c972f75fe47b9061.zip
external_llvm-f98cfc716d1916e3400d8980c972f75fe47b9061.tar.gz
external_llvm-f98cfc716d1916e3400d8980c972f75fe47b9061.tar.bz2
Add a workaround for a GCC 3.3.2 bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/CommandLine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 2337e2e..0e0cad9 100644
--- a/lib/Support/CommandLine.cpp
+++ b/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;