Chris Lattner
0b6940f8c4
- 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
a2b28689a9
- 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
7cd8403f2b
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
8c5c0b9560
Move ConstExpr production to unify ConstVal stuff
...
llvm-svn: 3351
2002-08-15 18:17:28 +00:00
Chris Lattner
971fa225af
Fix bug: test/Regression/Assembler/2002-08-15-UnresolvedGlobalReference.ll
...
llvm-svn: 3350
2002-08-15 17:58:33 +00:00
Chris Lattner
6a9d88347a
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
ed328517aa
AsmParser turns 'not' instructions into 'xor' instructions now.
...
llvm-svn: 3309
2002-08-14 17:12:33 +00:00
Chris Lattner
1720a4c0b7
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
789adc9192
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
575bbe9f08
GCC 3.1 changes
...
llvm-svn: 3074
2002-07-25 06:17:42 +00:00
Chris Lattner
7a35632ace
* Code cleanups
...
* Fix a REALLY misleading error message
llvm-svn: 2960
2002-07-18 05:18:37 +00:00
Chris Lattner
3f60c43a80
ConstExpr::getelementptr now takes a vector of Constants not Values
...
llvm-svn: 2948
2002-07-18 00:14:27 +00:00
Chris Lattner
1b99c09b2c
Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
...
llvm-svn: 2907
2002-07-15 00:10:33 +00:00
Vikram S. Adve
01595dd6af
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
Vikram S. Adve
f2d95b3976
Declare globals llvmAsmtext and llvmAsmleng for use in the parser.
...
llvm-svn: 2893
2002-07-14 22:49:40 +00:00
Chris Lattner
dfd421a7df
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
81e6e7615f
* 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
0737f63807
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
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
728a84e0f7
Remove dead code
...
llvm-svn: 2473
2002-05-06 03:03:09 +00:00
Chris Lattner
5369a645e6
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
8f309d920f
* 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
7af6cac869
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
9468519f34
Fix bug: test/Regression/Other/2002-04-29-NameBinding.ll
...
llvm-svn: 2402
2002-04-29 18:25:33 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
4c9a3f11d3
Remove dead code
...
llvm-svn: 2390
2002-04-28 21:57:50 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
74e29d9b61
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
56e96eb88f
isLabelType is obsolete
...
llvm-svn: 2175
2002-04-08 21:59:08 +00:00
Chris Lattner
87314d504c
Library bumped up out of Assembly directory
...
llvm-svn: 2164
2002-04-08 20:17:06 +00:00
Chris Lattner
9dfa62172d
Add a better comment to explain what is going on.
...
llvm-svn: 2139
2002-04-07 08:31:26 +00:00
Chris Lattner
7413f64df2
Remove debugging code accidentally checked in!
...
llvm-svn: 2137
2002-04-07 08:13:29 +00:00
Chris Lattner
c6c7c99011
Add support for hexadecimal FP constants!
...
llvm-svn: 2135
2002-04-07 08:10:41 +00:00
Chris Lattner
8afff0c29a
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
78b786813b
* 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
feeac9c7ea
Lexer doesn't create typehandle gross stuff now, parser does.
...
llvm-svn: 2103
2002-04-04 19:22:17 +00:00
Chris Lattner
164b766137
* 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
849c762b02
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
23379a852e
Implement TODO for better diagnostic output
...
llvm-svn: 1859
2002-03-11 22:12:39 +00:00
Chris Lattner
d9558891af
Fix bug: test/Regression/2002-03-08-NameCollision2.ll
...
llvm-svn: 1839
2002-03-08 19:11:42 +00:00
Chris Lattner
c49eff8d4b
Fix minor memory leak
...
llvm-svn: 1837
2002-03-08 18:57:56 +00:00
Chris Lattner
49c5f320ff
Fix for: test/Regression/Assembler/2002-03-08-NameCollision.ll
...
llvm-svn: 1836
2002-03-08 18:41:32 +00:00
Chris Lattner
ec7118a6aa
Close input file if exception is thrown
...
llvm-svn: 1784
2002-02-20 18:06:43 +00:00
Chris Lattner
1b91bcee90
Change to verifier interface
...
llvm-svn: 1782
2002-02-20 17:56:02 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
a1ba456c49
* 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
Chris Lattner
d865a13064
Allow hyphens in identifier names
...
llvm-svn: 1409
2001-12-04 04:31:30 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
bcf2df7058
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00