Commit Graph

267 Commits

Author SHA1 Message Date
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner 24c67e8553 Eliminate unused class
llvm-svn: 9270
2003-10-19 21:39:41 +00:00
Chris Lattner b94550e537 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner 0079e7dd6d New revised variable argument handling support
llvm-svn: 9219
2003-10-18 05:53:13 +00:00
Chris Lattner 0aa8eaf7bf Tighten up handling of checks for shift instructions
llvm-svn: 9191
2003-10-17 05:11:44 +00:00
Chris Lattner 6187774380 Minor cleanups
llvm-svn: 9177
2003-10-16 20:12:13 +00:00
Chris Lattner 068ad84038 Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner f95d9b99b3 Decrease usage of use_size()
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Brian Gaeke bc12709888 Include <cctype> and <cstdlib> instead of <ctype.h> and "Config/stdlib.h".
llvm-svn: 9036
2003-10-10 19:12:08 +00:00
Chris Lattner 8ad183194b Reserve space for PHI operands
llvm-svn: 9007
2003-10-10 16:34:58 +00:00
Chris Lattner f4120d9a2a Accept 'weak' as a linkage type. For now, just turn it into linkonce linkage
llvm-svn: 8998
2003-10-10 04:54:02 +00:00
Chris Lattner 6f8cd63693 Add better checking
llvm-svn: 8996
2003-10-10 03:56:01 +00:00
Chris Lattner 5c02edbf5c The objects mapped are really PATypeHolders, not PATypeHandles
llvm-svn: 8822
2003-10-02 19:00:34 +00:00
Misha Brukman d4d259cafb Uppercase the acronym ASCII.
llvm-svn: 8676
2003-09-22 23:50:25 +00:00
Chris Lattner 9eea08caa2 Oops, look at the VOLATILE marker, not the opcode
llvm-svn: 8413
2003-09-08 20:29:46 +00:00
Chris Lattner 9c58cf6d03 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner 8b1680eadb Parse volatile loads/stores
llvm-svn: 8402
2003-09-08 18:20:29 +00:00
Chris Lattner 667ded9bf8 Remove gross old hacky code that was in there for backwards compatibility
1 year is plenty of migration time!

llvm-svn: 8282
2003-09-01 16:31:28 +00:00
Chris Lattner 6a2b859191 Rename SwitchInst::dest_push_back -> addCase
llvm-svn: 8089
2003-08-23 23:14:52 +00:00
Chris Lattner 9eb287583b Accept double quoted strings everwhere we accept a %ABC variable name.
This introduces one more innoculous shift-reduce conflict, but will REALLY
help the type names generated by the C++ frontend, which wants to use all
kinds of crazy stuff.

llvm-svn: 8050
2003-08-22 05:42:10 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner f26a8ee580 Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Misha Brukman 7fdaab4f68 The word `separate' only has one `e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner 7969401e16 Add support for a new zeroinitializer token which can be used to get rid of
huge arrays of zero initialized values

llvm-svn: 6937
2003-06-28 20:01:34 +00:00
Chris Lattner 8826647168 Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Chris Lattner d515967513 Fix bugs:
Assembler/2003-05-21-MalformedShiftCrash.llx
  Assembler/2003-05-21-ConstantShiftExpr.ll

llvm-svn: 6258
2003-05-21 17:48:56 +00:00
Chris Lattner 5bb2315a88 Fix bugs:
Assembler/2003-05-21-EmptyStructTest.ll
  Assembler/2003-05-21-MalformedStructCrash.llx

llvm-svn: 6255
2003-05-21 16:06:56 +00:00
Chris Lattner 9f3648bf02 Fix bug: Assembler/2003-05-15-SwitchBug.ll
llvm-svn: 6239
2003-05-15 21:30:00 +00:00
Chris Lattner f70da10697 Add support for the new va_arg instruction
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner 1fcfaf5bc0 Fix bug: Assembler/2003-04-25-UnresolvedGlobalReference.ll
llvm-svn: 5948
2003-04-25 21:47:33 +00:00
Chris Lattner 62fa743e75 Use a union to cast int to fp
llvm-svn: 5849
2003-04-22 20:20:28 +00:00
Chris Lattner 2012613040 Allow information about the target to be specified in the .ll file
llvm-svn: 5843
2003-04-22 19:07:06 +00:00
Chris Lattner 89da8a3b31 Namespacify
llvm-svn: 5840
2003-04-22 18:42:41 +00:00
Chris Lattner b672b5607f Preserve module source information in the ModuleID
llvm-svn: 5836
2003-04-22 18:02:52 +00:00
Chris Lattner e509bd47bf Allow hexadecimal integer constants to be used
llvm-svn: 5802
2003-04-17 22:17:32 +00:00
Chris Lattner 379a8d2d1c Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner fcfb1761c7 Don't allow declaring an external internal variable
llvm-svn: 5781
2003-04-16 18:13:57 +00:00
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
Misha Brukman 4e243cee9a Ignore generated files Lexer.cpp and llvmAsmParser.*
llvm-svn: 4861
2002-12-02 21:14:54 +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 ef299571d9 include/llvm/DataTypes.h includes this #define so we don't need it anymore
llvm-svn: 3709
2002-09-13 22:25:00 +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 e083fe9e34 AsmParser now depends on clients to verify that input is well formed
llvm-svn: 3548
2002-08-30 22:52:23 +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
Vikram S. Adve 9f835b82fc Declare globals llvmAsmtext and llvmAsmleng for use in the parser.
llvm-svn: 2893
2002-07-14 22:49:40 +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 ca14237696 Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +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 8e421f454d isLabelType is obsolete
llvm-svn: 2175
2002-04-08 21:59:08 +00:00
Chris Lattner 970bb72ff6 Library bumped up out of Assembly directory
llvm-svn: 2164
2002-04-08 20:17:06 +00:00
Chris Lattner b99f479f71 Add a better comment to explain what is going on.
llvm-svn: 2139
2002-04-07 08:31:26 +00:00
Chris Lattner a815ded431 Remove debugging code accidentally checked in!
llvm-svn: 2137
2002-04-07 08:13:29 +00:00
Chris Lattner 1b3437405b Add support for hexadecimal FP constants!
llvm-svn: 2135
2002-04-07 08:10:41 +00:00
Chris Lattner e2f2f54f0c s/MethodType/FunctionType
llvm-svn: 2115
2002-04-04 22:19:18 +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 f269b9d236 Lexer doesn't create typehandle gross stuff now, parser does.
llvm-svn: 2103
2002-04-04 19:22:17 +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 ee6f2affbe Close input file if exception is thrown
llvm-svn: 1784
2002-02-20 18:06:43 +00:00
Chris Lattner 8280bf59e0 Change to verifier interface
llvm-svn: 1782
2002-02-20 17:56:02 +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
Chris Lattner 1366b3019e Allow hyphens in identifier names
llvm-svn: 1409
2001-12-04 04:31:30 +00:00
Chris Lattner 2413b160ec 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 3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner fb5ae02e1a 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
Chris Lattner 5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner 841d8b9e50 Implement support for internal methods
llvm-svn: 1373
2001-11-26 18:54:16 +00:00
Chris Lattner 476148f95a Implement array indexing with uints
llvm-svn: 1336
2001-11-26 16:54:11 +00:00
Chris Lattner f29b231c77 Improve some debugging code
llvm-svn: 1088
2001-11-02 07:46:26 +00:00
Chris Lattner 50f68acb37 Support floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
llvm-svn: 1087
2001-11-01 22:06:08 +00:00
Chris Lattner adb4dbaef3 Negative FP constants... whodathunkit.
llvm-svn: 963
2001-10-23 04:13:01 +00:00
Chris Lattner e6b470c3f1 Remove ugly subclass of Opaque type
llvm-svn: 936
2001-10-22 06:01:08 +00:00
Chris Lattner d50fa5aa36 Fix bug with
%list = type {%list *}
%list = type {%list *}

not being accepted (broken testmisc.ll)

llvm-svn: 935
2001-10-22 05:56:09 +00:00
Chris Lattner 6265d798d4 Two changes:
1. Delete type handle regardless of whether a collision occured
2. Remove a MAJOR pessimization of runtime performance (thought be be an optimization at the time).

This second one was causing a 105k llvm file (from gcc) to parse in 58 seconds... without the
'optimization' it now parses in 3.64 seconds.  I suck.

llvm-svn: 933
2001-10-21 23:02:41 +00:00
Chris Lattner 28a63e2972 Fix bug caused by:
%list = type opaque
%list = type %list

llvm-svn: 931
2001-10-21 21:43:25 +00:00
Chris Lattner c27b1d7bf3 Add support for And, XOR, and Or
llvm-svn: 924
2001-10-20 09:32:59 +00:00
Chris Lattner f96ef663e0 It is valid to have unsigned arrays as constants... the linker may initialize them later
llvm-svn: 923
2001-10-20 06:43:05 +00:00
Chris Lattner 322e49aa36 Simplify some code
Remove Method special case
Fix bug exposed by this testcase:

implementation

void "PtrFunc2"()
begin
bb1:
        %reg = add int(int)* null, null
        add int (int)* %reg, null
        ret void
end

llvm-svn: 852
2001-10-16 19:54:17 +00:00
Chris Lattner 162ed4d6cc Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner f26e0d9ffe * Add support for forward references of global variable addresses
* Add support for numeric global variable addresses
* Clean up getVal function by refactoring it into several smaller functions
* MethodTypes are now specified with an explicit isVarArg parameter
* Break ValueRef into ConstValueRef & SymbolicValueRef components
* Add support for the new Invoke instruction
* Fix a few broken calls to Type::getName instead of Type::getDescription

llvm-svn: 758
2001-10-13 06:41:08 +00:00
Chris Lattner 930f610ea5 Add operator< to ValID's so that they can be put in map's
llvm-svn: 757
2001-10-13 06:37:47 +00:00
Chris Lattner fc4c5040aa Remove exception specification
llvm-svn: 756
2001-10-13 06:37:27 +00:00
Chris Lattner 3d4b290757 Support the new Invoke instruction
llvm-svn: 755
2001-10-13 06:37:14 +00:00
Chris Lattner 78326d20c5 Add comment
llvm-svn: 712
2001-10-03 19:35:57 +00:00
Chris Lattner e504b4395b Support multiple global's definitions
llvm-svn: 711
2001-10-03 19:35:04 +00:00
Chris Lattner fb3e54940b Allow duplicate constant values as long as they are compatible.
Clean up stuff a little bit with inMethod/ModuleContext functions

llvm-svn: 707
2001-10-03 15:39:04 +00:00
Chris Lattner 28807801be Add check to make sure that we dont reference MEthodType's directly
llvm-svn: 704
2001-10-03 14:59:05 +00:00
Chris Lattner 7fac070215 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion

llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner 60e0dd78b2 First try at a horrible global value reference wrapper
llvm-svn: 701
2001-10-03 06:12:09 +00:00
Chris Lattner e63ddd8df7 Clean up parser, fix a bug that prevented this from working:
%ListNode3 = global %list { %list* null, int 4 }

because %list is name and the parser expected a literal {..} type there.

In addition, simplified rules that the fix (Allow any Types there, not just a StructType)
made obsolete.  Simplified type propogation a bit.

llvm-svn: 700
2001-10-03 03:19:33 +00:00
Chris Lattner 571a6b07b6 * Add support for null as a constant
* Allow multiple definitions of a type with the same name as long as they are the same type
* Eagerly resolve types to allow #2 to work instead of after the whole const pool has been processed
* Change grammar to require a const before a local constant definition

llvm-svn: 699
2001-10-03 01:49:25 +00:00
Chris Lattner da55810666 Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner 3856934386 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner 8f19112923 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner 4b717c0edc Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner fbdec250b3 Implement constant pointers, and null specifically in the parser, bytecode writer, and
bytecode reader.

llvm-svn: 668
2001-09-30 22:46:54 +00:00
Chris Lattner bb09a10929 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner e2c8d43e1d Remove the unsized array constraint
llvm-svn: 599
2001-09-18 04:38:32 +00:00
Chris Lattner 7fb14f54f8 Add support for global constants, and for initializers for constants
Clean up parser somewhat by factoring out freeing of ID's into setname function

llvm-svn: 597
2001-09-18 04:00:54 +00:00
Chris Lattner 8ad45e8101 Update to use correct type cast
llvm-svn: 536
2001-09-10 20:08:08 +00:00
Chris Lattner da9755002f Implement global variable support
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner aa534bf195 * Add support for forward referencing types
* Add support for upreferences for recursive types
* Remove support for ConstantPool.h
* Add support for globally unique Constants
* Add support for the opaque type

llvm-svn: 446
2001-09-07 16:35:17 +00:00
Chris Lattner c7805c7d71 Add support for forward referencing types
llvm-svn: 445
2001-09-07 16:33:01 +00:00
Chris Lattner 47af30c937 Add support for an opaque type
llvm-svn: 444
2001-09-07 16:32:43 +00:00
Chris Lattner 26e50dc0c3 * Enable the use of escaped literal strings
* Unresolved variable names now have the correct line number for their
  error messages
* Rename Def* to Value*
* Check for symbol table collisions before inserting values
* Remove the STRING keyword
* Enable the use of string literals to initialize constant arrays
* Enable the use of extended constants in more locations: eg ret [int] [4, 5]
* Allow method prototypes to appear in the constant pool of the program
* Support varargs methods better.  Enable varargs methods with 0 fixed
  arguments
* Allow the entire method prototype to optionally be specified in a call inst

llvm-svn: 321
2001-07-28 17:48:55 +00:00
Chris Lattner 252afbaf33 Refactor some of the constant stuff so that we can return complex constant
values directly.  This was causing test failures. :(

llvm-svn: 304
2001-07-26 16:29:15 +00:00
Chris Lattner 42b5a8a6e5 Add support for extern varargs methods & varargs method calls
Remove tool generated files

llvm-svn: 296
2001-07-25 22:47:46 +00:00
Chris Lattner e2472bbf6c Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00