aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-upgrade/UpgradeLexer.l
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-05 17:18:58 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-05 17:18:58 +0000
commit90eb4d653c413991b577fde2edde023ff4a66318 (patch)
treed3432286b5f70df9d9b6397049987ab60c691ddd /tools/llvm-upgrade/UpgradeLexer.l
parent218ded2fc98b4f27c341247bafa745bc7a7721c2 (diff)
downloadexternal_llvm-90eb4d653c413991b577fde2edde023ff4a66318.zip
external_llvm-90eb4d653c413991b577fde2edde023ff4a66318.tar.gz
external_llvm-90eb4d653c413991b577fde2edde023ff4a66318.tar.bz2
Major update of llvm-upgrade:
1. Completely revise the type system so that types are handled as const objects and not created multiple times, cloned, or otherwise copied. This gets around memory issues, saves memory, and also emulates LLVM's no-two-types-of-the-same-shape-created semantics. 2. Adjust the handling of global names. Basically, we cannot rename them for a variety of reasons: linking, forward references, etc. 3. Detect global names that have name conflicts as the result of collapsed type planes or redefinitions that llvm-as no longer accepts. These will produce warnings on stderr and one of the globals will be renamed. 4. Rename ParserInternals.h as UpgradeInternals.h so it doesn't conflict in the debugger with ParserInternals.h from lib/AsmParser. 5. Move the guts of the TypeInfo class into the grammar so we aren't implementing large functions in a header file. This also helps with debugging a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeLexer.l')
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-upgrade/UpgradeLexer.l b/tools/llvm-upgrade/UpgradeLexer.l
index d9e5d0e..5b57560 100644
--- a/tools/llvm-upgrade/UpgradeLexer.l
+++ b/tools/llvm-upgrade/UpgradeLexer.l
@@ -26,7 +26,7 @@
%{
-#include "ParserInternals.h"
+#include "UpgradeInternals.h"
#include "UpgradeParser.h"
#include <cctype>
#include <cstdlib>
@@ -48,7 +48,7 @@
return sym
#define RET_TY(sym,OldTY,NewTY,sign) \
- Upgradelval.Type = new TypeInfo(NewTY, OldTY); \
+ Upgradelval.Type = TypeInfo::get(NewTY, OldTY); \
return sym
#define YY_NEVER_INTERACTIVE 1