summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLToken.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-1/+1
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add the private linkage.Rafael Espindola2009-01-151-1/+1
| | | | llvm-svn: 62279
* 61949 accidentally introduced an escaped newline. Fix this by makingDan Gohman2009-01-081-1/+1
| | | | | | the comment a little more verbose. llvm-svn: 61959
* Fix the comment for lltok::backslash.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61949
* Down with trailing whitespace!Misha Brukman2009-01-021-18/+18
| | | | llvm-svn: 61594
* Remove comma at end of enumerator list.Daniel Dunbar2009-01-021-1/+1
| | | | llvm-svn: 61585
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-021-0/+126
and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. llvm-svn: 61558
OpenPOWER on IntegriCloud