Chris Lattner
4b1d10604e
Fix bug: Assember2003-04-15-ConstantInitAssertion.llx
...
llvm-svn: 5777
2003-04-15 16:09:31 +00:00
Chris Lattner
8ce4e7949b
Fix bug: Assembler/2003-03-03-DuplicateConstant.ll
...
llvm-svn: 5692
2003-03-03 23:28:55 +00:00
Chris Lattner
b90181e348
Fix bug: Assembler/2003-02-02-ConstGlobal.ll
...
llvm-svn: 5467
2003-02-02 16:40:20 +00:00
Chris Lattner
63a25242dc
Fix bug: Assembler/2003-01-30-UnsignedString.ll
...
llvm-svn: 5445
2003-01-30 22:24:26 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
1961329140
- Fix bug: Assembler/2002-10-15-NameClash.ll
...
- Clean up code a bit, s/Method/Function/
llvm-svn: 4188
2002-10-15 21:41:14 +00:00
Chris Lattner
8022a0f57c
This loop executed exactly one time, turn it into straightline code
...
llvm-svn: 4159
2002-10-14 03:28:42 +00:00
Chris Lattner
149376dee5
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
fa01a52149
Minor, non-functionality changing, formatting fix
...
llvm-svn: 4091
2002-10-09 00:25:32 +00:00
Chris Lattner
e2dd92be96
The parser now accepts "external" global variables, in addition to the backwards
...
compatible "uninitialized" global variables
llvm-svn: 4050
2002-10-06 22:45:09 +00:00
Chris Lattner
322bf4f3a9
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3710
2002-09-13 22:28:45 +00:00
Chris Lattner
bb4fe2c3c4
Recently changed getelementptr to use 'long' indexes for sequential types
...
instead of uints. This adds a translation scheme to be backwards compatible
with old .ll files.
llvm-svn: 3679
2002-09-11 01:17:27 +00:00
Chris Lattner
a6834c1331
Use explicit ctor
...
llvm-svn: 3663
2002-09-10 22:37:46 +00:00
Chris Lattner
c0686feca2
Tighten up error checking in parser, disallowing instructions that f.e.,
...
add pointers together.
llvm-svn: 3660
2002-09-10 19:57:26 +00:00
Chris Lattner
030effa42c
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3484
2002-08-22 22:48:55 +00:00
Chris Lattner
319c47adec
- Fix asmparser and bytecode reader to not generate loads/stores with idxs
...
Now an obnoxious warning is emitted to discourage usage. Eventually
support will be removed.
llvm-svn: 3435
2002-08-21 23:51:21 +00:00
Chris Lattner
7f325cd0bc
- Remove unused STRING token from lexer & parser
...
- Changed parser to always use parenthesis on ConstExprs to be consistent
- Parser now passes TRUE and FALSE tokens as a special case of the ConstExpr
machinery instead of a special case of constant int stuff
- Fix the AsmParser to use ValueRef ::= ConstExpr, and remove
ResolvedVal ::= ConstExpr this allows constexprs to be used in PHI nodes
llvm-svn: 3362
2002-08-16 21:14:40 +00:00
Chris Lattner
d8ecff793a
Parse const expr cast instruction the same way the instruction is formed
...
llvm-svn: 3353
2002-08-15 19:37:11 +00:00
Chris Lattner
7f1c98d060
Move ConstExpr production to unify ConstVal stuff
...
llvm-svn: 3351
2002-08-15 18:17:28 +00:00
Chris Lattner
61643a01c3
Fix bug: test/Regression/Assembler/2002-08-15-UnresolvedGlobalReference.ll
...
llvm-svn: 3350
2002-08-15 17:58:33 +00:00
Chris Lattner
330b7ac76c
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
db3b202be8
AsmParser turns 'not' instructions into 'xor' instructions now.
...
llvm-svn: 3309
2002-08-14 17:12:33 +00:00
Chris Lattner
3cd8c56cbb
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3161
2002-07-30 18:54:25 +00:00
Chris Lattner
91e0832181
Add check to fix bug:
...
test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx
llvm-svn: 3101
2002-07-25 20:52:56 +00:00
Chris Lattner
e680139c34
GCC 3.1 changes
...
llvm-svn: 3074
2002-07-25 06:17:42 +00:00
Chris Lattner
8eedb941d3
* Code cleanups
...
* Fix a REALLY misleading error message
llvm-svn: 2960
2002-07-18 05:18:37 +00:00
Chris Lattner
980ddf5854
ConstExpr::getelementptr now takes a vector of Constants not Values
...
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Chris Lattner
8445b41ddd
Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
...
llvm-svn: 2907
2002-07-15 00:10:33 +00:00
Vikram S. Adve
7064eaf80b
Added support for parsing expressions constructed from constant values.
...
(Major new non-terminal is ConstExpr.)
Add YYERROR_VERBOSE and print additional information on errors.
llvm-svn: 2894
2002-07-14 22:59:28 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
8cb1dfbdc9
* Be more typesafe: cast<x> now no longer discards constness
...
* The newly installed version of Bison now really likes there to be ;'s
after productions. Add them to avoid tons of warnings.
llvm-svn: 2757
2002-06-04 21:58:56 +00:00
Chris Lattner
f4c7dd9c22
Support function declarations with either %XXX or "XXX" style for now
...
"XXX" style should be considered deprecated, and will hopefully be removed
in the future.
llvm-svn: 2727
2002-05-22 22:33:00 +00:00
Chris Lattner
181cc32365
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
638fa9385d
Remove dead code
...
llvm-svn: 2473
2002-05-06 03:03:09 +00:00
Chris Lattner
1e1a9b4166
Allow open/closing curly braces instead of begin/end to define the body of a function
...
llvm-svn: 2451
2002-05-03 18:23:48 +00:00
Chris Lattner
18489fb61f
* Fix a bug (test/Regression/Assembler/2002-05-02-InvalidForwardRef.ll)
...
introduced in the 1.66 revision of this file.
* Convert a hard coded constant to a symbolic value.
llvm-svn: 2436
2002-05-02 19:27:42 +00:00
Chris Lattner
7b804d6195
The "implementation" is now allowed but not required by the parser. All type
...
definitions must still occur before function bodies, but the wierd keyword is
no longer neccesary.
llvm-svn: 2433
2002-05-02 19:11:13 +00:00
Chris Lattner
8cfc0d5f89
Fix bug: test/Regression/Other/2002-04-29-NameBinding.ll
...
llvm-svn: 2402
2002-04-29 18:25:33 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
d0cfbae8c9
Remove dead code
...
llvm-svn: 2390
2002-04-28 21:57:50 +00:00
Chris Lattner
ae234e1868
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
Rename some yacc type names to be more concise. Change jump table to use
a vector instead of a list.
llvm-svn: 2214
2002-04-09 19:41:42 +00:00
Chris Lattner
30752bd910
* Make PATypeHolder not take a type argument
...
* Eliminate by inlining the old newTH, newTH, and TypeDone functions
* OPAQUE is now just a token that gets returned by the lexer, not a type
Parser now creates type, not lexer
llvm-svn: 2104
2002-04-04 19:23:55 +00:00
Chris Lattner
041468ff3f
* Fix nondeleted type handle which could cause type pool corruption (and
...
a memory leak)
* Fix memory leak of Argument nodes on function prototypes
llvm-svn: 2065
2002-03-31 07:16:49 +00:00
Chris Lattner
57698e2c0b
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
1a8ea8ae4f
Implement TODO for better diagnostic output
...
llvm-svn: 1859
2002-03-11 22:12:39 +00:00
Chris Lattner
108308aa91
Fix bug: test/Regression/2002-03-08-NameCollision2.ll
...
llvm-svn: 1839
2002-03-08 19:11:42 +00:00
Chris Lattner
f7bfab5624
Fix minor memory leak
...
llvm-svn: 1837
2002-03-08 18:57:56 +00:00
Chris Lattner
29f6709c3a
Fix for: test/Regression/Assembler/2002-03-08-NameCollision.ll
...
llvm-svn: 1836
2002-03-08 18:41:32 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
ef99d3c144
* Fix cases where we were calling Type->getName() instead of Type->getDescription()
...
* Remove unsized array support
* Malloc/alloca do not require that the first element be an unsized array to be an
array allocation
llvm-svn: 1458
2001-12-14 16:28:42 +00:00